I have encountered a “bug” in RooBinSamplingPdf introduced in root version 6.26
When I minimise a RooBinSamplingPdf I get the following error:
[#0] WARNING:Eval -- Evaluating RooAddPdf without a defined normalization set. This can lead to ambiguos coefficients definition and incorrect results. Use RooAddPdf::fixCoefNormalization(nset) to provide a normalization set for defining uniquely RooAddPdf coefficients!
This error does not occur in version 6.24.06.
I have attached a root program that works in 6.24 and fails inversion 6.26 as well as the log of the output.
This change is also backwards compatible with older ROOT versions.
I don’t think in your script, the evaluation without defined normalization set lead to wrong results, because even if I add the fixCoefNormalization call to the script, the result doesn’t change. But it’s still better to put it to make sure the computation is well defined and you get rid of the warnings.
I hope this helps, and sorry for the inconvenience from printing out this new warning in 6.26!
It did make an enormous difference when working with RooBinSamplingPdf. Without it the fit was not converging and the pulls were awful in 26.10 where it worked with 24.06. So the change is more than just a warning in this case…
I would like to note that this does not appear in any of the tutorials and I find the documentation here to be confusing and couldn’t work out how to actually implement the required fix to the problem from the error message or the RooAddPdf page.
Okay, if for 6.26 the fit result was right and for 6.24 it was wrong, then it’s a bug indeed.
I understand, this new error message is confusing and it’s not good that it happens. I’m trying to improve the RooFit internals such that an evaluation without normalization set of a RooAddPdf can’t happen to begin with, and then you will also not see the error anymore.
If you have a moment to do me a favor, can you try it out if it actually works for your usecase? If you are on lxplus, you can just source the current ROOT master from the nightlies and try out your scripts: Nightlies - ROOT.
If you don’t have access to lxplus and also not the time to compile ROOT master to try it, no worries!