As part of a larger project I’m trying to learn how to fit using my own minimization function. As a starting point I’m simply trying to duplicate the chi2 fitting results of fitting a simple gaussian to a histogram, by using the method described in tutorials/fit/fit2dHist.C which seemed simple enough.
However, try as I might, I can not get the method to work. Migrad reports that the minimization has converged, but the parameters resulting from the minimization are exactly my seed parameters and the errors are all nan.
Please find my simple script attached. It can be run interactively via .x simpleSimFit.C+
I believe that I have duplicated the relevant parts of tutorials/fit/fit2dHist.C faithfully…
Thanks for any help.
simpleSimFit.C (2.67 KB)