I believe the reason my NLL is taking so long to getVal() is that there are many numerical integrations. I have a RooAddPdf and many of the constituent Pdfs are not analytical but are constructed as a RooHistPdf.
However, many RooHistPdfs are generated from the same RooDataHist which does not change. Once the pdfs are created, they are only shifted horizontally and scaled vertically in the model, so it seems that RooFit should not have to numerically integrate many times, but instead integrate once and reference that many times since these constituent pdfs are all just A*f( x+a) with the same underlying f(x).
Is there a way to make roofit normalize this way or is there a better method than RooHistPdf that I should be using?
I don’t have a smaller, reproducible example code, but it would be pretty similar to fitting several gaussian peaks on an exponential background, but rather than gaussians, I have a high resolution histogram that represents what the shape should be
_PYROOT Version: 6.26.10
Platform: Not Provided
Compiler: Not Provided