I’m trying to use the VisualizeError option in RooAbsPdf::plotOn. However, I can’t figure out how to get it to account for the normalization uncertainty on the PDF. I’m using an extended pdf, so I would expect the error on the overall normalization to be accounted for, but it’s not.
I declare a pdf like this:
RooRealSumPdf* bkgOnlyPdf = new RooRealSumPdf(modelName1 + “_bkgOnly”,modelName1 + “_bkgOnly”,myFuncs, myCoefs, true);
and then plot it using a RooFitResult called fitresGlobal:
But the error band does not include the uncertainty on the overall normalization of bkgOnlyPdf. Is there a way to include this?
I have tried implementing it this way, but unfortunately it does not work in my case. When I add in the normalization into the plotOn() function, the error bands just disappear. The same happens when I add the normalization in a plotOn function where I’m not trying to visualize the error, but just the pdf itself.
I’m suspecting it has something to do with the fact that I’m using a RooSimultaneous pdf. For the regular pdfs, when I use Slice() to restrict the plot just to one of my categories, eg.