[#1] INFO:Minimization -- p.d.f. provides expected number of events, including extended term in likelihood.
[#1] INFO:Minimization -- RooAbsMinimizerFcn::setOptimizeConst: activating const optimization
[#1] INFO:Minimization -- The following expressions will be evaluated in cache-and-track mode: (gauss,argus)
**********
** 1 **SET PRINT 1
**********
**********
** 2 **SET NOGRAD
**********
PARAMETER DEFINITIONS:
NO. NAME VALUE STEP SIZE LIMITS
1 argpar -2.00000e+01 9.50000e+00 -1.00000e+02 -1.00000e+00
2 mean 5.28000e+00 1.00000e-02 5.20000e+00 5.30000e+00
3 nbkg 8.00000e+02 4.00000e+02 0.00000e+00 1.00000e+04
4 nsig 2.00000e+02 1.00000e+02 0.00000e+00 1.00000e+04
5 width 2.70000e-03 8.50000e-04 1.00000e-03 1.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
**********
** 6 **MIGRAD 2500 1
**********
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=-17788.8 FROM MIGRAD STATUS=INITIATE 20 CALLS 21 TOTAL
EDM= unknown STRATEGY= 1 NO ERROR MATRIX
EXT PARAMETER CURRENT GUESS STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 argpar -2.00000e+01 9.50000e+00 2.51381e-01 1.48295e+01
2 mean 5.28000e+00 1.00000e-02 2.57889e-01 1.26241e+02
3 nbkg 8.00000e+02 4.00000e+02 1.52384e-01 -2.75719e+03
4 nsig 2.00000e+02 1.00000e+02 7.39156e-02 -1.30866e+03
5 width 2.70000e-03 8.50000e-04 2.13708e-02 -5.96944e+02
ERR DEF= 0.5
MIGRAD MINIMIZATION HAS CONVERGED.
MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
COVARIANCE MATRIX CALCULATED SUCCESSFULLY
FCN=-18178.2 FROM MIGRAD STATUS=CONVERGED 127 CALLS 128 TOTAL
EDM=8.23524e-07 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 argpar -2.28748e+01 3.42311e+00 6.81552e-03 -1.05895e-04
2 mean 5.27987e+00 2.15784e-04 4.99568e-04 1.14694e-01
3 nbkg 1.61271e+03 4.46744e+01 1.05575e-03 -2.82924e-02
4 nsig 3.87281e+02 2.77659e+01 1.13759e-03 3.18941e-02
5 width 3.01017e-03 1.99068e-04 3.69588e-04 2.63545e-02
ERR DEF= 0.5
EXTERNAL ERROR MATRIX. NDIM= 25 NPAR= 5 ERR DEF=0.5
1.174e+01 -9.561e-06 -4.054e+01 4.054e+01 2.300e-04
-9.561e-06 4.656e-08 3.241e-04 -3.248e-04 -2.699e-09
-4.054e+01 3.241e-04 1.996e+03 -3.831e+02 -2.181e-03
4.054e+01 -3.248e-04 -3.831e+02 7.710e+02 2.184e-03
2.300e-04 -2.699e-09 -2.181e-03 2.184e-03 3.963e-08
PARAMETER CORRELATION COEFFICIENTS
NO. GLOBAL 1 2 3 4 5
1 0.47848 1.000 -0.013 -0.265 0.426 0.337
2 0.07490 -0.013 1.000 0.034 -0.054 -0.063
3 0.35856 -0.265 0.034 1.000 -0.309 -0.245
4 0.52842 0.426 -0.054 -0.309 1.000 0.395
5 0.45058 0.337 -0.063 -0.245 0.395 1.000
**********
** 7 **SET ERR 0.5
**********
**********
** 8 **SET PRINT 1
**********
**********
** 9 **HESSE 2500
**********
COVARIANCE MATRIX CALCULATED SUCCESSFULLY
FCN=-18178.2 FROM HESSE STATUS=OK 31 CALLS 159 TOTAL
EDM=8.27129e-07 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER INTERNAL INTERNAL
NO. NAME VALUE ERROR STEP SIZE VALUE
1 argpar -2.28748e+01 3.42862e+00 2.72621e-04 5.92076e-01
2 mean 5.27987e+00 2.15791e-04 9.99136e-05 6.40145e-01
3 nbkg 1.61271e+03 4.47114e+01 4.22301e-05 -7.44300e-01
4 nsig 3.87281e+02 2.78172e+01 2.27518e-04 -1.17462e+00
5 width 3.01017e-03 1.99415e-04 1.47835e-05 -1.48105e+00
ERR DEF= 0.5
EXTERNAL ERROR MATRIX. NDIM= 25 NPAR= 5 ERR DEF=0.5
1.178e+01 -9.115e-06 -4.092e+01 4.092e+01 2.327e-04
-9.115e-06 4.657e-08 3.206e-04 -3.207e-04 -2.752e-09
-4.092e+01 3.206e-04 1.999e+03 -3.865e+02 -2.207e-03
4.092e+01 -3.207e-04 -3.865e+02 7.739e+02 2.207e-03
2.327e-04 -2.752e-09 -2.207e-03 2.207e-03 3.977e-08
PARAMETER CORRELATION COEFFICIENTS
NO. GLOBAL 1 2 3 4 5
1 0.48108 1.000 -0.012 -0.267 0.429 0.340
2 0.07539 -0.012 1.000 0.033 -0.053 -0.064
3 0.36057 -0.267 0.033 1.000 -0.311 -0.248
4 0.53093 0.429 -0.053 -0.311 1.000 0.398
5 0.45364 0.340 -0.064 -0.248 0.398 1.000
[#1] INFO:Minimization -- RooAbsMinimizerFcn::setOptimizeConst: deactivating const optimization
[#1] INFO:Plotting -- RooAbsPdf::plotOn(sum) directly selected PDF components: (argus)
[#1] INFO:Plotting -- RooAbsPdf::plotOn(sum) indirectly selected PDF components: ()
import ROOT
card_name = "HLFavtoryexample.rs"
with open(card_name, "w") as f:
f.write("// The simplest card\n\n")
f.write("gauss = Gaussian(mes[5.20,5.30],mean[5.28,5.2,5.3],width[0.0027,0.001,1]);\n")
f.write("argus = ArgusBG(mes,5.291,argpar[-20,-100,-1]);\n")
f.write("sum = SUM(nsig[200,0,10000]*gauss,nbkg[800,0,10000]*argus);\n\n")
hlf = ROOT.RooStats.HLFactory("HLFavtoryexample", card_name, False)
w = hlf.GetWs()
mes = w.arg("mes")
sumpdf = w["sum"]
argus = w["argus"]
data = sumpdf.generate(mes, 2000)
sumpdf.fitTo(data)
mesframe = mes.frame()
data.plotOn(mesframe)
sumpdf.plotOn(mesframe)
sumpdf.plotOn(mesframe, Components=argus, LineStyle="--")
ROOT.gROOT.SetStyle("Plain")
c = ROOT.TCanvas()
mesframe.Draw()
c.SaveAs("rs601_HLFactoryexample.png")