Home | News | Documentation | Download

Different fit results depending on ROOT version

Dear ROOT Support,

 I am getting quite different results when I use different versions of ROOT (specifically I am comparing versions 5.30.01 and 5.34.18) to fit a series of points using user defined functions. There are no random numbers involved and the parameters of the fitted functions are set before starting the fitting. Since the function I am interested in is a ratio of the fitted functions, the final answer varies a lot depending on the version.

I attach the results of four fits obtained with these two versions.

Thank you very much,

Lluïsa-Maria Mir

Result fit version 5.30:
FCN=10.5114 FROM MIGRAD STATUS=CONVERGED 188 CALLS 189 TOTAL
EDM=1.53445e-06 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 4.28200e-01 4.21612e-03 6.01480e-06 3.09649e-02
2 p1 2.95590e+01 1.33022e-01 1.70666e-04 -1.13795e-02
3 p2 3.50694e+00 2.06480e-01 1.89755e-04 8.79147e-03
4 p3 -1.89518e-03 2.10370e-03 2.10718e-06 3.14785e-02
FCN=33.2822 FROM MIGRAD STATUS=CONVERGED 272 CALLS 273 TOTAL
EDM=5.97285e-07 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 4.34949e-01 3.12550e-03 8.38926e-06 -2.27878e-02
2 p1 2.95035e+01 1.46769e-01 3.18666e-04 1.03219e-03
3 p2 3.35821e+00 2.02380e-01 4.36793e-04 -6.26310e-04
4 p3 4.31720e-04 6.87747e-04 1.89047e-06 -1.62217e+00
FCN=15.2701 FROM MIGRAD STATUS=CONVERGED 180 CALLS 181 TOTAL
EDM=6.92992e-10 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 3.04633e-01 5.02138e-03 1.90110e-06 1.98902e-02
2 p1 2.92176e+01 1.27168e-01 1.51640e-04 1.71361e-05
3 p2 1.58829e+00 1.65177e-01 5.34903e-05 -4.93301e-04
4 p3 4.03695e-01 4.24421e-03 2.50380e-06 -5.92528e-03
FCN=54.5345 FROM MIGRAD STATUS=CONVERGED 571 CALLS 572 TOTAL
EDM=2.32376e-09 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 2.93572e-01 3.20097e-03 1.67422e-06 -8.34153e-02
2 p1 2.90771e+01 1.00317e-01 2.68336e-04 -7.35937e-04
3 p2 1.07134e+00 1.28410e-01 6.57540e-05 2.07551e-03
4 p3 4.22678e-01 3.03188e-03 2.40535e-06 4.72495e-02

Result fit version 5.34:
FCN=5.59966 FROM MIGRAD STATUS=CONVERGED 634 CALLS 635 TOTAL
EDM=1.15133e-08 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 4.29939e-01 4.43409e-03 5.04147e-06 1.03256e-02
2 p1 2.99867e+01 6.16544e-01 5.72533e-04 2.86150e-04
3 p2 3.87209e+00 8.39471e-01 4.21262e-04 -1.87152e-04
4 p3 -4.71541e-04 1.27028e-03 7.15028e-07 -4.98167e-02
FCN=6.66434 FROM MIGRAD STATUS=CONVERGED 521 CALLS 522 TOTAL
EDM=8.57748e-08 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 4.38657e-01 3.21688e-03 4.09106e-06 6.81716e-02
2 p1 3.01343e+01 4.73452e-01 5.83291e-04 -2.58046e-04
3 p2 3.95941e+00 6.06292e-01 5.39098e-04 -4.33914e-04
4 p3 1.45770e-04 1.44423e-03 1.20503e-06 -2.71034e-01
FCN=7.97357 FROM MIGRAD STATUS=CONVERGED 194 CALLS 195 TOTAL
EDM=2.87648e-07 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 2.94811e-01 7.41518e-03 3.92089e-06 -8.92265e-03
2 p1 2.94033e+01 4.68338e-01 5.45125e-04 -1.19489e-03
3 p2 1.26040e+00 3.31219e-01 1.50790e-04 -6.51364e-04
4 p3 4.15759e-01 6.19198e-03 5.57059e-06 -6.06043e-02
FCN=15.0046 FROM MIGRAD STATUS=CONVERGED 447 CALLS 448 TOTAL
EDM=2.30393e-09 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 3.02429e-01 7.26848e-03 5.25862e-06 -6.74100e-04
2 p1 2.94925e+01 4.72808e-01 7.25775e-04 -3.12319e-05
3 p2 1.38165e+00 3.26020e-01 2.12258e-04 2.18800e-04
4 p3 4.22231e-01 6.28783e-03 7.48109e-06 1.60846e-02

Could you post the shortest possible script and file(s) reproducing this problem?
Lorenzo will investigate next week

Rene

Thanks for your fast answer. I attach the script draw_fits_tau_1.cxx, which needs ll-pilar.c. No ROOT input files are needed.

Best regards,

Lluïsa-M.
ll-pilar.c (21.8 KB)
draw_fits_tau_1.cxx (27.2 KB)

Hi,
There was a bug in the old ROOT version, see

TGraphAsymm x-Errors in pol fit?

The error on the x coordinates was not considered in these old fit. If you add the option “EX0” (0 error in x) when fitting with the 5.34 version, you will get the same result as the 5.30 version

Best Regards

Lorenzo

Thank you very much!
Ll.M.