I’m trying to do a fit to a turn-on curve by using TMath:ERF. This works pretty well, however I have one turn-on curve where the fit is not working at all. This is what I get:
root [13] to_all->Fit(“fit”)
Warning in TH1F::Fit: Abnormal termination of minimization.
FCN=nan FROM MIGRAD STATUS=CALL LIMIT 5010 CALLS 5011 TOTAL
EDM=nan STRATEGY= 1 NO ERROR MATRIX
EXT PARAMETER CURRENT GUESS STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 nan 4.80000e+00 nan nan
2 p1 nan 2.40000e-01 nan nan
3 p2 nan 2.10000e-01 nan nan
(Int_t)4
Warning in TCanvas::ResizePad: Inf/NaN propagated to the pad. Check drawn objects.
Warning in TCanvas::ResizePad: c1 height changed from 0 to 10
The data points look OK, but I have no idea how to proceed and find the error. I’m assuming that something in the histogram give Minuit a headache, but I don’t know what.
the macro which you’ve just posted works fine with me - but only if you comment out the last line. However the last line “to_all->Fit(“fit3”);” leads to this funny error message which I don’t understand. … Do you want anothe histogram file which looks the same and which works?