How to disable mimizer warnings

Hello,

I’m calling Math::Minimizer with defaults parameters (ROOT::Math::factory::CreateMinimizer("","")) several times and I can’t suppress all the warning.
Although I use SetPrintLevel(-1), it remains a warning:

MINUIT WARNING IN HESSE
============== MATRIX FORCED POS-DEF BY ADDING 0.156855 TO DIAGONAL.
EIGENVALUES OF SECOND-DERIVATIVE MATRIX:

Is it possible to suppress it ?

Thank you,
Benoit

Hi,

SetPrintLevel(0) should suppress it and not -1. If it does not work you can try to do also (since you are using TMinuit as minimizer):

 TMinuitMinimizer * minimizer = (TMinuitMinimizer*) ROOT::Math::Factory::CreateMinimizer("","");
 minimizer->SuppressMinuitWarning(true);

Lorenzo

Hello,

Actually adding:
Int_t ierr=0;
gMinuit->mnexcm(“SET NOWarnings”,0,0,ierr);

solved the problem.

The only point is that gMinuit is only defined after the creation of the functor and not before:
ROOT::Math::Functor* functor = new ROOT::Math::Functor(this,&CreamTCALana::Chi2,2)

I didn’t know the very conveniant minimizer->SuppressMinuitWarning(true);
I’ll use it next time.

Thanks,
Ben