[ROOT] fit: STATUS=RESET

From: Schaefer Martina (SMartina@gmx.de)
Date: Mon Dec 01 2003 - 10:38:59 MET


Hello,

I'm doing an unbinned fit in a tree.
Sometimes I'm getting STATUS=RESET and not STATUS=CONVERGED, can anybody 
tell me, what STATUS=RESET is meaning, I didn't found it on the root or 
minuit pages on the web.

Thanks,
		Martina


(As you can see in the following lines, I'm doing a loop - for some i I 
got convergence, for others RESET. Everytime I'm doing first a binned 
fit with the h_help to get initial parameters. When I get "RESET" as 
output, root doesn't try to fit, it just takes the parametres of the 
binned fit,...)

TF1 *f2 = new TF1("f2","[0]*(3/8*(1+x*x)+[1]*x)",-0.95,0.95);
TF1 *f2u = new TF1("f2u","[0]*(3/8*(1+x*x)+[1]*x)",-0.95,0.95);
Double_t PAR[2];
TH1D *h_help = new TH1D("h_help","h_help",25,-1.1,1.1);


//t_cos is a TBranch of a tree
for(int i=1;i<=5;i++){
	f2->SetLineColor(1);
	j=2*i-5;//defined befor as Int_t
	k=j-2;//same
	//M and delta are defined above
	sprintf(sss,"t_mass <= %f+(%i*%f) && t_mass > %f+(%i*%f) &&            	 
t_cos >-1.1 && t_cos <= 1.1 ",M,j,delta,M,k,delta); 		
	sprintf(ss,"t_mass <= %f+(%i*%f) && t_mass > %f+(%i*%f)
		",M,j,delta,M,k,delta);
	t_theta->Draw("t_cos >> h_help",sss);
	h_help->Fit("f2","R");
	f2->GetParameters(&PAR[0]);
	cout<<"histo : "<<PAR[0]<<" "<<PAR[1]<<endl<<endl;
	f2u->SetParLimits(0,1,1);
	f2u->SetParameters(&PAR[0]);
	t_theta->UnbinnedFit("f2u","t_cos",ss);
	f2u->GetParameters(&PAR[0]);
	f2u->SetLineColor(i+1);
	f2u->Draw("same");
	cout<<"unbinned : "<<PAR[0]<<" "<<PAR[1]<<endl<<endl;
}


output:

  FCN=39.7616 FROM MIGRAD    STATUS=CONVERGED      35 CALLS          36 
TOTAL
                      EDM=4.75254e-17    STRATEGY= 1      ERROR MATRIX 
ACCURATE
   EXT PARAMETER                                   STEP         FIRST
   NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE
    1  p0           1.99509e+01   1.14194e+00   3.55991e-03   9.97977e-12
    2  p1          -3.37357e-02   5.17265e-02   1.61256e-04  -1.88480e-07
histo : 19.9509 -0.0337357

  FCN=0 FROM MIGrad      STATUS=RESET           0 CALLS           0 TOTAL
                      EDM= unknown      STRATEGY= 1      NO ERROR MATRIX
   EXT PARAMETER               CURRENT GUESS      PHYSICAL LIMITS
   NO.   NAME      VALUE            ERROR       NEGATIVE      POSITIVE
    1  p0           1.99509e+01     fixed
    2  p1          -3.37357e-02   constant
unbinned : 19.9509 -0.0337357

-- 
----
Martina Schaefer     SMartina@gmx.de
"Le risque est comme le sel, il en faut, mais pas trop!"



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:17 MET