18dt = ROOT.RooRealVar(
"dt",
"dt", -20, 20)
22mixState = ROOT.RooCategory(
"mixState",
"B0/B0bar mixing state")
23tagFlav = ROOT.RooCategory(
"tagFlav",
"Flavour of the tagged B0")
26mixState.defineType(
"mixed", -1)
27mixState.defineType(
"unmixed", 1)
28tagFlav.defineType(
"B0", 1)
29tagFlav.defineType(
"B0bar", -1)
32dm = ROOT.RooRealVar(
"dm",
"delta m(B)", 0.472, 0., 1.0)
33tau = ROOT.RooRealVar(
"tau",
"B0 decay time", 1.547, 1.0, 2.0)
34w = ROOT.RooRealVar(
"w",
"Flavor Mistag rate", 0.03, 0.0, 1.0)
36 "dw",
"Flavor Mistag rate difference between B0 and B0bar", 0.01)
39bias1 = ROOT.RooRealVar(
"bias1",
"bias1", 0)
40sigma1 = ROOT.RooRealVar(
"sigma1",
"sigma1", 0.01)
41gm1 = ROOT.RooGaussModel(
"gm1",
"gauss model 1", dt, bias1, sigma1)
44bmix_gm1 = ROOT.RooBMixDecay(
55 ROOT.RooBMixDecay.DoubleSided)
58data = bmix_gm1.generate(ROOT.RooArgSet(dt, tagFlav, mixState), 20000)
65frame = dt.frame(ROOT.RooFit.Title(
"Inclusive decay distribution"))
73frame2 = dt.frame(ROOT.RooFit.Title(
"Decay distribution of mixed events"))
74data.plotOn(frame2, ROOT.RooFit.Cut(
"mixState==mixState::mixed"))
78bmix_gm1.plotOn(frame2, ROOT.RooFit.Slice(mixState,
"mixed"))
81frame3 = dt.frame(ROOT.RooFit.Title(
82 "Decay distribution of unmixed events"))
83data.plotOn(frame3, ROOT.RooFit.Cut(
"mixState==mixState::unmixed"))
87bmix_gm1.plotOn(frame3, ROOT.RooFit.Slice(mixState,
"unmixed"))
89c = ROOT.TCanvas(
"rf310_sliceplot",
"rf310_sliceplot", 1200, 400)
92ROOT.gPad.SetLeftMargin(0.15)
93frame.GetYaxis().SetTitleOffset(1.4)
97ROOT.gPad.SetLeftMargin(0.15)
98frame2.GetYaxis().SetTitleOffset(1.4)
102ROOT.gPad.SetLeftMargin(0.15)
103frame3.GetYaxis().SetTitleOffset(1.4)
107c.SaveAs(
"rf310_sliceplot.png")