TH1::Fit uses of Minuit

I would like to use TH1::Fit to replicate some results that I got from mn_fit. When running “mini” in the mn_fit program it does a simplex followed by a simple migrad. It seems that the default behaviour of TH1::Fit is different than this. Is there an easy way to get the Fit method to use the same prescription that is in mn_fit?

Lorenzo will process this mail once he will be back next week.



if you are using the latest ROOT version (5.21.04) you can simply add the following line, before calling TH1::Fit


You can also do this by using the new GUI Fit panel, by selecting “Combined” in the Minimization tab.



Is this available in root version 5.12?


With an old version of ROOT, you can use the TVirtualFitter class.
After having called TH1::Fit one time (which by default uses Migrad), you can do the following:

TVirtualFitter * fitter = TVirtualFitter::GetFitter();
double arg[2];
arg[0] =  TVirtualFitter::GetMaxIterations();
arg[1] =  TVirtualFitter::GetPrecision();