Hello,
When I fit my data (the script and the resulted plot are attached) I observe some strange results (inconsistencies) between ML and Chi2 fits.
The figure “fit.eps” was obtained by running the script with
$ python fit_test.py --events=1000
It shows good ML-fit results (red curve/stats) and that the chi2-fit (blue curve/stats) failed.
The number of generated events really does not matter, the chi2 fit never converges. Why? What is wrong?
The Chi2-fit was done like this:
chi2 = ROOT.RooChi2Var("chi2","chi2",fit_func,data,ROOT.RooFit.DataError(ROOT.RooAbsData.SumW2))
m = ROOT.RooMinuit(chi2)
m.migrad()
m.minos()
ROOT version 5.26/00 with RooFit 3.12.
Thanks a lot in advance,
Alexander.
fit.pdf (17.9 KB)
fit_test.py (9.63 KB)