Processing /mnt/build/workspace/root-makedoc-v610/rootspi/rdoc/src/v6-10-00-patches/tutorials/fit/minuit2FitBench.C...
*********************************************************************************
Minuit
*********************************************************************************
pass : 0
................... FCN=205.276 FROM MINOS STATUS=SUCCESSFUL 44 CALLS 429 TOTAL
EDM=3.83288e-10 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 5.13639e+01 2.01329e+00 -2.79418e-04 -2.05471e-06
2 p1 5.57813e+01 4.80582e+00 3.09127e-03 -9.98919e-07
3 p2 7.42112e+01 1.87041e+00 -1.20311e-03 -1.93173e-07
4 p3 4.27344e+02 2.93232e+00 -1.66243e-02 -7.80957e-07
5 p4 3.58604e-02 3.47005e-04 1.74159e-07 9.80777e-02
6 p5 1.00001e+00 1.64203e-04 1.64203e-04 3.19213e-02
Minuit, npass=20 : RT= 0.143 s, Cpu= 0.150 s
*********************************************************************************
Fumili
*********************************************************************************
pass : 0
...................
****************************************
Minimizer is Fumili
Chi2 = 206.284
NDf = 194
NCalls = 4
p0 = 51.4325 +/- 2.01397
p1 = 55.5412 +/- 4.81253
p2 = 74.2976 +/- 1.87298
p3 = 427.425 +/- 2.93868
p4 = 0.0358559 +/- 0.000357243
p5 = 1.00001 +/- 0.00016009
Fumili, npass=20 : RT= 0.110 s, Cpu= 0.110 s
*********************************************************************************
Minuit2
*********************************************************************************
pass : 0
................... FCN=205.276 FROM MINOS STATUS=SUCCESSFUL 44 CALLS 429 TOTAL
EDM=3.83269e-10 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 5.13639e+01 2.01329e+00 -2.79005e-04 -2.05485e-06
2 p1 5.57813e+01 4.80582e+00 3.09000e-03 -9.98976e-07
3 p2 7.42112e+01 1.87041e+00 -1.20265e-03 -1.93275e-07
4 p3 4.27344e+02 2.93232e+00 -1.66240e-02 -7.81330e-07
5 p4 3.58604e-02 3.47005e-04 1.74212e-07 9.80759e-02
6 p5 1.00001e+00 1.64203e-04 1.64203e-04 3.19312e-02
Minuit2, npass=20 : RT= 0.085 s, Cpu= 0.070 s
*********************************************************************************
Fumili2
*********************************************************************************
pass : 0
................... FCN=205.276 FROM MIGRAD STATUS=CONVERGED 80 CALLS 81 TOTAL
EDM=3.83286e-10 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 5.13639e+01 2.01329e+00 7.31976e-03 -1.46942e-05
2 p1 5.57813e+01 4.80581e+00 6.46914e-03 -2.29134e-05
3 p2 7.42112e+01 1.87041e+00 3.07394e-03 -4.93424e-05
4 p3 4.27344e+02 2.93229e+00 1.93002e-02 3.51522e-06
5 p4 3.58604e-02 3.47000e-04 2.28169e-06 -2.91891e-02
6 p5 1.00001e+00 1.64202e-04 1.14962e-06 -6.76321e-02
Fumili2, npass=20 : RT= 0.085 s, Cpu= 0.080 s
(int) 0
return par[0] + par[1]*x[0] + par[2]*x[0]*x[0];
}
TMath::Max( 1.e-10,(x[0]-par[2])*(x[0]-par[2]) + .25*par[1]*par[1]);
}
return background(x,par) + lorentzianPeak(x,&par[3]);
}
printf("\n*********************************************************************************\n");
printf("\t %s \n",fitter);
printf("*********************************************************************************\n");
std::string title = std::string(fitter) + " fit bench";
histo =
new TH1D(fitter,title.c_str(),200,0,3);
bool ok = true;
if (pass%100 == 0) printf("pass : %d\n",pass);
else printf(".");
for (
Int_t i=0;i<5000;i++) {
}
int iret = histo->
Fit(fitFcn,
"Q0");
ok &= (iret == 0);
if (iret!=0)
Error(
"DoFit",
"Fit pass %d failed !",pass);
}
if (!fitterType.Contains("Fumili"))
else
gPad->SetFillColor(kYellow-10);
printf(
"%s, npass=%d : RT=%7.3f s, Cpu=%7.3f s\n",fitter,npass,timer.
RealTime(),cputime);
p->Draw();
p->SetTextColor(kRed+3);
p->SetFillColor(kYellow-8);
return ok;
}
int minuit2FitBench(
Int_t npass=20) {
bool ok = true;
return (ok) ? 0 : 1;
}