# Minimization with fixed parameters

Hi all,

within ROOT 5.26, I have set up a minimizer using the following commands :
ROOT::Math::Minimizer* min = 0;
min = ROOT::Math::CreateMinimizer(“Minuit2”,“Combined”);
fFunc = new ROOT::Math::Functor (this,&VJetEstimation::LikelihoodFunct,7);
min->SetFunction(*fFunc);
min->SetFixedVariable(0,“first name”,1);

min->SetVariable(6,“last name”,0.5);
min->Minimize();
min->Hesse();
//min->Minos();

``````const double *param = min->X();
const double *err  = min->Errors();
``````

I declare the functor as a function of 7 parameters but in fact, some of them are just indexes used to choose among several options (different mathematical expressions in fact). Therefore they are used as “min->SetFixedVariable” but when I cout their value (*param) and their associated errors (*err), I see that the error is always assign to 10% of the parameter value. Then, I would to know if the fact that I use this way to specify some fixed parameters affects the minimization of my function and the calculation of the errors on the “real” free parameters of my function.

Hi,

Thank you for your report. There is a problem in the printout after the minimization when the parameter is fixed. This internal error value which is not relevant should not be printed and you can ignore it and it has no influence on the result.
I will fix it in the ROOT trunk.

Best Regards

Lorenzo

Thanks for the prompt reply and fix.

Cheers,

Y.

This should be fixed now in svn, after revision 33277
Thank you for reporting this problem,

Lorenzo