17dt = ROOT.RooRealVar(
"dt",
"dt", -20, 20)
21mixState = ROOT.RooCategory(
"mixState",
"B0/B0bar mixing state")
22tagFlav = ROOT.RooCategory(
"tagFlav",
"Flavour of the tagged B0")
25mixState.defineType(
"mixed", -1)
26mixState.defineType(
"unmixed", 1)
27tagFlav.defineType(
"B0", 1)
28tagFlav.defineType(
"B0bar", -1)
31dm = ROOT.RooRealVar(
"dm",
"delta m(B)", 0.472, 0., 1.0)
32tau = ROOT.RooRealVar(
"tau",
"B0 decay time", 1.547, 1.0, 2.0)
33w = ROOT.RooRealVar(
"w",
"Flavor Mistag rate", 0.03, 0.0, 1.0)
35 "dw",
"Flavor Mistag rate difference between B0 and B0bar", 0.01)
38bias1 = ROOT.RooRealVar(
"bias1",
"bias1", 0)
39sigma1 = ROOT.RooRealVar(
"sigma1",
"sigma1", 0.01)
40gm1 = ROOT.RooGaussModel(
"gm1",
"gauss model 1", dt, bias1, sigma1)
43bmix_gm1 = ROOT.RooBMixDecay(
54 ROOT.RooBMixDecay.DoubleSided)
57data = bmix_gm1.generate(ROOT.RooArgSet(dt, tagFlav, mixState), 20000)
64frame = dt.frame(ROOT.RooFit.Title(
"Inclusive decay distribution"))
72frame2 = dt.frame(ROOT.RooFit.Title(
"Decay distribution of mixed events"))
73data.plotOn(frame2, ROOT.RooFit.Cut(
"mixState==mixState::mixed"))
77bmix_gm1.plotOn(frame2, ROOT.RooFit.Slice(mixState,
"mixed"))
80frame3 = dt.frame(ROOT.RooFit.Title(
81 "Decay distribution of unmixed events"))
82data.plotOn(frame3, ROOT.RooFit.Cut(
"mixState==mixState::unmixed"))
86bmix_gm1.plotOn(frame3, ROOT.RooFit.Slice(mixState,
"unmixed"))
88c = ROOT.TCanvas(
"rf310_sliceplot",
"rf310_sliceplot", 1200, 400)
91ROOT.gPad.SetLeftMargin(0.15)
92frame.GetYaxis().SetTitleOffset(1.4)
96ROOT.gPad.SetLeftMargin(0.15)
97frame2.GetYaxis().SetTitleOffset(1.4)
101ROOT.gPad.SetLeftMargin(0.15)
102frame3.GetYaxis().SetTitleOffset(1.4)
106c.SaveAs(
"rf310_sliceplot.png")