19dt = ROOT.RooRealVar(
"dt",
"dt", -20, 20)
24mixState = ROOT.RooCategory(
"mixState",
"B0/B0bar mixing state", {
"mixed": -1,
"unmixed": 1})
25tagFlav = ROOT.RooCategory(
"tagFlav",
"Flavour of the tagged B0", {
"B0": 1,
"B0bar": -1})
28dm = ROOT.RooRealVar(
"dm",
"delta m(B)", 0.472, 0.0, 1.0)
29tau = ROOT.RooRealVar(
"tau",
"B0 decay time", 1.547, 1.0, 2.0)
30w = ROOT.RooRealVar(
"w",
"Flavor Mistag rate", 0.03, 0.0, 1.0)
31dw = ROOT.RooRealVar(
"dw",
"Flavor Mistag rate difference between B0 and B0bar", 0.01)
34bias1 = ROOT.RooRealVar(
"bias1",
"bias1", 0)
35sigma1 = ROOT.RooRealVar(
"sigma1",
"sigma1", 0.01)
36gm1 = ROOT.RooGaussModel(
"gm1",
"gauss model 1", dt, bias1, sigma1)
39bmix_gm1 = ROOT.RooBMixDecay(
"bmix",
"decay", dt, mixState, tagFlav, tau, dm, w, dw, gm1, type=
"DoubleSided")
42data = bmix_gm1.generate({dt, tagFlav, mixState}, 20000)
49frame = dt.frame(Title=
"Inclusive decay distribution")
57frame2 = dt.frame(Title=
"Decay distribution of mixed events")
58data.plotOn(frame2, Cut=
"mixState==mixState::mixed")
62bmix_gm1.plotOn(frame2, Slice=(mixState,
"mixed"))
65frame3 = dt.frame(Title=
"Decay distribution of unmixed events")
66data.plotOn(frame3, Cut=
"mixState==mixState::unmixed")
70bmix_gm1.plotOn(frame3, Slice=(mixState,
"unmixed"))
72c = ROOT.TCanvas(
"rf310_sliceplot",
"rf310_sliceplot", 1200, 400)
75ROOT.gPad.SetLeftMargin(0.15)
76frame.GetYaxis().SetTitleOffset(1.4)
80ROOT.gPad.SetLeftMargin(0.15)
81frame2.GetYaxis().SetTitleOffset(1.4)
85ROOT.gPad.SetLeftMargin(0.15)
86frame3.GetYaxis().SetTitleOffset(1.4)
90c.SaveAs(
"rf310_sliceplot.png")