21dt = ROOT.RooRealVar(
"dt",
"dt", -20, 20)
25mixState = ROOT.RooCategory(
"mixState",
"B0/B0bar mixing state")
26tagFlav = ROOT.RooCategory(
"tagFlav",
"Flavour of the tagged B0")
29mixState.defineType(
"mixed", -1)
30mixState.defineType(
"unmixed", 1)
31tagFlav.defineType(
"B0", 1)
32tagFlav.defineType(
"B0bar", -1)
35dm = ROOT.RooRealVar(
"dm",
"delta m(B)", 0.472, 0., 1.0)
36tau = ROOT.RooRealVar(
"tau",
"B0 decay time", 1.547, 1.0, 2.0)
37w = ROOT.RooRealVar(
"w",
"Flavor Mistag rate", 0.03, 0.0, 1.0)
39 "dw",
"Flavor Mistag rate difference between B0 and B0bar", 0.01)
42bias1 = ROOT.RooRealVar(
"bias1",
"bias1", 0)
43sigma1 = ROOT.RooRealVar(
"sigma1",
"sigma1", 0.01)
44gm1 = ROOT.RooGaussModel(
"gm1",
"gauss model 1", dt, bias1, sigma1)
47bmix_gm1 = ROOT.RooBMixDecay(
"bmix",
"decay", dt, mixState,
48 tagFlav, tau, dm, w, dw, gm1, ROOT.RooBMixDecay.DoubleSided)
51data = bmix_gm1.generate(ROOT.RooArgSet(dt, tagFlav, mixState), 20000)
58frame = dt.frame(ROOT.RooFit.Title(
"Inclusive decay distribution"))
66frame2 = dt.frame(ROOT.RooFit.Title(
"Decay distribution of mixed events"))
67data.plotOn(frame2, ROOT.RooFit.Cut(
"mixState==mixState::mixed"))
71bmix_gm1.plotOn(frame2, ROOT.RooFit.Slice(mixState,
"mixed"))
74frame3 = dt.frame(ROOT.RooFit.Title(
75 "Decay distribution of unmixed events"))
76data.plotOn(frame3, ROOT.RooFit.Cut(
"mixState==mixState::unmixed"))
80bmix_gm1.plotOn(frame3, ROOT.RooFit.Slice(mixState,
"unmixed"))
82c = ROOT.TCanvas(
"rf310_sliceplot",
"rf310_sliceplot", 1200, 400)
85ROOT.gPad.SetLeftMargin(0.15)
86frame.GetYaxis().SetTitleOffset(1.4)
90ROOT.gPad.SetLeftMargin(0.15)
91frame2.GetYaxis().SetTitleOffset(1.4)
95ROOT.gPad.SetLeftMargin(0.15)
96frame3.GetYaxis().SetTitleOffset(1.4)
100c.SaveAs(
"rf310_sliceplot.png")