ROOT   Reference Guide
rf601_intminuit.C File Reference

## Detailed Description

Likelihood and minimization: interactive minimization with MINUIT

␛[1mRooFit v3.60 -- Developed by Wouter Verkerke and David Kirkby␛[0m
Copyright (C) 2000-2013 NIKHEF, University of California & Stanford University
[#0] WARNING:Minization -- RooMinimizerFcn::synchronize: WARNING: no initial error estimate available for frac: using 0.1
[#0] WARNING:Minization -- RooMinimizerFcn::synchronize: WARNING: no initial error estimate available for sigma_g2: using 0.3
**********
** 1 **SET PRINT 1
**********
**********
**********
PARAMETER DEFINITIONS:
NO. NAME VALUE STEP SIZE LIMITS
1 frac 5.00000e-01 1.00000e-01 0.00000e+00 1.00000e+00
2 sigma_g2 4.00000e+00 3.00000e-01 3.00000e+00 6.00000e+00
**********
** 3 **SET ERR 0.5
**********
**********
** 4 **SET PRINT 1
**********
**********
** 5 **SET STR 1
**********
NOW USING STRATEGY 1: TRY TO BALANCE SPEED AGAINST RELIABILITY
**********
**********
FIRST CALL TO USER FUNCTION AT NEW START POINT, WITH IFLAG=4.
prevFCN = 2660.220684 START MIGRAD MINIMIZATION. STRATEGY 1. CONVERGENCE WHEN EDM .LT. 1.00e-03
frac=0.5025,
prevFCN = 2660.192625 frac=0.4975,
prevFCN = 2660.249627 frac=0.5, sigma_g2=4.008,
prevFCN = 2660.261352 sigma_g2=3.992,
prevFCN = 2660.182671 sigma_g2=4.005,
prevFCN = 2660.248509 sigma_g2=3.995,
prevFCN = 2660.194128 FCN=2660.22 FROM MIGRAD STATUS=INITIATE 6 CALLS 7 TOTAL
EDM= unknown STRATEGY= 1 NO ERROR MATRIX
EXT PARAMETER CURRENT GUESS STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 frac 5.00000e-01 1.00000e-01 2.01358e-01 -5.61980e+00
2 sigma_g2 4.00000e+00 3.00000e-01 2.14402e-01 7.28535e+00
ERR DEF= 0.5
frac=0.5812, sigma_g2=3.889,
prevFCN = 2660.146981 frac=0.5429, sigma_g2=3.941,
prevFCN = 2659.83839 frac=0.5459,
prevFCN = 2659.836693 frac=0.5398,
prevFCN = 2659.84135 frac=0.5429, sigma_g2=3.946,
prevFCN = 2659.835034 sigma_g2=3.936,
prevFCN = 2659.842918 frac=0.5497, sigma_g2=3.955,
prevFCN = 2659.823248 frac=0.5767, sigma_g2=4.011,
prevFCN = 2659.774616 frac=0.6313, sigma_g2=4.128,
prevFCN = 2659.739139 frac=0.6266, sigma_g2=4.117,
prevFCN = 2659.738319 frac=0.6296,
prevFCN = 2659.740342 frac=0.6237,
prevFCN = 2659.73797 frac=0.6266, sigma_g2=4.123,
prevFCN = 2659.737996 sigma_g2=4.112,
prevFCN = 2659.739642 frac=0.6227, sigma_g2=4.114,
prevFCN = 2659.737958 frac=0.6236, sigma_g2=4.115,
prevFCN = 2659.737923 frac=0.6262,
prevFCN = 2659.738617 frac=0.621,
prevFCN = 2659.738491 frac=0.6236, sigma_g2=4.121,
prevFCN = 2659.738401 sigma_g2=4.108,
prevFCN = 2659.738723 MIGRAD MINIMIZATION HAS CONVERGED.
MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
sigma_g2=4.115,
prevFCN = 2659.737923 frac=0.6262,
prevFCN = 2659.738617 frac=0.621,
prevFCN = 2659.738491 frac=0.6236, sigma_g2=4.121,
prevFCN = 2659.738401 sigma_g2=4.108,
prevFCN = 2659.738723 frac=0.6241, sigma_g2=4.115,
prevFCN = 2659.737961 frac=0.6231,
prevFCN = 2659.737935 frac=0.6236, sigma_g2=4.116,
prevFCN = 2659.737916 sigma_g2=4.113,
prevFCN = 2659.73798 frac=0.6262, sigma_g2=4.121,
prevFCN = 2659.73795 COVARIANCE MATRIX CALCULATED SUCCESSFULLY
FCN=2659.74 FROM MIGRAD STATUS=CONVERGED 36 CALLS 37 TOTAL
EDM=4.79486e-05 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 frac 6.23602e-01 1.63964e-01 5.29496e-03 1.18897e-02
2 sigma_g2 4.11458e+00 4.05024e-01 4.37113e-03 -3.67164e-02
ERR DEF= 0.5
EXTERNAL ERROR MATRIX. NDIM= 25 NPAR= 2 ERR DEF=0.5
2.798e-02 6.194e-02
6.194e-02 1.685e-01
PARAMETER CORRELATION COEFFICIENTS
NO. GLOBAL 1 2
1 0.90205 1.000 0.902
2 0.90205 0.902 1.000
frac=0.6236, sigma_g2=4.115, 1) RooRealVar:: frac = 0.6236 +/- 0.164
2) RooRealVar:: mean = 0
3) RooRealVar:: sigma_g1 = 3
4) RooRealVar:: sigma_g2 = 4.115 +/- 0.405
**********
** 7 **SET ERR 0.5
**********
**********
** 8 **SET PRINT 1
**********
**********
** 9 **HESSE 1000
**********
COVARIANCE MATRIX CALCULATED SUCCESSFULLY
FCN=2659.74 FROM HESSE STATUS=OK 10 CALLS 47 TOTAL
EDM=4.80672e-05 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER INTERNAL INTERNAL
NO. NAME VALUE ERROR STEP SIZE VALUE
1 frac 6.23602e-01 1.64221e-01 1.05899e-03 2.49794e-01
2 sigma_g2 4.11458e+00 4.05667e-01 8.74227e-04 -2.59859e-01
ERR DEF= 0.5
EXTERNAL ERROR MATRIX. NDIM= 25 NPAR= 2 ERR DEF=0.5
2.807e-02 6.216e-02
6.216e-02 1.691e-01
PARAMETER CORRELATION COEFFICIENTS
NO. GLOBAL 1 2
1 0.90238 1.000 0.902
2 0.90238 0.902 1.000
frac=0.6236, sigma_g2=4.115, RooRealVar::sigma_g2 = 4.115 +/- 0.4057 L(3 - 6)
**********
** 10 **MINOS 1000 2
**********
FCN=2659.74 FROM MINOS STATUS=SUCCESSFUL 44 CALLS 91 TOTAL
EDM=4.80672e-05 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER PARABOLIC MINOS ERRORS
NO. NAME VALUE ERROR NEGATIVE POSITIVE
1 frac 6.23602e-01 1.64221e-01
2 sigma_g2 4.11458e+00 4.05667e-01 -3.79331e-01 4.57363e-01
ERR DEF= 0.5
frac=0.6236, sigma_g2=4.115, RooRealVar::sigma_g2 = 4.115 +/- (-0.3793,0.4574) L(3 - 6)
**********
** 11 **SET ERR 0.5
**********
**********
** 12 **SET PRINT 1
**********
START MNCONTOUR CALCULATION OF 50 POINTS ON CONTOUR.
Y-AXIS: PARAMETER 2 sigma_g2
X-AXIS: PARAMETER 1 frac
50 POINTS ON CONTOUR. FMIN= 2.65974e+03 ERRDEF= 0.5
fracsigma_g2fracsigma_g2
1 3.97200e-01 3.75562e+00 26 7.56837e-01 4.54075e+00
2 4.17255e-01 3.73525e+00 27 7.44618e-01 4.57195e+00
3 4.44729e-01 3.74324e+00 28 7.25403e-01 4.55125e+00
4 4.69531e-01 3.75750e+00 29 7.12749e-01 4.52601e+00
5 4.92331e-01 3.77448e+00 30 7.00694e-01 4.50076e+00
6 5.13625e-01 3.79332e+00 31 6.91094e-01 4.47447e+00
7 5.33410e-01 3.81339e+00 32 6.70260e-01 4.42290e+00
8 5.51977e-01 3.83459e+00 33 6.51349e-01 4.37060e+00
9 5.69394e-01 3.85674e+00 34 6.32335e-01 4.31848e+00
10 5.85723e-01 3.87970e+00 35 6.11687e-01 4.26698e+00
11 6.00831e-01 3.90306e+00 36 5.92569e-01 4.21488e+00
12 6.14979e-01 3.92702e+00 37 5.80876e-01 4.18971e+00
13 6.28214e-01 3.95150e+00 38 5.70321e-01 4.16403e+00
14 6.40585e-01 3.97642e+00 39 5.50231e-01 4.11230e+00
15 6.52134e-01 4.00172e+00 40 5.37769e-01 4.08750e+00
16 6.62913e-01 4.02736e+00 41 5.26588e-01 4.06210e+00
17 6.82330e-01 4.07948e+00 42 5.04883e-01 4.01104e+00
18 6.98845e-01 4.13142e+00 43 4.92177e-01 3.98637e+00
19 7.13135e-01 4.18402e+00 44 4.80441e-01 3.96123e+00
20 7.25412e-01 4.23712e+00 45 4.69120e-01 3.93586e+00
21 7.35830e-01 4.29061e+00 46 4.56476e-01 3.91113e+00
22 7.44473e-01 4.34443e+00 47 4.45053e-01 3.88582e+00
23 7.51318e-01 4.39850e+00 48 4.33191e-01 3.86071e+00
24 7.56144e-01 4.45279e+00 49 4.21076e-01 3.83560e+00
25 7.58180e-01 4.50727e+00 50 4.11104e-01 3.80956e+00
**********
** 13 **SET ERR 2
**********
**********
** 14 **SET PRINT 1
**********
START MNCONTOUR CALCULATION OF 50 POINTS ON CONTOUR.
THE NEGATIVE MINOS ERROR OF PARAMETER 1, frac EXCEEDS ITS LIMIT.
============== VARIABLE1 IS AT ITS LOWER ALLOWED LIMIT.
MINUIT WARNING IN MNContour
============== Contour squeezed by parameter limits.
============== Negative diagonal element 1 in Error Matrix
============== 1.80381 added to diagonal of error matrix
============== Negative diagonal element 1 in Error Matrix
============== 4.72533 added to diagonal of error matrix
============== VARIABLE1 IS AT ITS LOWER ALLOWED LIMIT.
MINUIT WARNING IN MNContour
============== Cannot find midpoint, try closer.
Y-AXIS: PARAMETER 2 sigma_g2
X-AXIS: PARAMETER 1 frac
50 POINTS ON CONTOUR. FMIN= 2.65974e+03 ERRDEF= 2
fracsigma_g2fracsigma_g2
1 0.00000e+00 3.46424e+00 26 8.47335e-01 4.95150e+00
2 1.79301e-14 3.40406e+00 27 8.45295e-01 5.05026e+00
3 6.29324e-02 3.40944e+00 28 8.26037e-01 5.14714e+00
4 1.21781e-01 3.43238e+00 29 7.97221e-01 5.09475e+00
5 1.81460e-01 3.45107e+00 30 7.79649e-01 5.03760e+00
6 2.40096e-01 3.47281e+00 31 7.48367e-01 4.92284e+00
7 2.97492e-01 3.49786e+00 32 7.20768e-01 4.80734e+00
8 3.53200e-01 3.52646e+00 33 6.85886e-01 4.69384e+00
9 4.06780e-01 3.55890e+00 34 6.60730e-01 4.60846e+00
10 4.57692e-01 3.59539e+00 35 6.34141e-01 4.52352e+00
11 5.05682e-01 3.63627e+00 36 6.05845e-01 4.43913e+00
12 5.49907e-01 3.68120e+00 37 5.75573e-01 4.35542e+00
13 5.90008e-01 3.72984e+00 38 5.43026e-01 4.27253e+00
14 6.25840e-01 3.78170e+00 39 5.07919e-01 4.19069e+00
15 6.57414e-01 3.83611e+00 40 4.69940e-01 4.11013e+00
16 6.85065e-01 3.89261e+00 41 4.28778e-01 4.03116e+00
17 7.09147e-01 3.95070e+00 42 3.84090e-01 3.95408e+00
18 7.30072e-01 4.01000e+00 43 3.35632e-01 3.87932e+00
19 7.62458e-01 4.12460e+00 44 2.83184e-01 3.80729e+00
20 7.87302e-01 4.24107e+00 45 2.26652e-01 3.73842e+00
21 8.06405e-01 4.35858e+00 46 1.65944e-01 3.67292e+00
22 8.21061e-01 4.47672e+00 47 1.36079e-01 3.63954e+00
23 8.32132e-01 4.59513e+00 48 1.01434e-01 3.61116e+00
24 8.40161e-01 4.71378e+00 49 6.82875e-02 3.57888e+00
25 8.45340e-01 4.83259e+00 50 3.12614e-02 3.55113e+00
**********
** 15 **SET ERR 4.5
**********
**********
** 16 **SET PRINT 1
**********
START MNCONTOUR CALCULATION OF 50 POINTS ON CONTOUR.
THE NEGATIVE MINOS ERROR OF PARAMETER 1, frac EXCEEDS ITS LIMIT.
============== VARIABLE1 IS AT ITS LOWER ALLOWED LIMIT.
MINUIT WARNING IN MNContour
============== Contour squeezed by parameter limits.
============== Negative diagonal element 1 in Error Matrix
============== 7.52056 added to diagonal of error matrix
============== VARIABLE1 IS AT ITS LOWER ALLOWED LIMIT.
MINUIT WARNING IN MNContour
============== Cannot find midpoint, try closer.
Y-AXIS: PARAMETER 2 sigma_g2
X-AXIS: PARAMETER 1 frac
50 POINTS ON CONTOUR. FMIN= 2.65974e+03 ERRDEF= 4.5
fracsigma_g2fracsigma_g2
1 0.00000e+00 3.46425e+00 26 9.09872e-01 5.50347e+00
2 0.00000e+00 3.28838e+00 27 9.07563e-01 5.72284e+00
3 4.28189e-02 3.29497e+00 28 8.85618e-01 5.94113e+00
4 8.37150e-02 3.30927e+00 29 8.44335e-01 5.77983e+00
5 1.26474e-01 3.31676e+00 30 8.16567e-01 5.61566e+00
6 1.66526e-01 3.33350e+00 31 7.91888e-01 5.45109e+00
7 2.48051e-01 3.36183e+00 32 7.59291e-01 5.28791e+00
8 3.27658e-01 3.39517e+00 33 7.35538e-01 5.16556e+00
9 4.04859e-01 3.43479e+00 34 7.09973e-01 5.04357e+00
10 4.77970e-01 3.48153e+00 35 6.82240e-01 4.92205e+00
11 5.45507e-01 3.53612e+00 36 6.51951e-01 4.80115e+00
12 6.05899e-01 3.59851e+00 37 6.18642e-01 4.68097e+00
13 6.57917e-01 3.66753e+00 38 5.81814e-01 4.56183e+00
14 7.01726e-01 3.74204e+00 39 5.40858e-01 4.44403e+00
15 7.37944e-01 3.82043e+00 40 4.95076e-01 4.32802e+00
16 7.67669e-01 3.90151e+00 41 4.43621e-01 4.21428e+00
17 8.11993e-01 4.06758e+00 42 3.85663e-01 4.10372e+00
18 8.42434e-01 4.23675e+00 43 3.20281e-01 3.99727e+00
19 8.62468e-01 4.39420e+00 44 2.84560e-01 3.94597e+00
20 8.77217e-01 4.55223e+00 45 2.44942e-01 3.89762e+00
21 8.88186e-01 4.71055e+00 46 2.05597e-01 3.84681e+00
22 8.96342e-01 4.86904e+00 47 1.62199e-01 3.79941e+00
23 9.02303e-01 5.02758e+00 48 1.16584e-01 3.75419e+00
24 9.06452e-01 5.18618e+00 49 6.88051e-02 3.71126e+00
25 9.08982e-01 5.34482e+00 50 0.00000e+00 3.59734e+00
RooFitResult: minimized FCN value: 2660, estimated distance to minimum: 4.807e-05
covariance matrix quality: Full, accurate covariance matrix
Constant Parameter Value
-------------------- ------------
mean 0.0000e+00
sigma_g1 3.0000e+00
Floating Parameter InitialValue FinalValue (+HiError,-LoError) GblCorr.
-------------------- ------------ ---------------------------------- --------
frac 5.0000e-01 6.2360e-01 +/- 1.64e-01 <none>
sigma_g2 4.0000e+00 4.1146e+00 (+4.57e-01,-3.79e-01) <none>
**********
** 17 **SET PRINT 1
**********
**********
**********
PARAMETER DEFINITIONS:
NO. NAME VALUE STEP SIZE LIMITS
1 frac 6.23602e-01 1.64221e-01 0.00000e+00 1.00000e+00
2 sigma_g2 4.11458e+00 4.05667e-01 3.00000e+00 6.00000e+00
**********
** 19 **SET ERR 0.5
**********
**********
** 20 **SET PRINT 1
**********
**********
** 21 **SET STR 1
**********
NOW USING STRATEGY 1: TRY TO BALANCE SPEED AGAINST RELIABILITY
**********
**********
FIRST CALL TO USER FUNCTION AT NEW START POINT, WITH IFLAG=4.
prevFCN = 2663.4116 START MIGRAD MINIMIZATION. STRATEGY 1. CONVERGENCE WHEN EDM .LT. 1.00e-03
frac=0.6256,
prevFCN = 2663.416604 frac=0.6216,
prevFCN = 2663.407358 frac=0.6236, sigma_g2=4.119,
prevFCN = 2663.411098 sigma_g2=4.11,
prevFCN = 2663.412871 FCN=2663.41 FROM MIGRAD STATUS=INITIATE 4 CALLS 5 TOTAL
EDM= unknown STRATEGY= 1 NO ERROR MATRIX
EXT PARAMETER CURRENT GUESS STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 frac 6.23602e-01 1.64221e-01 3.47361e-01 1.12030e+00
2 sigma_g2 4.11458e+00 4.05667e-01 2.84513e-01 -2.62204e-01
ERR DEF= 0.5
frac=0.6114, sigma_g2=4.12,
prevFCN = 2663.40188 frac=0.6145, sigma_g2=4.119,
prevFCN = 2663.400668 frac=0.6171,
prevFCN = 2663.402019 frac=0.6119,
prevFCN = 2663.400585 frac=0.6145, sigma_g2=4.125,
prevFCN = 2663.405086 sigma_g2=4.113,
prevFCN = 2663.397545 frac=0.6099, sigma_g2=4.107,
prevFCN = 2663.392779 frac=0.5917, sigma_g2=4.06,
prevFCN = 2663.36935 frac=0.5679, sigma_g2=4,
prevFCN = 2663.359581 frac=0.5705,
prevFCN = 2663.362149 frac=0.5652,
prevFCN = 2663.358084 frac=0.5679, sigma_g2=4.006,
prevFCN = 2663.358142 sigma_g2=3.994,
prevFCN = 2663.362488 frac=0.5657, sigma_g2=4.005,
prevFCN = 2663.357758 frac=0.5655, sigma_g2=4.005,
prevFCN = 2663.357745 frac=0.5684,
prevFCN = 2663.358486 frac=0.5626,
prevFCN = 2663.358279 frac=0.5655, sigma_g2=4.011,
prevFCN = 2663.358482 sigma_g2=4,
prevFCN = 2663.358285 frac=0.563, sigma_g2=4,
prevFCN = 2663.35765 frac=0.5627, sigma_g2=4,
prevFCN = 2663.357649 frac=0.5656,
prevFCN = 2663.358284 frac=0.5599,
prevFCN = 2663.358273 frac=0.5627, sigma_g2=4.006,
prevFCN = 2663.358284 sigma_g2=3.994,
prevFCN = 2663.358294 MIGRAD MINIMIZATION HAS CONVERGED.
MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
sigma_g2=4,
prevFCN = 2663.357649 frac=0.5656,
prevFCN = 2663.358284 frac=0.5599,
prevFCN = 2663.358273 frac=0.5627, sigma_g2=4.006,
prevFCN = 2663.358284 sigma_g2=3.994,
prevFCN = 2663.358294 frac=0.5633, sigma_g2=4,
prevFCN = 2663.357675 frac=0.5622,
prevFCN = 2663.357673 frac=0.5629,
prevFCN = 2663.35765 frac=0.5626,
prevFCN = 2663.35765 frac=0.5627, sigma_g2=4.001,
prevFCN = 2663.357674 sigma_g2=3.999,
prevFCN = 2663.357676 sigma_g2=4,
prevFCN = 2663.35765 sigma_g2=4,
prevFCN = 2663.35765 frac=0.5656, sigma_g2=4.006,
prevFCN = 2663.357755 COVARIANCE MATRIX CALCULATED SUCCESSFULLY
FCN=2663.36 FROM MIGRAD STATUS=CONVERGED 43 CALLS 44 TOTAL
EDM=2.18458e-08 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 frac 5.62746e-01 1.97970e-01 5.79755e-03 8.85257e-04
2 sigma_g2 3.99992e+00 3.91591e-01 3.99496e-03 -1.08015e-03
ERR DEF= 0.5
EXTERNAL ERROR MATRIX. NDIM= 25 NPAR= 2 ERR DEF=0.5
4.147e-02 7.412e-02
7.412e-02 1.574e-01
PARAMETER CORRELATION COEFFICIENTS
NO. GLOBAL 1 2
1 0.91737 1.000 0.917
2 0.91737 0.917 1.000
frac=0.5627, sigma_g2=4, **********
** 23 **SET ERR 0.5
**********
**********
** 24 **SET PRINT 1
**********
**********
** 25 **HESSE 1000
**********
prevFCN = 2663.357649 frac=0.5629,
prevFCN = 2663.35765 frac=0.5626,
prevFCN = 2663.35765 frac=0.5627, sigma_g2=4,
prevFCN = 2663.35765 sigma_g2=4,
prevFCN = 2663.35765 frac=0.5628, sigma_g2=4,
prevFCN = 2663.357649 frac=0.5627,
prevFCN = 2663.357649 frac=0.5627, sigma_g2=4,
prevFCN = 2663.357649 sigma_g2=4,
prevFCN = 2663.357649 frac=0.5629, sigma_g2=4,
prevFCN = 2663.357649 COVARIANCE MATRIX CALCULATED SUCCESSFULLY
FCN=2663.36 FROM HESSE STATUS=OK 10 CALLS 54 TOTAL
EDM=2.18358e-08 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER INTERNAL INTERNAL
NO. NAME VALUE ERROR STEP SIZE VALUE
1 frac 5.62746e-01 1.97958e-01 2.31902e-04 1.25824e-01
2 sigma_g2 3.99992e+00 3.91567e-01 1.59798e-04 -3.39892e-01
ERR DEF= 0.5
EXTERNAL ERROR MATRIX. NDIM= 25 NPAR= 2 ERR DEF=0.5
4.146e-02 7.411e-02
7.411e-02 1.574e-01
PARAMETER CORRELATION COEFFICIENTS
NO. GLOBAL 1 2
1 0.91736 1.000 0.917
2 0.91736 0.917 1.000
frac=0.5627, sigma_g2=4, RooRealVar::frac = 0.5627 +/- 0.198 L(0 - 1)
**********
** 26 **SET PRINT 1
**********
**********
**********
PARAMETER DEFINITIONS:
NO. NAME VALUE STEP SIZE LIMITS
1 frac 5.62746e-01 1.97958e-01 0.00000e+00 1.00000e+00
2 sigma_g2 3.99992e+00 3.99992e-01 no limits
**********
** 28 **FIX 2
**********
**********
** 29 **SET ERR 0.5
**********
**********
** 30 **SET PRINT 1
**********
**********
** 31 **SET STR 1
**********
NOW USING STRATEGY 1: TRY TO BALANCE SPEED AGAINST RELIABILITY
**********
**********
FIRST CALL TO USER FUNCTION AT NEW START POINT, WITH IFLAG=4.
prevFCN = 2663.357649 START MIGRAD MINIMIZATION. STRATEGY 1. CONVERGENCE WHEN EDM .LT. 1.00e-03
frac=0.57,
prevFCN = 2663.361693 frac=0.5555,
prevFCN = 2663.361647 frac=0.5656,
prevFCN = 2663.35829 frac=0.5599,
prevFCN = 2663.358278 FCN=2663.36 FROM MIGRAD STATUS=INITIATE 4 CALLS 5 TOTAL
EDM= unknown STRATEGY= 1 NO ERROR MATRIX
EXT PARAMETER CURRENT GUESS STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 frac 5.62746e-01 1.97958e-01 4.11168e-01 9.90768e-04
2 sigma_g2 3.99992e+00 fixed
ERR DEF= 0.5
frac=0.5627,
prevFCN = 2663.357649 frac=0.5627,
prevFCN = 2663.357649 frac=0.5627,
prevFCN = 2663.357649 frac=0.5656,
prevFCN = 2663.358285 frac=0.5598,
prevFCN = 2663.358284 MIGRAD MINIMIZATION HAS CONVERGED.
MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
frac=0.5627,
prevFCN = 2663.357649 frac=0.5656,
prevFCN = 2663.358285 frac=0.5598,
prevFCN = 2663.358284 frac=0.5633,
prevFCN = 2663.357675 frac=0.5622,
prevFCN = 2663.357674 frac=0.5629,
prevFCN = 2663.35765 frac=0.5626,
prevFCN = 2663.35765 COVARIANCE MATRIX CALCULATED SUCCESSFULLY
FCN=2663.36 FROM MIGRAD STATUS=CONVERGED 16 CALLS 17 TOTAL
EDM=4.46423e-13 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 frac 5.62735e-01 8.06976e-02 5.82383e-03 4.08886e-06
2 sigma_g2 3.99992e+00 fixed
ERR DEF= 0.5
EXTERNAL ERROR MATRIX. NDIM= 25 NPAR= 1 ERR DEF=0.5
6.570e-03
frac=0.5627, **********
** 33 **SET ERR 0.5
**********
**********
** 34 **SET PRINT 1
**********
**********
** 35 **HESSE 1000
**********
prevFCN = 2663.357649 frac=0.5633,
prevFCN = 2663.357675 frac=0.5622,
prevFCN = 2663.357674 frac=0.5629,
prevFCN = 2663.35765 frac=0.5626,
prevFCN = 2663.35765 frac=0.5628,
prevFCN = 2663.357649 frac=0.5627,
prevFCN = 2663.357649 COVARIANCE MATRIX CALCULATED SUCCESSFULLY
FCN=2663.36 FROM HESSE STATUS=OK 7 CALLS 24 TOTAL
EDM=4.63606e-16 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER INTERNAL INTERNAL
NO. NAME VALUE ERROR STEP SIZE VALUE
1 frac 5.62735e-01 8.06973e-02 1.16477e-03 1.25801e-01
2 sigma_g2 3.99992e+00 fixed
ERR DEF= 0.5
EXTERNAL ERROR MATRIX. NDIM= 25 NPAR= 1 ERR DEF=0.5
6.570e-03
frac=0.5627, RooRealVar::frac = 0.5627 +/- 0.0807 L(0 - 1)
#include "RooRealVar.h"
#include "RooDataSet.h"
#include "RooGaussian.h"
#include "RooConstVar.h"
#include "RooProdPdf.h"
#include "RooMinimizer.h"
#include "RooFitResult.h"
#include "RooPlot.h"
#include "TCanvas.h"
#include "TAxis.h"
#include "TH1.h"
using namespace RooFit;
void rf601_intminuit()
{
// S e t u p p d f a n d l i k e l i h o o d
// -----------------------------------------------
// Observable
RooRealVar x("x", "x", -20, 20);
// Model (intentional strong correlations)
RooRealVar mean("mean", "mean of g1 and g2", 0);
RooRealVar sigma_g1("sigma_g1", "width of g1", 3);
RooGaussian g1("g1", "g1", x, mean, sigma_g1);
RooRealVar sigma_g2("sigma_g2", "width of g2", 4, 3.0, 6.0);
RooGaussian g2("g2", "g2", x, mean, sigma_g2);
RooRealVar frac("frac", "frac", 0.5, 0.0, 1.0);
RooAddPdf model("model", "model", RooArgList(g1, g2), frac);
// Generate 1000 events
RooDataSet *data = model.generate(x, 1000);
// Construct unbinned likelihood of model w.r.t. data
RooAbsReal *nll = model.createNLL(*data);
// I n t e r a c t i v e m i n i m i z a t i o n , e r r o r a n a l y s i s
// -------------------------------------------------------------------------------
// Create MINUIT interface object
RooMinimizer m(*nll);
// Activate verbose logging of MINUIT parameter space stepping
m.setVerbose(kTRUE);
// Call MIGRAD to minimize the likelihood
// Print values of all parameters, that reflect values (and error estimates)
// that are back propagated from MINUIT
model.getParameters(x)->Print("s");
// Disable verbose logging
m.setVerbose(kFALSE);
// Run HESSE to calculate errors from d2L/dp2
m.hesse();
// Print value (and error) of sigma_g2 parameter, that reflects
// value and error back propagated from MINUIT
sigma_g2.Print();
// Run MINOS on sigma_g2 parameter only
m.minos(sigma_g2);
// Print value (and error) of sigma_g2 parameter, that reflects
// value and error back propagated from MINUIT
sigma_g2.Print();
// S a v i n g r e s u l t s , c o n t o u r p l o t s
// ---------------------------------------------------------
// Save a snapshot of the fit result. This object contains the initial
// fit parameters, the final fit parameters, the complete correlation
// matrix, the EDM, the minimized FCN , the last MINUIT status code and
// the number of times the RooFit function object has indicated evaluation
// problems (e.g. zero probabilities during likelihood evaluation)
RooFitResult *r = m.save();
// Make contour plot of mx vs sx at 1,2,3 sigma
RooPlot *frame = m.contour(frac, sigma_g2, 1, 2, 3);
frame->SetTitle("Minuit contour plot");
// Print the fit result snapshot
r->Print("v");
// C h a n g e p a r a m e t e r v a l u e s , f l o a t i n g
// -----------------------------------------------------------------
// At any moment you can manually change the value of a (constant)
// parameter
mean = 0.3;
m.hesse();
frac.Print();
// Now fix sigma_g2
sigma_g2.setConstant(kTRUE);
m.hesse();
frac.Print();
new TCanvas("rf601_intminuit", "rf601_intminuit", 600, 600);
frame->GetYaxis()->SetTitleOffset(1.4);
frame->Draw();
}
ROOT::R::TRInterface & r
Definition: Object.C:4
const Bool_t kFALSE
Definition: RtypesCore.h:90
const Bool_t kTRUE
Definition: RtypesCore.h:89
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:60
RooAddPdf is an efficient implementation of a sum of PDFs of the form.
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgList.h:21
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:33
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
Definition: RooFitResult.h:40
Plain Gaussian p.d.f.
Definition: RooGaussian.h:25
RooMinimizer is a wrapper class around ROOT::Fit:Fitter that provides a seamless interface between th...
Definition: RooMinimizer.h:38
A RooPlot is a plot frame and a container for graphics objects within that frame.
Definition: RooPlot.h:44
void SetTitle(const char *name)
Set the title of the RooPlot to 'title'.
Definition: RooPlot.cxx:1258
TAxis * GetYaxis() const
Definition: RooPlot.cxx:1277
virtual void Draw(Option_t *options=0)
Draw this plot and all of the elements it contains.
Definition: RooPlot.cxx:712
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:35
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
Definition: TAttAxis.cxx:294
The Canvas class.
Definition: TCanvas.h:27
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
Definition: TObject.cxx:550
Double_t x[n]
Definition: legend1.C:17
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
auto * m
Definition: textangle.C:8
Date
07/2008

Definition in file rf601_intminuit.C.