26mjjj = ROOT.RooRealVar(
"mjjj",
"m(3jet) (GeV)", 100, 85.0, 350.0)
29mtop = ROOT.RooRealVar(
"mtop",
"m(top)", 162)
30wtop = ROOT.RooRealVar(
"wtop",
"m(top) resolution", 15.2)
31sig = ROOT.RooGaussian(
"sig",
"top signal", mjjj, mtop, wtop)
34c0 = ROOT.RooRealVar(
"c0",
"Chebychev coefficient 0", -0.846, -1.0, 1.0)
35c1 = ROOT.RooRealVar(
"c1",
"Chebychev coefficient 1", 0.112, -1.0, 1.0)
36c2 = ROOT.RooRealVar(
"c2",
"Chebychev coefficient 2", 0.076, -1.0, 1.0)
37bkg = ROOT.RooChebychev(
"bkg",
"combinatorial background", mjjj, [c0, c1, c2])
40nsig = ROOT.RooRealVar(
"nsig",
"number of signal events", 53, 0, 1e3)
41nbkg = ROOT.RooRealVar(
"nbkg",
"number of background events", 103, 0, 5e3)
42model = ROOT.RooAddPdf(
"model",
"model", [sig, bkg], [nsig, nbkg])
50 model, {mjjj}, Binned=
True, Silence=
True, Extended=
True, FitOptions={
"Extended":
True,
"PrintEvalErrors": -1}
64randModule = ROOT.RooRandomizeParamMCSModule()
65randModule.sampleSumUniform({nsig, nbkg}, 50, 500)
66mcs.addModule(randModule)
74sigModule = ROOT.RooDLLSignificanceMCSModule(nsig, 0)
75mcs.addModule(sigModule)
83mcs.generateAndFit(500)
86binning = ROOT.RooFit.AutoBinning(40)
87dll_vs_ngen = mcs.fitParDataSet().createHistogram(
"ngen,dll_nullhypo_nsig", binning, binning)
88z_vs_ngen = mcs.fitParDataSet().createHistogram(
"ngen,significance_nullhypo_nsig", binning, binning)
89errnsig_vs_ngen = mcs.fitParDataSet().createHistogram(
"ngen,nsigerr", binning, binning)
90errnsig_vs_nsig = mcs.fitParDataSet().createHistogram(
"nsig,nsigerr", binning, binning)
93c = ROOT.TCanvas(
"rf803_mcstudy_addons2",
"rf802_mcstudy_addons2", 800, 800)
96ROOT.gPad.SetLeftMargin(0.15)
97dll_vs_ngen.GetYaxis().SetTitleOffset(1.6)
98dll_vs_ngen.Draw(
"box")
100ROOT.gPad.SetLeftMargin(0.15)
101z_vs_ngen.GetYaxis().SetTitleOffset(1.6)
104ROOT.gPad.SetLeftMargin(0.15)
105errnsig_vs_ngen.GetYaxis().SetTitleOffset(1.6)
106errnsig_vs_ngen.Draw(
"box")
108ROOT.gPad.SetLeftMargin(0.15)
109errnsig_vs_nsig.GetYaxis().SetTitleOffset(1.6)
110errnsig_vs_nsig.Draw(
"box")
112c.SaveAs(
"rf803_mcstudy_addons2.png")
116ROOT.gDirectory.Add(mcs)