Return value of TFitterMinuit


I am using the TFitterMinuit class to perform some fitting.
Most of the time, TFitterMinuit::Minimize returns 0, indicating that the fit worked fine (right ?)
Sometimes, I get return values
though, and adding some debug output to the FCN function, I see that the fit does not seem to converge in those cases.
What I am wondering is how the return codes -12, -13, -14 are defined ?
(I would like to understand the return codes, as I think they might give me a hint about why the minimization failed)

Thank you very much in advance,



All these cases corresponds to an invalid minimum. You can see this in the implementation of TFitterMinuit.cxx. This messages can be printed by increasing the print level of the class.
Here is the extract code from TFitterMinuit.cxx

      if (min.HasMadePosDefCovar() ) { 
         if (fDebug >= 1) std::cout << "      Covar was made pos def" << std::endl;
         return -11; 
      if (min.HesseFailed() ) { 
         if (fDebug >= 1) std::cout << "      Hesse is not valid" << std::endl;
         return -12; 
      if (min.IsAboveMaxEdm() ) { 
         if (fDebug >= 1) std::cout << "      Edm is above max" << std::endl;
         return -13; 
      if (min.HasReachedCallLimit() ) { 
         if (fDebug >= 1) std::cout << "      Reached call limit" << std::endl;
         return -14; 

However, I will deprecate soon this class. It implements an old interface and it is not used anymore within ROOT. You should use the Minimizer interface, which is implemented using Minuit2 by the Minuit2Minimizer class.
See … idim_minim


Dear Lorenzo,

thank you very much for the information.

I will update to Minuit2Minimizer once I have understood why in some cases my fit does not converge.

Thanks again,