Spectator variables in minimization

I’m following the example $ROOTSYS/tutorials/fit/NumericalMinimization.C. Basically I want to do the same thing, except I need to add extra parameters to my function to be minimized. That is, there are N variables that have to be varied in my multidimensional minimization problem, and M parameters that are simply used in computing the value of the function; the M parameters are not themselves changed. Can I just add them as extra parameters to the function?

Hi,

I have not fully understood what they are the extra parameters. If they are fixed (or constant) during the minimization you can do this by doing

min->SetFixedVariable("name",value);

Otherwise you can re-espress your function to minimize by wrapping it in a function of only the parameter of interests

Best Regards

Lorenzo