Hi ROOT expert,
I’m fitting a lot (~100) of histograms in a single macro. I have two different problems:
I Get a lot (thousand) of the following errors
FUNCTION VALUE DOES NOT SEEM TO DEPEND ON ANY OF THE 4 VARIABLE PARAMETERS.
VERIFY THAT STEP SIZES ARE BIG ENOUGH AND CHECK FCN LOGIC.
this floods my output and it’s very annoying. How can I suppress them?
I cannot printout the detailedfit results of every fit, but I’d like to know if some of them has aSTATUS = FAILED, CALL LIMIT or NOT POS DEF. How can I retrieve it? I’m not finding too useful this printout
TFitResultPtr r = hist->Fit("func","MRLSQ");
cout<<"Fit Status: "<<r->Status()<<endl;
Bonus (hard) question:
sometimes I get a call limits, to avoid this I have increased the default number to
Normally you switch off all printing in TMinuit, when using from TH1::Fit by doing ROOT::Math::MinimizerOptions::SetDefaultPrintLevel(-1)
however those messages cannot be switched off. They can be serious and maybe it is worth understand their origin.
Otherwise they are coming from using as minimiser engine Improve or Simplex. These methods are found not too be very effective, so I would eventually avoid using them. If you find that you really need them, please let me know and it would be great if you can post an example where you show these are useful
For getting the status you can both check FitResult::Status() but also FitResult::CovMatrixStatus()
which has the meaning:
/// using Minuit convention : =0 not calculated, =1 approximated, =2 made pos def , =3 accurate