Hello fellow ROOTers, I’m using ROOT 6.12 and am having an issue with Minuit2. When running a minimization program on a set of root files the parameters will exceed the maximum allowed value specified in the SetVariableLimit and goes to nan. This only happens with two sets of root files and not a third set.
There is nothing really different between the sets except that the two sets I’m having issues with have a couple of extra branches in their TTrees.
Here is the code that initializes the fit:
void minimize()
{
string minName = "Minuit2";
string algName = "Fumili2";//changed from Fumili2
ROOT::Math::Minimizer *min =
ROOT::Math::Factory::CreateMinimizer(minName, algName);
min -> SetMaxFunctionCalls(1000);
min -> SetTolerance(1.0);
min -> SetPrintLevel(1);
ROOT::Math::Functor minWrapper(&min3, 5);//par4 = mass scale
double step[5] = {0.01, 0.01, 0.01, 0.01, 0.01};
double start[5] = {0.3, 0.3, 0.3, 0.3, 1.0};
min -> SetFunction(minWrapper);
min -> SetVariable(0, "dy" , start[0], step[0]);
min -> SetVariable(1, "jpsi", start[1], step[1]);
min -> SetVariable(2, "psip", start[2], step[2]);
min -> SetVariable(3, "jmix", start[3], step[3]);
min -> SetVariable(4, "mass scale", start[4], step[4]);
min -> SetVariableLimits(0, 0.05, 0.45);//.02to.1
min -> SetVariableLimits(1, 0.05, 0.45);
min -> SetVariableLimits(2, 0.05, 0.45);
min -> SetVariableLimits(3, 0.05, 0.45);
//min -> SetVariableLimits(4, 0.9, 1.1);
min -> SetFixedVariable(4, "mass scale", 1.0);
nF = 4;
min -> Minimize();
Any help is greatly appreciated.