Hi,
I want to get the status of a fit in a macro.
For this I do something like:
Int_t a=h1->Fit(…) //h1 is a histogramm
But sometimes I get a==0 but the status of the fit displayed in the fit window
says “PROBLEMS”…
One easy way to repeat this is to execute
root -l fithist.C //fithist.C from $ROOTSYS/tutorials
then I do:
root [1] Int_t a=result->Fit(“pol2”,“EL”)
FCN=2311.41 FROM MINOS STATUS=PROBLEMS 395 CALLS 537 TOTAL
EDM=9.18344e-09 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER PARABOLIC MINOS ERRORS
NO. NAME VALUE ERROR NEGATIVE POSITIVE
1 p0 1.67396e+02 3.10162e+00 -3.52239e+00 3.55481e+00
2 p1 7.49519e+00 1.10687e+00 1.33677e+00
3 p2 -2.55591e+00 8.98743e-02 1.08404e-01
root [2] cout<<“fitresult :”<<a<<endl;
fitresult :0
How can I be shure that a fit was really successful ?
Marcus