17dt = ROOT.RooRealVar(
"dt",
"dt", -20, 20)
18dm = ROOT.RooRealVar(
"dm",
"dm", 0.472)
19tau = ROOT.RooRealVar(
"tau",
"tau", 1.547)
20w = ROOT.RooRealVar(
"w",
"mistag rate", 0.1)
21dw = ROOT.RooRealVar(
"dw",
"delta mistag rate", 0.)
23mixState = ROOT.RooCategory(
"mixState",
"B0/B0bar mixing state")
24mixState.defineType(
"mixed", -1)
25mixState.defineType(
"unmixed", 1)
26tagFlav = ROOT.RooCategory(
"tagFlav",
"Flavour of the tagged B0")
27tagFlav.defineType(
"B0", 1)
28tagFlav.defineType(
"B0bar", -1)
31dterr = ROOT.RooRealVar(
"dterr",
"dterr", 0.1, 1.0)
32bias1 = ROOT.RooRealVar(
"bias1",
"bias1", 0)
33sigma1 = ROOT.RooRealVar(
"sigma1",
"sigma1", 0.1)
34gm1 = ROOT.RooGaussModel(
"gm1",
"gauss model 1", dt, bias1, sigma1)
37bmix = ROOT.RooBMixDecay(
"bmix",
"decay", dt, mixState, tagFlav,
38 tau, dm, w, dw, gm1, ROOT.RooBMixDecay.DoubleSided)
44data = bmix.generate(ROOT.RooArgSet(dt, mixState, tagFlav), 2000)
53tbins = ROOT.RooBinning(-15, 15)
56tbins.addUniform(60, -15, 0)
59tbins.addUniform(15, 0, 15)
62dtframe = dt.frame(ROOT.RooFit.Range(-15, 15),
63 ROOT.RooFit.Title(
"dt distribution with custom binning"))
64data.plotOn(dtframe, ROOT.RooFit.Binning(tbins))
78abins = ROOT.RooBinning(-10, 10)
82abins.addBoundaryPair(1)
83abins.addBoundaryPair(2)
84abins.addBoundaryPair(3)
85abins.addBoundaryPair(4)
86abins.addBoundaryPair(6)
89aframe = dt.frame(ROOT.RooFit.Range(-10, 10), ROOT.RooFit.Title(
90 "mixState asymmetry distribution with custom binning"))
93data.plotOn(aframe, ROOT.RooFit.Asymmetry(
94 mixState), ROOT.RooFit.Binning(abins))
97bmix.plotOn(aframe, ROOT.RooFit.Asymmetry(mixState))
100aframe.SetMinimum(-1.1)
101aframe.SetMaximum(1.1)
107c = ROOT.TCanvas(
"rf108_plotbinning",
"rf108_plotbinning", 800, 400)
110ROOT.gPad.SetLeftMargin(0.15)
111dtframe.GetYaxis().SetTitleOffset(1.6)
114ROOT.gPad.SetLeftMargin(0.15)
115aframe.GetYaxis().SetTitleOffset(1.6)
118c.SaveAs(
"rf108_plotbinning.png")