Processing /builddir/build/BUILD/root-6.10.00/tutorials/roostats/rs_bernsteinCorrection.C...
[1mRooFit v3.60 -- Developed by Wouter Verkerke and David Kirkby[0m
Copyright (C) 2000-2013 NIKHEF, University of California & Stanford University
All rights reserved, please
read http:
[#1] INFO:ObjectHandling -- RooWorkSpace::import(myWorksspace) changing name of dataset from realityData to data
[#1] INFO:ObjectHandling -- RooWorkspace::import(myWorksspace) importing RooGaussian::nominal
[#1] INFO:ObjectHandling -- RooWorkspace::import(myWorksspace) importing RooRealVar::sigma
BernsteinCorrection::ImportCorrectedPdf - Doing initial Fit with nominal model
[#1] INFO:ObjectHandling -- RooWorkspace::import(myWorksspace) importing RooBernstein::poly
[#1] INFO:ObjectHandling -- RooWorkspace::import(myWorksspace) importing RooRealVar::c_1
[#1] INFO:ObjectHandling -- RooWorkspace::import(myWorksspace) importing RooRealVar::c_3
[#1] INFO:ObjectHandling -- RooWorkspace::import(myWorksspace) importing RooRealVar::c_5
------
Begin Bernstein Correction
Log --------
degree = 1 -log L(0) = 1216.78 -log L(1) = 1208.89 q = 15.7692 P(chi^2_1 > q) = 7.1557e-05
degree = 2 -log L(1) = 1208.89 -log L(2) = 1203.21 q = 11.3692 P(chi^2_1 > q) = 0.000746732
degree = 3 -log L(2) = 1203.21 -log L(3) = 1198.85 q = 8.72213 P(chi^2_1 > q) = 0.00314371
degree = 4 -log L(3) = 1198.85 -log L(4) = 1190.19 q = 17.3163 P(chi^2_1 > q) = 3.1646e-05
degree = 5 -log L(4) = 1190.19 -log L(5) = 1183.56 q = 13.259 P(chi^2_1 > q) = 0.00027127
degree = 6 -log L(5) = 1183.56 -log L(6) = 1182.57 q = 1.98376 P(chi^2_1 > q) = 0.158995
------
End Bernstein Correction
Log --------
Correction based on Bernstein Poly of degree 6
[#1] INFO:Minization -- RooMinimizer::optimizeConst: activating const optimization
Minuit2Minimizer: Minimize with max-calls 500 convergence
for edm < 1
strategy 1
Minuit2Minimizer : Valid minimum - status = 0
FVAL = 1216.77793416266263
Edm = 4.16187365288754743e-07
Nfcn = 19
sigma = 1.18138 +/- 0.0315451 (limited)
Minuit2Minimizer: Minimize with max-calls 3500 convergence
for edm < 1
strategy 1
Minuit2Minimizer : Valid minimum - status = 0
FVAL = 1182.56771193632994
Edm = 0.000104428090940242272
Nfcn = 184
c_1 = 3.18371 +/- 0.833804 (limited)
c_2 = 1.21988e-05 +/- 3.09819 (limited)
c_3 = 1.60193e-06 +/- 1.52591 (limited)
c_4 = 0.971302 +/- 2.52002 (limited)
c_5 = 0.200261 +/- 75.4433 (limited)
c_6 = 10.5068 +/- 22.9472 (limited)
sigma = 1.26618 +/- 0.231794 (limited)
made pdfs,
make toy generator
on toy 0
on toy 1
on toy 2
on toy 3
on toy 4
on toy 5
on toy 6
on toy 7
on toy 8
on toy 9
on toy 10
on toy 11
on toy 12
on toy 13
on toy 14
on toy 15
on toy 16
on toy 17
on toy 18
on toy 19
#include <string>
#include <vector>
#include <stdio.h>
#include <sstream>
#include <iostream>
using namespace RooFit;
using namespace RooStats;
void rs_bernsteinCorrection(){
Int_t degree = bernsteinCorrection.ImportCorrectedPdf(wks,
"nominal",
"x",
"data");
if (degree < 0) {
Error(
"rs_bernsteinCorrection",
"Bernstein correction failed ! ");
return;
}
cout << " Correction based on Bernstein Poly of degree " << degree << endl;
nominal.plotOn(frame);
if (!corrected) return;
if (poly)
bool checkSamplingDist = true;
int numToyMC = 20;
if(checkSamplingDist) {
}
if(checkSamplingDist) {
TH1F* samplingDist =
new TH1F(
"samplingDist",
"",20,0,10);
TH1F* samplingDistExtra =
new TH1F(
"samplingDistExtra",
"",20,0,10);
bernsteinCorrection.CreateQSamplingDist(wks,"nominal","x","data",samplingDist, samplingDistExtra, degree,numToyMC);
samplingDistExtra->
Draw();
samplingDist->
Draw(
"same");
}
}