17dt = ROOT.RooRealVar(
"dt",
"dt", -20, 20)
22mixState = ROOT.RooCategory(
"mixState",
"B0/B0bar mixing state", {
"mixed": -1,
"unmixed": 1})
23tagFlav = ROOT.RooCategory(
"tagFlav",
"Flavour of the tagged B0", {
"B0": 1,
"B0bar": -1})
26dm = ROOT.RooRealVar(
"dm",
"delta m(B)", 0.472, 0.0, 1.0)
27tau = ROOT.RooRealVar(
"tau",
"B0 decay time", 1.547, 1.0, 2.0)
28w = ROOT.RooRealVar(
"w",
"Flavor Mistag rate", 0.03, 0.0, 1.0)
29dw = ROOT.RooRealVar(
"dw",
"Flavor Mistag rate difference between B0 and B0bar", 0.01)
32bias1 = ROOT.RooRealVar(
"bias1",
"bias1", 0)
33sigma1 = ROOT.RooRealVar(
"sigma1",
"sigma1", 0.01)
34gm1 = ROOT.RooGaussModel(
"gm1",
"gauss model 1", dt, bias1, sigma1)
37bmix_gm1 = ROOT.RooBMixDecay(
"bmix",
"decay", dt, mixState, tagFlav, tau, dm, w, dw, gm1, type=
"DoubleSided")
40data = bmix_gm1.generate({dt, tagFlav, mixState}, 20000)
47frame = dt.frame(Title=
"Inclusive decay distribution")
55frame2 = dt.frame(Title=
"Decay distribution of mixed events")
56data.plotOn(frame2, Cut=
"mixState==mixState::mixed")
60bmix_gm1.plotOn(frame2, Slice=(mixState,
"mixed"))
63frame3 = dt.frame(Title=
"Decay distribution of unmixed events")
64data.plotOn(frame3, Cut=
"mixState==mixState::unmixed")
68bmix_gm1.plotOn(frame3, Slice=(mixState,
"unmixed"))
70c = ROOT.TCanvas(
"rf310_sliceplot",
"rf310_sliceplot", 1200, 400)
73ROOT.gPad.SetLeftMargin(0.15)
74frame.GetYaxis().SetTitleOffset(1.4)
78ROOT.gPad.SetLeftMargin(0.15)
79frame2.GetYaxis().SetTitleOffset(1.4)
83ROOT.gPad.SetLeftMargin(0.15)
84frame3.GetYaxis().SetTitleOffset(1.4)
88c.SaveAs(
"rf310_sliceplot.png")