18dt = ROOT.RooRealVar(
"dt",
"dt", -20, 20)
19dm = ROOT.RooRealVar(
"dm",
"dm", 0.472)
20tau = ROOT.RooRealVar(
"tau",
"tau", 1.547)
21w = ROOT.RooRealVar(
"w",
"mistag rate", 0.1)
22dw = ROOT.RooRealVar(
"dw",
"delta mistag rate", 0.)
24mixState = ROOT.RooCategory(
"mixState",
"B0/B0bar mixing state")
25mixState.defineType(
"mixed", -1)
26mixState.defineType(
"unmixed", 1)
27tagFlav = ROOT.RooCategory(
"tagFlav",
"Flavour of the tagged B0")
28tagFlav.defineType(
"B0", 1)
29tagFlav.defineType(
"B0bar", -1)
32dterr = ROOT.RooRealVar(
"dterr",
"dterr", 0.1, 1.0)
33bias1 = ROOT.RooRealVar(
"bias1",
"bias1", 0)
34sigma1 = ROOT.RooRealVar(
"sigma1",
"sigma1", 0.1)
35gm1 = ROOT.RooGaussModel(
"gm1",
"gauss model 1", dt, bias1, sigma1)
38bmix = ROOT.RooBMixDecay(
"bmix",
"decay", dt, mixState, tagFlav,
39 tau, dm, w, dw, gm1, ROOT.RooBMixDecay.DoubleSided)
45data = bmix.generate(ROOT.RooArgSet(dt, mixState, tagFlav), 2000)
54tbins = ROOT.RooBinning(-15, 15)
57tbins.addUniform(60, -15, 0)
60tbins.addUniform(15, 0, 15)
63dtframe = dt.frame(ROOT.RooFit.Range(-15, 15),
64 ROOT.RooFit.Title(
"dt distribution with custom binning"))
65data.plotOn(dtframe, ROOT.RooFit.Binning(tbins))
79abins = ROOT.RooBinning(-10, 10)
83abins.addBoundaryPair(1)
84abins.addBoundaryPair(2)
85abins.addBoundaryPair(3)
86abins.addBoundaryPair(4)
87abins.addBoundaryPair(6)
90aframe = dt.frame(ROOT.RooFit.Range(-10, 10), ROOT.RooFit.Title(
91 "mixState asymmetry distribution with custom binning"))
94data.plotOn(aframe, ROOT.RooFit.Asymmetry(
95 mixState), ROOT.RooFit.Binning(abins))
98bmix.plotOn(aframe, ROOT.RooFit.Asymmetry(mixState))
101aframe.SetMinimum(-1.1)
102aframe.SetMaximum(1.1)
108c = ROOT.TCanvas(
"rf108_plotbinning",
"rf108_plotbinning", 800, 400)
111ROOT.gPad.SetLeftMargin(0.15)
112dtframe.GetYaxis().SetTitleOffset(1.6)
115ROOT.gPad.SetLeftMargin(0.15)
116aframe.GetYaxis().SetTitleOffset(1.6)
119c.SaveAs(
"rf108_plotbinning.png")