24t = ROOT.RooRealVar(
"t",
"t", 0, 5)
25tmin = ROOT.RooRealVar(
"tmin",
"tmin", 0, 0, 5)
28t.setRange(tmin, ROOT.RooFit.RooConst(t.getMax()))
31tau = ROOT.RooRealVar(
"tau",
"tau", -1.54, -10, -0.1)
32model = ROOT.RooExponential(
"model",
"model", t, tau)
38dall = model.generate(ROOT.RooArgSet(t), 10000)
41tmp = ROOT.RooGaussian(
"gmin",
"gmin", tmin, ROOT.RooFit.RooConst(
42 0), ROOT.RooFit.RooConst(0.5)).generate(ROOT.RooArgSet(tmin), 5000)
45dacc = model.generate(ROOT.RooArgSet(t), ROOT.RooFit.ProtoData(tmp))
50r = model.fitTo(dacc, ROOT.RooFit.Save())
56frame = t.frame(ROOT.RooFit.Title(
"Fit to data with per-event acceptance"))
57dall.plotOn(frame, ROOT.RooFit.MarkerColor(ROOT.kRed),
58 ROOT.RooFit.LineColor(ROOT.kRed))
65c = ROOT.TCanvas(
"rf314_paramranges",
"rf314_paramranges", 600, 600)
66ROOT.gPad.SetLeftMargin(0.15)
67frame.GetYaxis().SetTitleOffset(1.6)
70c.SaveAs(
"rf314_paramranges.png")