Edm too large after minimization by TMinuit2

Dear experts

I’m using TMinuit2 to fit some chi2 minimum, the result of Minuit2 seems didn’t converge, as follows:

Warning in <Minuit2>: VariableMetricBuilder No improvement in line search
Warning in <Minuit2>: VariableMetricBuilder Iterations finish without convergence; Edm 8.38155e+06 Requested 2e-06
Warning in <Minuit2>: VariableMetricBuilder FunctionMinimum is invalid after second try
Warning in <Minuit2>: Minuit2Minimizer::Minimize Minimization did NOT converge, Edm is above max
Minuit2Minimizer : Invalid minimum - status = 3
FVAL  = 325.788
Edm   = 2.09539e+06
Nfcn  = 214

but when I check the residual, they were not large. Please give me some suggestions what I did wrong.

void fitting(){
ROOT::Math::Minimizer* fFit = nullptr;
//setup
fFit = ROOT::Math::Factory::CreateMinimizer("Minuit2");
fFit->SetTolerance(0.001);
fFit->SetStrategy(2);
fFit->SetMaxFunctionCalls(1e4);
step = 1e-5;
double dRho = 2.;
double dPhi = 2e-2;
double dAlpha = 2e-2;
double dTheta = 0.2;
rhoMin = rho - dRho;
rhoMax = rho + dRho;
phiMin = phi - dPhi;
phiMax = phi + dPhi;
alphaMin = alpha - dAlpha;
alphaMax = alpha + dAlpha;
thetaMin = theta - dTheta;
thetaMax = theta + dTheta;
fFit->SetVariable(0,     "rho",          rho,               step);
fFit->SetVariable(1,     "phi",          phi,               step);
fFit->SetVariable(2,     "alpha",        alpha,             step);
fFit->SetVariable(3,     "theta",        theta,             step);
fFit->SetVariableLimits(0,       rhoMin,                    rhoMax);
fFit->SetVariableLimits(1,       phiMin,                    phiMax);
fFit->SetVariableLimits(2,       alphaMin,                  alphaMax);
fFit->SetVariableLimits(3,       thetaMin,                  thetaMax);
//fitting
}

This is hard to say. However, this seems like a fit not converging and not really a problem with ROOT. If you suspect that this is not the case, could you please provide a standalone, reproducible, minimal example showing the issue?

Thanks a lot in advance!

Best,
D

I know it’s not a problem of ROOT, I’m just asking what would be the reason causing this…because the output information is not clear for me. It said Edm is too large which means final value is far from the minimum, but in the minimization process FVAL didn’t become smaller anymore.

It’s hard to simply reproduce this because it’s in a full tracking package.

Is there a way to check what caused this? Like if I can check the minimization met the boundary of parameters, or if the step is too small, etc.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.