Pdf Evaluation precision


I attached a very small piece of code. I would like to know if there is a way to change the precision with which a pdf is evaluated, for instance when fitting.

I managed to make a pdf like the plot in the figure I attached using RooClassFactory::makePdf but roostats seems to approximate its values for high masses. Is there a way to get these values with a higher precision, so that I can see the steps all the way to the end?

Test_dir.zip (36.2 KB)
test.pdf (13.4 KB)


The problem is not in the evaluation of the pdf, that is done in double precision, but in the plotting.
The plotting is done sampling the pdf using a variable number of points in order to achieve a desired precision. You can increase the precision by using the command line option RooFit::Precision. The default value is 1.E-3

In your case just do for example

 bkg.plotOn(plot, RooFit::Precision(1.E-9));

In general, if the pdf is slow to evaluate, it will take longer to plot the pdf if you increase the precision.

Best Regards