I’m calling Math::Minimizer with defaults parameters (ROOT::Math::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 ?
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("","");
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.