44 invMass =
ROOT.RooRealVar(
"invMass",
"M_inv", lowRange, highRange,
"GeV")
59 sigma1_z =
ROOT.RooRealVar(
"sigma1_z",
"Width of Gaussian", 10.0, 6, 100)
60 zjjModel =
ROOT.RooGaussian(
"zjjModel",
"Z+jets Model", invMass, mZ, sigma1_z)
72 qcdModel =
ROOT.RooChebychev(
"qcdModel",
"A Polynomial for QCD", invMass, [a0, a1, a2])
83 fzjj =
ROOT.RooRealVar(
"fzjj",
"fraction of zjj background events", 0.4, 0.0, 1)
86 fsigExpected =
ROOT.RooRealVar(
"fsigExpected",
"expected fraction of signal events", 0.2, 0.0, 1)
91 mu =
ROOT.RooRealVar(
"mu",
"signal strength in units of SM expectation", 1, 0.0, 2)
95 ratioSigEff =
ROOT.RooRealVar(
"ratioSigEff",
"ratio of signal efficiency to nominal signal efficiency", 1.0, 0.0, 2)
99 fsig =
ROOT.RooProduct(
"fsig",
"fraction of signal events", [mu, ratioSigEff, fsigExpected])
102 model =
ROOT.RooAddPdf(
"model",
"sig+zjj+qcd background shapes", [sigModel, zjjModel, qcdModel], [fsig, fzjj])
158 print(f
"-------------------------------------------------")
161 print(f
"-------------------------------------------------\n\n")
187 model.fitTo(data, Save=
True, Minos=
False, Hesse=
False, PrintLevel=-1)
194 model.plotOn(frame, Components=sigModel, LineStyle=
"--", LineColor=
"r")
195 model.plotOn(frame, Components=zjjModel, LineStyle=
"--", LineColor=
"b")
196 model.plotOn(frame, Components=qcdModel, LineStyle=
"--", LineColor=
"g")
202 c1.SaveAs(
"rs102_hypotestwithshapes.1.png")
211 model.fitTo(data, Save=
True, Minos=
False, Hesse=
False, PrintLevel=-1)
218 model.plotOn(xframe2, Components=zjjModel, LineStyle=
"--", LineColor=
"b")
219 model.plotOn(xframe2, Components=qcdModel, LineStyle=
"--", LineColor=
"g")
225 c2.SaveAs(
"rs102_hypotestwithshapes.1.png")
230def rs102_hypotestwithshapes():
256rs102_hypotestwithshapes()
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.