Problem using RooMCStudy

Hi,
I’m trying to execute this piece of code in root v 5.14 with RooFit v2.10 and I get a Seg Fault when generating. I used the exemple presented here : roofit.sourceforge.net/docs/tuto … lide8.html
Since the creation of the document, has anything changed ?

Thanks in advance,

Cheers,

#include <RooGaussModel.h>
#include <RooAbsReal.h>
#include <RooMCStudy.h>

using namespace RooFit;

int mcs() {

  RooRealVar x("x","x",-5,5);
  RooRealVar mean("mean","mean",0);
  RooRealVar sigma("sigma","sigma",2);
  RooGaussian gauss("gauss","gaussian PDF",x,mean,sigma);
  

  RooMCStudy* mgr = new RooMCStudy(gauss,gauss,x,"v");
  mgr->generateAndFit(10,100);

 return 0;
}

well, i can answer my self

i need to not repet the Pdf “gauss” in the expression two times.

Cheers