Problem with convergence if fit is performed in range

Hi experts,
I have a code which performs an extended likelihood fit on a data sample containing 4 yield components. When I perform a fit in the full range of mass observable, I get good convergence as shown here.
Screenshot from 2021-06-26 21-35-39
But when I perform a ranged fit(hiding signal region) of data, the fitter fails to achieve convergence.
I have attached a code here. Please help me identify the issue.

To perform a ranged fit I am following this tutorial example: rf204b__extendedLikelihood__rangedFit_8C.html

Attachement: (8.7 KB)

When fit is performed in range, gives this plot:
Screenshot from 2021-06-28 10-44-55

But it is failed fit. It looks good just because i have taken initial parameters close to minimum. Please let me know if you require additional info.

Note: Try running attached file in lxplus.


You are having some problem with a pdf in your model, I think this is due to your generic pdf, pdf_errf. The computation of its integral results in a NaN.
You should not disable the error messages, because they are often meaningful, and will help you understanding the problem such as why the fit is not converging


Thank you @moneta for your reply.
I would like to point out that the same PDF works well when RooFit::Range() argument is removed(Changing rangeFlag from line#19 of the attached script).
Do you think of any workaround?

This can happen if the integral of the pdf has problems in the restricted range, but works fine in the full range. I would try to understand if that pdf has no particular implementation issues in the restricted range, and if not, you can try one of these:


1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.