Discrepancy in 2D HistFactory fit results between ROOT versions (6.28/06 vs. Nightlies) with Beeston-Barlow method activated

Dear experts,

There seems to be a significant difference in the result of my 2D histFactory fit between the most recent root release (6.28/06) and the root version that can be obtained with the ROOT nightlies. I am using ROOT nightlies to avoid the plotting issue reported here Problems plotting individual components with RooFit/HistFactory.

The inconsistency that I am now observing in fit result between different ROOT versions is only present when the fit is performed in 2D (not in 1D) with the Beeston-Barlow (BB) method activated (without BB the result in 2D also agrees between the two ROOT versions).

The final signal and background yields and, in particular, their uncertainties are different between the two ROOT versions. Furthermore, the table with constant parameters look very different. With ROOT 6.28/06 the gamma parameters in all the bins are minimised to some value different from one, however, with ROOT nightlies many of these parameters are set to be one and for the rest of the parameters the values do not agree between the two versions.

I have attached the script (“toyModel_1D_and_2D_wBB.C”) that I use to run the toy fit. It can be used to perform both a 1D and 2D fit with/without BB. More details of how to run the code can be found in the start of the script.
I have attached two text files with the printed output of the fit with the result tables included in the end of the files (“printed_output_ROOT_v6_28_06.txt” and “printed_output_ROOT_nightlies.txt”).

This piece of code here https://github.com/root-project/root/blob/90fcd0fb909376d78509354349c51324faa9f9b7/roofit/histfactory/src/HistFactoryImpl.cxx#L110C7-L118C8 seems to cause a difference (HistFactoryImpl does not exist in ROOT 6.28), as some parameters are set constant because their sigma is found to be 0. Where is this different treatment coming from?

Let me know if you need more information to understand/investigate the problem.

Cheers, Veronica

toyModel_1D_and_2D_wBB.C (18.6 KB)

printed_output_ROOT_v6_28_06.txt (304.9 KB)

printed_output_ROOT_nightlies.txt (271.4 KB)

1 Like

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

Thank you very much for finding and reporting this issue! You were on the right track with your investigation.

I have opened a PR to fix this now:

Once this is merged, you should be able to get the same results with the nightlies on the next day than with ROOT 6.28. ROOT 6.30.04 will also contain this fix.

Hi Jonas,

Great, thank you for investigating and fixing this issue. I will have a look at it with the ROOT nightlies as soon as it has been merged.

Cheers,
Veronica

I just tested it and it works. Thanks a lot for fixing it:)