23t = ROOT.RooRealVar(
"t",
"t", -10, 30)
26ml = ROOT.RooRealVar(
"ml",
"mean landau", 5.0, -20, 20)
27sl = ROOT.RooRealVar(
"sl",
"sigma landau", 1, 0.1, 10)
28landau = ROOT.RooLandau(
"lx",
"lx", t, ml, sl)
31mg = ROOT.RooRealVar(
"mg",
"mg", 0)
32sg = ROOT.RooRealVar(
"sg",
"sg", 2, 0.1, 10)
33gauss = ROOT.RooGaussian(
"gauss",
"gauss", t, mg, sg)
39t.setBins(10000,
"cache")
42lxg = ROOT.RooFFTConvPdf(
"lxg",
"landau (X) gauss", t, landau, gauss)
48data = lxg.generate({t}, 10000)
51lxg.fitTo(data, PrintLevel=-1)
54frame = t.frame(Title=
"landau (x) gauss convolution")
57landau.plotOn(frame, LineStyle=
"--")
60c = ROOT.TCanvas(
"rf208_convolution",
"rf208_convolution", 600, 600)
61ROOT.gPad.SetLeftMargin(0.15)
62frame.GetYaxis().SetTitleOffset(1.4)
65c.SaveAs(
"rf208_convolution.png")