Fit procedure using TMinuit

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 :frowning:
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

Hello,

I would need a full log to understand the reason why Minuit does not converge. It could be a failure in running Hesse after having found the minimum. You can try maybe to use strategy zero. In that case Hesse will not be run. However, I would not be fully confident on the result of Minuit if the derivative at the minimum are not accurate.

Cheers
Lorenzo

Hello,
Thanks for your reply. I put in attachment log files with different configurations :
SET ERROR = 1 or 2
SET STRATEGY = 0 or 1

Cheers
output_STRATEGY_1_ERROR_1.txt (144 KB)
output_STRATEGY_0_ERROR_2.txt (179 KB)
output_STRATEGY_1_ERROR_2.txt (160 KB)
output_STRATEGY_0_ERROR_1.txt (152 KB)

Hi,

Thanks for the files. I don’t see any failure or problems with the results of the fit you showed to me. The errors look also fine to me.

Lorenzo