Home | News | Documentation | Download

<TH1F::Fit>: Abnormal termination of minimization

TH1F::Fit: Abnormal termination of minimization.Hallo,
I hope that someone can help me…I’m trying to fit a peak with the crystal ball function; this pdf fits the datas well, but I get the following error…

Warning in TH1F::Fit: Abnormal termination of minimization.
FCN=32.6432 FROM MIGRAD STATUS=FAILED 642 CALLS 643 TOTAL
EDM=0.159878 STRATEGY= 1 ERR MATRIX APPROXIMATE
EXT PARAMETER APPROXIMATE STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 alpha 8.62633e-02 2.12700e-02 -0.00000e+00 3.92745e+01
2 n 9.56316e+01 1.22705e+02 0.00000e+00 -3.13003e-01
3 Mean 2.24757e+03 3.85838e+00 -0.00000e+00 -5.80114e+00
4 Sigma 1.06142e+01 2.47732e+00 -0.00000e+00 -7.25097e+00
5 Height 4.38560e+01 2.90884e+00 -0.00000e+00 9.41320e-01

How can I solve this problem? :blush:
thanks!

Hi,

the minimization used for finding the minimum of the chi2 function used in TH1::Fit failed. Probably you started with parameter values too far away from the minimum and the minimization algorithms is stuck in a bad region of parameters, where the Hessian is not positive defined. You should try with better initial values.
If you still have a problem I would need to help you at least a complete log of the fitting (obtained with option “V”) or better the minimal program reproducing the problem

Best Regards

Lorenzo

Hey,

I fit “pol2” to two data sets and obtain a horrible fit to the data set for which the uncertainty are much smaller, although the other data set produces excellent results. I tried setting “reasonable” guesses for the fit parameters that produces the horrible fit using the estimates obtained from the “good” fit. I guess the issue stems from the machine precision based on a quick lookup of similar errors reported, but I can’t be sure that that’s the case. And so, I was hoping you could point me in the right direction, provided the problem is not characteristic of the data for the erroneous fit. Finally, I tried increasing the number of calls for the minimization, which did not improve the fit one bit. fit_log.txt (1.6 KB) I attach the log to provide you with more information.

Thanks in advance,
Craig.