I believed to have unveiled a bug in the generation of pseudo-data when you use a product of a conditional PDF and a crystal ball with a shifting mean.
9 // Create f(y) 10 RooPolyVar fy("fy","fy",y,RooArgSet(a0,a1)) ; 11 // Create CB(x,f(y),s,alpha,n) 12 RooCBShape model("model","Crystal ball with shifting mean",x,fy,RooFit::RooConst(.1),RooFit::RooConst(1),RooFit::RooConst(1)); 13 //Create "flat" PDF in y: g(y) 14 RooPolynomial gy("gy","Model for y",y); 15 // Create plain 2D pdf model(x,sx|y) * g(y) 16 RooProdPdf condprod("condprod","model(x|y)*gy(y)",gy,RooFit::Conditional(model,x));
I join a little macro that reproduces the issue ProdModel.C (1.2 KB)
I think that the bug is coming from the way the pseudo-data are generated when the following method: are enabled in the pdf class definition
Int_t RooCBShape::getMaxVal(const RooArgSet& vars)
Double_t RooCBShape::maxVal(Int_t code)
So the quick fix, I came up with, is to comment those two methods in the
RooCBShape.h, however this makes the generation quite slower.
If someone from the development team could take a look at this that would be very appreciated.