I’m trying to fit a sum of two exponential decays convoluted with a gaussian resolution function (with a constant background). RooFit allows us to do it with two approaches:
A sum of RooDecays convoluted with RooGauss Model provides reasonable value for fraction of exponents (compared with other fitting software on the market).
A sum of custom exponential decays inherited from RooAbsPdf convoluted with RooFFTConvPdf gives notably different fraction coefficient value.
Unfortunately due to complexity of our other fitting models we need to use second approach with custom RooAbsPdf’s. Is there a way to get RooFFTConvPdf to give correct RooAddPdf coefficient values for exponential decays? Different fit options, buffer strategies and fft binning options do not seem to help here.
Attached please find the root script “convtest.c” and canvas render displaying the discrepancy between fraction coefficients.Script tested with RooFit v3.60 and Root 6.14/02 on MacOS 10.13.3.
P.S.: I’ve posted this issue earlier before here on the forum and reported in Jira too. I present some data at a conference later this August and looking forward to hearing from you.
I am not sure, looking at the code, that the meaning of the coefficient is exactly the same in the two cases.
I would check this carefully, writing down the equation in both cases
Hi guys!
Indeed, RooFFTConvPdf gives incorrect pdf’s coefficient values for convolution of a sum of pdf’s (via RooAddPdf). @Angel_Campoverde provided the correct workaround to this RooFit issue. One has to FIRST convolute each of pdf’s individually and THEN sum them with RooAddPdf.
From the mathematical point of view this behavior is a bug. I would like to draw developers’ attention here. Will prepare a snippet of code that reveals the problem later today.
Hi Lorenzo! Thanks for your reply. I posted an issue in JIRA and attached a sample code that demonstrates the problem. I consider the issue quite critical. Hope it will be resolved soon.
Yes, I did test RooNumConvPdf as well. It turns out to have a similar problem.
P.S: Earlier this May I’ve posted another JIRA story that was a precursor to the current one. I interlinked these issues in JIRA.