Hi Rooters,
I am testing TMinuit using a fit procedure quite complicated, minimizing a Chi2 with covariance matrices (SUM : parameter[i]*CovMat[i] ) depending on the fit parameters. To test the fitting procedure I tried to fit over a long range of “input parameters” : the fit is in general converging but in some cases not
Then I tried to play on Minuit parameters : tolerance, Eps (“SET EPS”) and some couple is working fine, some, not really.
Each time, the “mean value” is fine, and very close to the expected result but the errors can be really large (even is the fit is converging --> MIGRAD : command executed normally and full accurate covariance matrix).
Here is the part of the code related to the minimization :
TMinuit *gMinuit = new TMinuit(Neinc); //initialize TMinuit with a maximum of Neinc=50 params
gMinuit->SetFCN(Ki2);
gMinuit->SetPrintLevel(-1);
// -- Set strategy:
*arglist = 1.0;
gMinuit->mnexcm("SET STR", arglist, 1, ierflg);
arglist[0] = 1;
gMinuit->mnexcm("SET ERR", arglist ,1,ierflg);
arglist[0] = eps;
if(eps>0)
gMinuit->mnexcm("SET EPS", arglist ,1,ierflg);
arglist[0] = 1000000;
arglist[1] = tol; // tolerance
arggrad[0]=1;
gMinuit->mnexcm("MINIMIZE" , arglist ,2,ierflg);
if (3 == istat)
{
gMinuit->mnexcm("HESSE",arglist, 0,ierflg);
}
What makes that Migrad failed even if the values seems to be close to what the fitter should find. Is there some “methods/tools” to force Migrad to converge even if the derivative is not accurate.
Thanks for your help,
Cheers