Fit option Q ignored by Minos

Hi,

I’ve noticed that when using the fit option “E” to invoke Minos the verbosity level does not agree when the “Q” option is specified. Specifically a warning message about fixed parameters. The following is some example code:

TH1F *hist = new TH1F("hist","Hist",100,-1,1); hist->FillRandom("gaus"); TF1 *fit = new TF1("gaussFit","gaus"); fit->FixParameter(1,0); hist->Fit(fit,"EQ");
Which then results in the following message:

 PARAMETER NUMBER   2 NOT A VARIABLE. IGNORED.
 THERE ARE NO MINOS ERRORS TO CALCULATE.

Why is the “Q” option not suppressing this output? It is very bothersome when a fit is performed in a loop with multiple fixed parameters.

Thanks

Any suggestions on how to suppress these messages?

Still no suggestions?

Hi,

It is a problem in the code. I will commit now a fix for the 5.34 branch.
If you want to suppress the message with the current version, you can do this only by commenting out the relevant lines in TMinuit.cxx.
Or, better, you can use Minuit2 (the new version of Minuit). It will not print this message. To use it just add the line in your macro

 ROOT::Math::MinimizerOptions::SetDefaultMinimizer("Minuit2");

Best Regards

Lorenzo