ROOT::Math::Minimizer turn messages off

Hello,

I’m using ROOT::Math::Minimizer as discribed here to do a serie of function fitting (over 600k), minimizing the Chi-Square.
Doing the fits I have several warning messages that I can’t turn off. These are:
[ul]Info in : Minuit2Minimizer::Minimize : Minimization did NOT converge, Edm is above max
Info in : Minuit2Minimizer::Minimize : Covar was made pos def
[/ul]

ROOT::Minuit2::Minuit2Minimizer* min = new ROOT::Minuit2::Minuit2Minimizer( ROOT::Minuit2::kMigrad ); min->SetMaxFunctionCalls(1000); min->SetMaxIterations(500); min->SetTolerance(0.1); min->SetPrintLevel(-1 ); // I would expect this to turn off all warnings

Does someone was any idea why this is not working?

Also the same routine works fine when using TGraphs but the results are not the same, don’t know why.

Thanks

HI,

Strange, these messages should be not appear when using PrintLevel(0). Which ROOT version are you using, one of the latest ?
Otherwise you can try changing the overall ROOT error level:

gErrorIgnoreLevel=kWarning;

Best Regards

Lorenzo

Hi, I’m having the same problem. I’ve both specified gErrorIgnoreLevel=kWarning and myMinuit2Minimizer->SetPrintLevel(-1) in my code, but it is continuing to print out "Info in " statements. Is there anything else I can try?

Strange. Which version of ROOT are you using ? Are you using the Minuit2 library built together with ROOT ?

Lorenzo

I’m using 5.32.01 and my code is being compiled and run as a ROOTCORE package. I believe the Minuit2 library is being handled by the rootcore makefile: I set the option PACKAGE_BINFLAGS = -lMinuit2

Hi,

I do not understand these options. Are you part of one experiment (Atlas ? ) and using a ROOT and Minuit2 built separatly by the experiment. If this is the case, Minuit2 should be compiled with the options
-DWARNINGMSG -DUSE_ROOT_ERROR

This is done when building Minuit2 inside ROOT. If it is not done, then gErrorIgnoreLevel=kWarning will not have any effect and also min->SetPrintLevel(0) due to a bug when -DUSE_ROOT_ERROR is not defined

Best Regards

Lorenzo