What do the fit status mean?

After fitting some function to some data one can retrieve the fit status via, e.g.

r = hSpectrumCalibration->Fit(f1, "R0MS");
status = r->Status();

But what do those values of status actually mean?
So far I belive 0 is CONVERGED, negative values are FAILED and 4000 is OK.

But I could not find any information in the documentation [1] on that, beside other people asking for the same thing a year ago [2].

[1] https://root.cern.ch/root/html600ROOT__Fit__FitResult.html#ROOT__Fit__FitResult:Status
[2] Fit status documentation

1 Like

I think it depends on the minimizer algorithm used, that’s why the documentation doesn’t explicitly say what the different values mean.

You can use IsValid() to get a boolean yes/no, otherwise you’ll have to dig into the specific minimizer algorithm.

Edit: I just tried to look for that information for TMinuit and the Linear fitter, but I didn’t get very far.

1 Like