createNLL() vs minNll()

Dear experts,

I have to extract the minimum value of the likelihood after a fit.

I can do it in two ways:

  1. use RooFitResult::minNll()
  2. use RooAbsPdf::createNLL() and then get its value.

This two give a different result… can anyone tell me why?

I also checked that the parameters are the ones at minimum by
params = pdf->getParameters()
and then
nll->getVal(*params)
And I get same result as with empty getVal().

Any help would be very appreciated.

Cheers,
Luca

Hi,
They should return the same values, if you have the same parameters stored in FitResult when you evaluate the nll.
One thing that could cause the difference, is that you are using some particular options when creating the NLL or when using RooAbsPdf::fitTo. You should make sure you are using the same options.

Otherwise, please post your workspace with the model and the data so the problem can be reproduced and investigated

Lorenzo