23t = ROOT.RooRealVar(
"t",
"t", 0, 5)
24tmin = ROOT.RooRealVar(
"tmin",
"tmin", 0, 0, 5)
27t.setRange(tmin, ROOT.RooFit.RooConst(t.getMax()))
30tau = ROOT.RooRealVar(
"tau",
"tau", -1.54, -10, -0.1)
31model = ROOT.RooExponential(
"model",
"model", t, tau)
37dall = model.generate(ROOT.RooArgSet(t), 10000)
40tmp = ROOT.RooGaussian(
"gmin",
"gmin", tmin, ROOT.RooFit.RooConst(
41 0), ROOT.RooFit.RooConst(0.5)).generate(ROOT.RooArgSet(tmin), 5000)
44dacc = model.generate(ROOT.RooArgSet(t), ROOT.RooFit.ProtoData(tmp))
49r = model.fitTo(dacc, ROOT.RooFit.Save())
55frame = t.frame(ROOT.RooFit.Title(
"Fit to data with per-event acceptance"))
56dall.plotOn(frame, ROOT.RooFit.MarkerColor(ROOT.kRed),
57 ROOT.RooFit.LineColor(ROOT.kRed))
64c = ROOT.TCanvas(
"rf314_paramranges",
"rf314_paramranges", 600, 600)
65ROOT.gPad.SetLeftMargin(0.15)
66frame.GetYaxis().SetTitleOffset(1.6)
69c.SaveAs(
"rf314_paramranges.png")