26dt = ROOT.RooRealVar(
"dt",
"dt", -10, 10)
27tau = ROOT.RooRealVar(
"tau",
"tau", 1.548)
30tm = ROOT.RooTruthModel(
"tm",
"truth model", dt)
33decay_tm = ROOT.RooDecay(
"decay_tm",
"decay", dt, tau, tm, type=
"DoubleSided")
36frame = dt.frame(Title=
"Bdecay (x) resolution")
37decay_tm.plotOn(frame, LineStyle=
"--")
43bias1 = ROOT.RooRealVar(
"bias1",
"bias1", 0)
44sigma1 = ROOT.RooRealVar(
"sigma1",
"sigma1", 1)
45gm1 = ROOT.RooGaussModel(
"gm1",
"gauss model 1", dt, bias1, sigma1)
48decay_gm1 = ROOT.RooDecay(
"decay_gm1",
"decay", dt, tau, gm1, type=
"DoubleSided")
51decay_gm1.plotOn(frame)
57bias2 = ROOT.RooRealVar(
"bias2",
"bias2", 0)
58sigma2 = ROOT.RooRealVar(
"sigma2",
"sigma2", 5)
59gm2 = ROOT.RooGaussModel(
"gm2",
"gauss model 2", dt, bias2, sigma2)
62gm1frac = ROOT.RooRealVar(
"gm1frac",
"fraction of gm1", 0.5)
63gmsum = ROOT.RooAddModel(
"gmsum",
"sum of gm1 and gm2", [gm1, gm2], [gm1frac])
66decay_gmsum = ROOT.RooDecay(
"decay_gmsum",
"decay", dt, tau, gmsum, ROOT.RooDecay.DoubleSided)
69decay_gmsum.plotOn(frame, LineColor=
"r")
72c = ROOT.TCanvas(
"rf209_anaconv",
"rf209_anaconv", 600, 600)
73ROOT.gPad.SetLeftMargin(0.15)
74frame.GetYaxis().SetTitleOffset(1.6)
77c.SaveAs(
"rf209_anaconv.png")