When running some old code, someone just pointed out to me that the MINOS error calculation appears to be failing when calculating asymmetric errors for the last defined free parameter. To check this I wrote the attached macro. To reproduce the error, simply run the macro, which does the following:
- fills a histogram with normally distributed data
- calls TH1::Fit with MINOS and produces results as expected
- using TMinuit and the standard fcn interface: void fcn(int& npar, double* deriv, double& f, double par[], int flag), repeat the steps in TH1::Fit as closely as I can determine that they are done.
The fit results are identical. However, when calling MINOS via TMinuit, it always fails to calculate the error for the 3rd (and last) parameter in this eample. We have verified this in multiple examples. The same result occurs when using the Tfitter interface. I have verified that this issue is not present using TMinuit2.
Is a subtle form of pilot error?
summary from the attached example:
h->Fit("gaus","EV");
...
FCN=42.9671 FROM MINOS STATUS=SUCCESSFUL 21 CALLS 146 TOTAL
EDM=3.17954e-11 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER PARABOLIC MINOS ERRORS
NO. NAME VALUE ERROR NEGATIVE POSITIVE
1 Constant 1.19083e+02 2.71785e+00 -2.70871e+00 2.72698e+00
2 Mean 5.65600e-04 1.84165e-02 -1.84208e-02 1.84177e-02
3 Sigma 9.92197e-01 1.36373e-02 -1.36602e-02 1.36186e-02
PARAMETER CORRELATION COEFFICIENTS
NO. GLOBAL 1 2 3
1 0.59226 1.000 -0.026 -0.592
2 0.04351 -0.026 1.000 0.044
3 0.59294 -0.592 0.044 1.000
FCN=42.9671 FROM MINOS STATUS=SUCCESSFUL 21 CALLS 146 TOTAL
EDM=3.17954e-11 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER PARABOLIC MINOS ERRORS
NO. NAME VALUE ERROR NEGATIVE POSITIVE
1 Constant 1.19083e+02 2.71785e+00 -2.70871e+00 2.72698e+00
2 Mean 5.65600e-04 1.84165e-02 -1.84208e-02 1.84177e-02
3 Sigma 9.92197e-01 1.36373e-02 -1.36602e-02 1.36186e-02
Compare to:
minuit.Command("MIGRAD 1345 0.01");
minuit.Command("HESSE 1345");
minuit.Command("MINOS 1345 1");
minuit.Command("MINOS 1345 2");
minuit.Command("MINOS 1345 3");
...
MINUIT WARNING IN MNCROS
============== Cannot find slope of the right sign
POSITIVE MINOS ERROR NOT CALCULATED FOR PARAMETER 3
**************************************************************************
DETERMINATION OF NEGATIVE MINOS ERROR FOR PARAMETER 3 sig
PARAMETER 3 SET TO 9.922e-01 + -1.364e-02 = 9.786e-01
MINUIT WARNING IN MIGRAD
============== STARTING MATRIX NOT POS-DEFINITE.
MIGRAD TERMINATED WITHOUT CONVERGENCE.
FCN=43.5101 FROM MIGRAD STATUS=FAILED 8 CALLS 259 TOTAL
EDM=-0.62326 STRATEGY= 0 NO ERROR MATRIX
EXT PARAMETER CURRENT GUESS STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 A 1.20693e+02 9.26202e-01 -0.00000e+00 6.71774e-01
2 mu -2.38636e-04 2.27789e-03 0.00000e+00 -4.88028e+00
3 sig 9.78556e-01 fixed
NEGATIVE MINOS ERROR NOT CALCULATED FOR PARAMETER 3
...
FCN=42.9671 FROM MINOS STATUS=FAILURE 111 CALLS 259 TOTAL
EDM=1.5922e-07 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER PARABOLIC MINOS ERRORS
NO. NAME VALUE ERROR NEGATIVE POSITIVE
1 A 1.19084e+02 2.71787e+00 -2.19085e+00 2.18892e+00
2 mu 5.62792e-04 1.84165e-02 -1.83911e-02 1.84105e-02
3 sig 9.92193e-01 1.36375e-02
_ROOT Version: 6.18/04
_Platform: Linux
_Compiler: gcc version 9.2.1
testTMinuit.C (2.1 KB)