I am attempting a 2D extended ML fit with a RooHistPdf (taken from phase space monte carlo from evtgen) as part of my fitting function.
The total PDF is of the form: PHSP[x,y] * (num1* BreitWigner[x] + num2)
I’ve constructed this in multiple ways (pseudocode):
RooProdPdf(PHSP,RooAddPdf(num1*BW[x],num2))
RooAddPdf(RooProdPdf(PHSP,BW),PHSP)
But the result is always roughly the same: whenever I use the RooHistPdf in a RooProdPdf and then attempt to fit, I receive a number of errors along the lines of:
Parameter values: mean1=10.5646, nBW=10, npdf=10, sigma1=0.04
PID18694/RooRealMPFE::nll_eTotal_argarggaussData_1776380_MPFE0[ arg=nll_eTotal_argarggaussData_GOF0 vars=(mean1,nBW,npdf,sigma1) ]
getLogVal() top-level p.d.f evaluates to zero @ !pdfs=(BWOne = 21.9396,pdfhist = 0/99989.4)
getLogVal() top-level p.d.f evaluates to zero @ !pdfs=(BWOne = 25.3746,pdfhist = 0/99989.4)
getLogVal() top-level p.d.f evaluates to zero @ !pdfs=(BWOne = 28.2436,pdfhist = 0/99989.4)
getLogVal() top-level p.d.f evaluates to zero @ !pdfs=(BWOne = 25.7128,pdfhist = 0/99989.4)
getLogVal() top-level p.d.f evaluates to zero @ !pdfs=(BWOne = 21.4127,pdfhist = 0/99989.4)
getLogVal() top-level p.d.f evaluates to zero @ !pdfs=(BWOne = 18.0406,pdfhist = 0/99989.4)
getLogVal() top-level p.d.f evaluates to zero @ !pdfs=(BWOne = 20.348,pdfhist = 0/99989.4)
and the fit does not converge.
I’ve tried this on 5.27.2, 5.27.6, (both Linux64), 5.24, 5.29 (both Windows). I have seen other posts mentioning bugs in the numerical integration handling in RooHistPdf, but they were allegedly fixed.
I’ve included versions of my code that can be run self-contained, that generate their own events (and the same errors), and the version that takes data from .root files.
Any help would be appreciated. Thanks.
Edit: I just saw that RooFit questions belong in another section. Please move this, if so.
selfContained.C (1.81 KB)
requiresRoots.C (1.37 KB)