19dt = ROOT.RooRealVar(
"dt",
"dt", -20, 20)
20dm = ROOT.RooRealVar(
"dm",
"dm", 0.472)
21tau = ROOT.RooRealVar(
"tau",
"tau", 1.547)
22w = ROOT.RooRealVar(
"w",
"mistag rate", 0.1)
23dw = ROOT.RooRealVar(
"dw",
"delta mistag rate", 0.0)
25mixState = ROOT.RooCategory(
"mixState",
"B0/B0bar mixing state", {
"mixed": -1,
"unmixed": 1})
26tagFlav = ROOT.RooCategory(
"tagFlav",
"Flavour of the tagged B0", {
"B0": 1,
"B0bar": -1})
29dterr = ROOT.RooRealVar(
"dterr",
"dterr", 0.1, 1.0)
30bias1 = ROOT.RooRealVar(
"bias1",
"bias1", 0)
31sigma1 = ROOT.RooRealVar(
"sigma1",
"sigma1", 0.1)
32gm1 = ROOT.RooGaussModel(
"gm1",
"gauss model 1", dt, bias1, sigma1)
35bmix = ROOT.RooBMixDecay(
"bmix",
"decay", dt, mixState, tagFlav, tau, dm, w, dw, gm1, type=
"DoubleSided")
41data = bmix.generate({dt, mixState, tagFlav}, 2000)
50tbins = ROOT.RooBinning(-15, 15)
53tbins.addUniform(60, -15, 0)
56tbins.addUniform(15, 0, 15)
59dtframe = dt.frame(Range=(-15, 15), Title=
"dt distribution with custom binning")
60data.plotOn(dtframe, Binning=tbins)
74abins = ROOT.RooBinning(-10, 10)
78abins.addBoundaryPair(1)
79abins.addBoundaryPair(2)
80abins.addBoundaryPair(3)
81abins.addBoundaryPair(4)
82abins.addBoundaryPair(6)
85aframe = dt.frame(Range=(-10, 10), Title=
"mixState asymmetry distribution with custom binning")
88data.plotOn(aframe, Asymmetry=mixState, Binning=abins)
91bmix.plotOn(aframe, Asymmetry=mixState)
94aframe.SetMinimum(-1.1)
101c = ROOT.TCanvas(
"rf108_plotbinning",
"rf108_plotbinning", 800, 400)
104ROOT.gPad.SetLeftMargin(0.15)
105dtframe.GetYaxis().SetTitleOffset(1.6)
108ROOT.gPad.SetLeftMargin(0.15)
109aframe.GetYaxis().SetTitleOffset(1.6)
112c.SaveAs(
"rf108_plotbinning.png")