Hi,
I want to use RooMCStudy to generate and fit toys but I have a problem in the constructor.
This is how my model is defined (which is basically a convolution of expo decay with gaussian with error event by event times another gaussian for another independent variable):
RooGaussian bmass(“bmass”,“mass of the Bs”,*bsmass,*mass,*width);
// generation of protodata
RooGaussian sigerr(“sigerr”,“error on dectime”,*errdectime,*mean_err,*sigma_err);
RooExponential sigerr2(“sigerr2”,“error on dectime”,*errdectime,*slope);
RooFFTConvPdf ErrDt(“ErrDt”," theory (x) resolution",errdectime,sigerr2,sigerr,0);
RooDataSet protodata = ErrDt.generate(RooArgSet(*errdectime),100);
// end of the generation
RooGaussModel resolution(“gauss”,“dectime resolution”,*dectime,*mean,*sigma,*errdectime,*errdectime);
RooDecay modelC(“modelC”,“theory (x) resolution”,*dectime,*g,resolution,RooDecay::Flipped);
RooProdPdf model(“model”,“decay rate * bsmass”,RooArgList(modelC,bmass));
Then I call
RooMCStudy *mgr = new RooMCStudy(model,model,RooArgSet(*dectime,*bsmass),"","",*protodata,RooArgSet(*errdectime));
Doing this I get the error while compiling:
RooCPjpsiphiFit.cc:190: error: no matching function for call to `RooMCStudy::RooMCStudy(RooProdPdf&, RooProdPdf&, RooArgSet, const char[1], const char[1], RooDataSet&, RooArgSet)’
/auto/nfs/home/cerizza/root_5_23_4_64/root/include/RooMCStudy.h:43: note: RooMCStudy::RooMCStudy(const RooAbsPdf&, const RooAbsPdf&, const RooArgSet&, const char*, const char*, const RooDataSet*, const RooArgSet&)
So I tried replacing “*protodata” with “protodata” but it crashes with “segmentation violation”.
What am I doing wrong in the constructor?
Thanks a lot in advance
ciao
giordano