RooFit: Fit with composite PDF in Range

Hello ROOT experts,

I meet a problem when I try to fit some data with a composite PDF using RooAddPdf. The data consist of a background component and a signal component : when I fit the separate data components with their corresponding PDF everything goes fine.

But when I combine the signal plus bkg component with the RooAddPdf and try to fit the total data in a restricted fitRange (Range(40.,180.)) , then the fit takes unreasonably long time (seems to run forever) printing the following:

RooAbsRealLValue::inFitRange(m_ll): value 36.2109 rounded up to min limit 40
RooAbsRealLValue::inFitRange(m_ll): value 36.9141 rounded up to min limit 40
RooAbsRealLValue::inFitRange(m_ll): value 37.6172 rounded up to min limit 40

The data and PDF’s variable is “m_ll” which has been denoted to take values from 0 to 180. And I have checked that the bkg and signal PDFs are normalized to 1 for m_ll in [0,180.].

What do I miss to make the fit with a composite model within a limited range of m_ll to work?

Thank you very much and marry christmas!


Looking at previous posts, I realized that I have to use a latest version of ROOT (>5.17/04) than that I was using (5.17/02). I reinstalled ROOT and indeed the problem with inFitRange() disappears.

Now I have the problem of plotting the sum PDF over the restricted range. So what I do is :

RooAddPdf model("model","model",RooArgList(sig,bkg),RooArgList(nsig,nbkg));


The SumCoefRange() allows the normalization of the PDF over the restricted range. But when I plot the PDF overlaid with the data, I think that still the PDF is normalized to the full range. Should I also add an option to the plotOn function?


Thank you,

Hi Georgia,

Sorry for the late reply, I was away for the holidays.

Can you try to see if both problems are still there with the latest ROOT version 5.17/08.
I’ve made some changes in this area of likelihood calculations that may fix your problem.

If not, then I’ll investigate and fix things.