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.0)
23mixState = ROOT.RooCategory(
"mixState",
"B0/B0bar mixing state", {
"mixed": -1,
"unmixed": 1})
24tagFlav = ROOT.RooCategory(
"tagFlav",
"Flavour of the tagged B0", {
"B0": 1,
"B0bar": -1})
27dterr = ROOT.RooRealVar(
"dterr",
"dterr", 0.1, 1.0)
28bias1 = ROOT.RooRealVar(
"bias1",
"bias1", 0)
29sigma1 = ROOT.RooRealVar(
"sigma1",
"sigma1", 0.1)
30gm1 = ROOT.RooGaussModel(
"gm1",
"gauss model 1", dt, bias1, sigma1)
33bmix = ROOT.RooBMixDecay(
"bmix",
"decay", dt, mixState, tagFlav, tau, dm, w, dw, gm1, type=
"DoubleSided")
39data = bmix.generate({dt, mixState, tagFlav}, 2000)
48tbins = ROOT.RooBinning(-15, 15)
51tbins.addUniform(60, -15, 0)
54tbins.addUniform(15, 0, 15)
57dtframe = dt.frame(Range=(-15, 15), Title=
"dt distribution with custom binning")
58data.plotOn(dtframe, Binning=tbins)
72abins = ROOT.RooBinning(-10, 10)
76abins.addBoundaryPair(1)
77abins.addBoundaryPair(2)
78abins.addBoundaryPair(3)
79abins.addBoundaryPair(4)
80abins.addBoundaryPair(6)
83aframe = dt.frame(Range=(-10, 10), Title=
"mixState asymmetry distribution with custom binning")
86data.plotOn(aframe, Asymmetry=mixState, Binning=abins)
89bmix.plotOn(aframe, Asymmetry=mixState)
92aframe.SetMinimum(-1.1)
99c = ROOT.TCanvas(
"rf108_plotbinning",
"rf108_plotbinning", 800, 400)
102ROOT.gPad.SetLeftMargin(0.15)
103dtframe.GetYaxis().SetTitleOffset(1.6)
106ROOT.gPad.SetLeftMargin(0.15)
107aframe.GetYaxis().SetTitleOffset(1.6)
110c.SaveAs(
"rf108_plotbinning.png")