rf601_intminuit¶

'LIKELIHOOD AND MINIMIZATION' RooFit tutorial macro #601

Interactive minimization with MINUIT

Author: Clemens Lange, Wouter Verkerke (C version)
This notebook tutorial was automatically generated with ROOTBOOK-izer from the macro found in the ROOT repository on Sunday, November 27, 2022 at 11:07 AM.

In [1]:
import ROOT

Welcome to JupyROOT 6.27/01


Setup pdf and likelihood¶

Observable

In [2]:
x = ROOT.RooRealVar("x", "x", -20, 20)


Model (intentional strong correlations)

In [3]:
mean = ROOT.RooRealVar("mean", "mean of g1 and g2", 0)
sigma_g1 = ROOT.RooRealVar("sigma_g1", "width of g1", 3)
g1 = ROOT.RooGaussian("g1", "g1", x, mean, sigma_g1)

sigma_g2 = ROOT.RooRealVar("sigma_g2", "width of g2", 4, 3.0, 6.0)
g2 = ROOT.RooGaussian("g2", "g2", x, mean, sigma_g2)

frac = ROOT.RooRealVar("frac", "frac", 0.5, 0.0, 1.0)
model = ROOT.RooAddPdf("model", "model", [g1, g2], [frac])

[#0] WARNING:InputArguments -- The parameter 'sigma_g1' with range [-1e+30, 1e+30] of the RooGaussian 'g1' exceeds the safe range of (0, inf). Advise to limit its range.


Generate 1000 events

In [4]:
data = model.generate({x}, 1000)


Construct unbinned likelihood of model w.r.t. data

In [5]:
nll = model.createNLL(data)


Interactive minimization, error analysis¶

Create MINUIT interface object

In [6]:
m = ROOT.RooMinimizer(nll)


Activate verbose logging of MINUIT parameter space stepping

In [7]:
m.setVerbose(True)


Call MIGRAD to minimize the likelihood

In [8]:
m.migrad()

Out[8]:
0
[#0] WARNING:Minimization -- RooAbsMinimizerFcn::synchronize: WARNING: no initial error estimate available for frac: using 0.1
[#0] WARNING:Minimization -- RooAbsMinimizerFcn::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, 

Print values of all parameters, reflect values (and error estimates) that are back propagated from MINUIT

In [9]:
model.getParameters({x}).Print("s")

  1) RooRealVar::     frac = 0.6236 +/- 0.164
2) RooRealVar::     mean = 0
3) RooRealVar:: sigma_g1 = 3
4) RooRealVar:: sigma_g2 = 4.115 +/- 0.405


Disable verbose logging

In [10]:
m.setVerbose(False)


Run HESSE to calculate errors from d2L/dp2

In [11]:
m.hesse()

Out[11]:
0
 **********
**    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


Print value (and error) of sigma_g2 parameter, reflects value and error back propagated from MINUIT

In [12]:
sigma_g2.Print()

RooRealVar::sigma_g2 = 4.115 +/- 0.4057  L(3 - 6)


Run MINOS on sigma_g2 parameter only

In [13]:
m.minos({sigma_g2})

Out[13]:
0
 **********
**   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


Print value (and error) of sigma_g2 parameter, reflects value and error back propagated from MINUIT

In [14]:
sigma_g2.Print()

RooRealVar::sigma_g2 = 4.115 +/- (-0.3793,0.4574)  L(3 - 6)


Saving results, contour plots¶

Save a snapshot of the fit result. ROOT.This object contains the initial fit parameters, final fit parameters, complete correlation matrix, EDM, minimized FCN , last MINUIT status code and the number of times the ROOT.RooFit function object has indicated evaluation problems (e.g. zero probabilities during likelihood evaluation)

In [15]:
r = m.save()


Make contour plot of mx vs sx at 1,2, sigma

In [16]:
frame = m.contour(frac, sigma_g2, 1, 2, 3)
frame.SetTitle("Contour plot")

 **********
**   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


Print the fit result snapshot

In [17]:
r.Print("v")

  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>



Change parameter values, plotting¶

At any moment you can manually change the value of a (constant) parameter

In [18]:
mean.setVal(0.3)


In [19]:
m.migrad()
m.hesse()
frac.Print()

 **********
**   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.
START MIGRAD MINIMIZATION.  STRATEGY  1.  CONVERGENCE WHEN EDM .LT. 1.00e-03
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
MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
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
**********
**   23 **SET ERR         0.5
**********
**********
**   24 **SET PRINT           1
**********
**********
**   25 **HESSE        1000
**********
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
RooRealVar::frac = 0.5627 +/- 0.198  L(0 - 1)


Now fix sigma_g2

In [20]:
sigma_g2.setConstant(True)


In [21]:
m.migrad()
m.hesse()
frac.Print()

c = ROOT.TCanvas("rf601_intminuit", "rf601_intminuit", 600, 600)
frame.GetYaxis().SetTitleOffset(1.4)
frame.Draw()

c.SaveAs("rf601_intminuit.png")

 **********
**   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.
START MIGRAD MINIMIZATION.  STRATEGY  1.  CONVERGENCE WHEN EDM .LT. 1.00e-03
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
MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
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
**********
**   33 **SET ERR         0.5
**********
**********
**   34 **SET PRINT           1
**********
**********
**   35 **HESSE        1000
**********
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
RooRealVar::frac = 0.5627 +/- 0.0807  L(0 - 1)

Info in <TCanvas::Print>: png file rf601_intminuit.png has been created


Draw all canvases

In [22]:
from ROOT import gROOT
gROOT.GetListOfCanvases().Draw()