Likelihood scan when fitting in range

Dear experts,

I am trying to plot the likelihood function from a simultaneous fit done in different ranges of the observables. The plot I obtain, however, shows the minimum at a different value than that found in the minimisation. Investigating this, I narrowed it down to a difference between a NLL variable created with and without an specified Range:

RooAbsReal *nll = model.createNLL(*dataset);

vs

RooAbsReal *nllrange = model.createNLL(*dataset, RooFit::Range(“fitrange”));

even if “fitrange” is the whole range of the observable x. Running the attached code, for example, I get the following likelihood scan.

Is this behaviour expected? I am using ROOT 6.14/04.

Many thanks in advance.

Best,
Paula

NLLScanwithRange.pdf (13.4 KB)

plotLikelihoodFitRange.cxx (2.2 KB)

1 Like

Hi @palvarezc,

I don’t see why this should happen. After all, the parameter values are inferred correctly. I added

  model.paramOn(xframe);

to the plotting and that works fine.

To answer why the NLL is shifted will need some investigation. I opened a bug report
https://sft.its.cern.ch/jira/browse/ROOT-9752

1 Like

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

Hi, thanks for reporting this.

Indeed, this pointed to a bug is the RooFit dataset classes that I fixed in the 6.28 development cycle with this PR:

Cheers,
Jonas