I’m trying to perform a binned maximum likelihood fit on the same dataset using the standard RooFit configuration and HistFactory. You can find attached a small script with two workspaces in order to reproduce the results. The results of the two fits are almost identical (there are small differences but I ignore the source, since the two datasets are identical), but when plotting, the signal distribution changes dramatically. The one with standard RooFit looks ok, but the one obtained with HistFactory is clearly wrong. The central value is much higher and the error is too small. I’ve tried to modify the script in such a way to normalize the signal component to the number of fitted signal events (Nsig in the script) and the result looks ok-ish for the central value (but it’s a bit above the one with RooFit) but the error is still wrong. Is there a dirrefent behavior with HistFactory? Am I doing something wrong?
I am using RooFit v3.60 with python 3.6.11.
You can run the examples with
python fitter_debug.py workspace_xx.root