24mjjj = ROOT.RooRealVar(
"mjjj",
"m(3jet) (GeV)", 100, 85.0, 350.0)
27mtop = ROOT.RooRealVar(
"mtop",
"m(top)", 162)
28wtop = ROOT.RooRealVar(
"wtop",
"m(top) resolution", 15.2)
29sig = ROOT.RooGaussian(
"sig",
"top signal", mjjj, mtop, wtop)
32c0 = ROOT.RooRealVar(
"c0",
"Chebychev coefficient 0", -0.846, -1.0, 1.0)
33c1 = ROOT.RooRealVar(
"c1",
"Chebychev coefficient 1", 0.112, -1.0, 1.0)
34c2 = ROOT.RooRealVar(
"c2",
"Chebychev coefficient 2", 0.076, -1.0, 1.0)
35bkg = ROOT.RooChebychev(
"bkg",
"combinatorial background", mjjj, [c0, c1, c2])
38nsig = ROOT.RooRealVar(
"nsig",
"number of signal events", 53, 0, 1e3)
39nbkg = ROOT.RooRealVar(
"nbkg",
"number of background events", 103, 0, 5e3)
40model = ROOT.RooAddPdf(
"model",
"model", [sig, bkg], [nsig, nbkg])
51 ROOT.RooFit.Silence(),
52 ROOT.RooFit.Extended(ROOT.kTRUE),
53 ROOT.RooFit.FitOptions(ROOT.RooFit.Extended(ROOT.kTRUE), ROOT.RooFit.PrintEvalErrors(-1)),
67randModule = ROOT.RooRandomizeParamMCSModule()
68randModule.sampleSumUniform({nsig, nbkg}, 50, 500)
69mcs.addModule(randModule)
77sigModule = ROOT.RooDLLSignificanceMCSModule(nsig, 0)
78mcs.addModule(sigModule)
86mcs.generateAndFit(500)
89dll_vs_ngen = ROOT.RooAbsData.createHistogram(mcs.fitParDataSet(),
"ngen,dll_nullhypo_nsig", -40, -40)
90z_vs_ngen = ROOT.RooAbsData.createHistogram(mcs.fitParDataSet(),
"ngen,significance_nullhypo_nsig", -40, -40)
91errnsig_vs_ngen = ROOT.RooAbsData.createHistogram(mcs.fitParDataSet(),
"ngen,nsigerr", -40, -40)
92errnsig_vs_nsig = ROOT.RooAbsData.createHistogram(mcs.fitParDataSet(),
"nsig,nsigerr", -40, -40)
95c = ROOT.TCanvas(
"rf803_mcstudy_addons2",
"rf802_mcstudy_addons2", 800, 800)
98ROOT.gPad.SetLeftMargin(0.15)
99dll_vs_ngen.GetYaxis().SetTitleOffset(1.6)
100dll_vs_ngen.Draw(
"box")
102ROOT.gPad.SetLeftMargin(0.15)
103z_vs_ngen.GetYaxis().SetTitleOffset(1.6)
106ROOT.gPad.SetLeftMargin(0.15)
107errnsig_vs_ngen.GetYaxis().SetTitleOffset(1.6)
108errnsig_vs_ngen.Draw(
"box")
110ROOT.gPad.SetLeftMargin(0.15)
111errnsig_vs_nsig.GetYaxis().SetTitleOffset(1.6)
112errnsig_vs_nsig.Draw(
"box")
114c.SaveAs(
"rf803_mcstudy_addons2.png")
118ROOT.gDirectory.Add(mcs)