16x = ROOT.RooRealVar(
"x",
"x", -10, 10)
19sigma = ROOT.RooRealVar(
"sigma",
"sigma", 1, 0.1, 10)
20mean = ROOT.RooRealVar(
"mean",
"mean", -3, -10, 10)
21gauss = ROOT.RooGaussian(
"gauss",
"gauss", x, mean, sigma)
24data = gauss.generate(ROOT.RooArgSet(x), 1000)
33frame = x.frame(ROOT.RooFit.Name(
"xframe"), ROOT.RooFit.Title(
34 "RooPlot with decorations"), ROOT.RooFit.Bins(40))
42gauss.paramOn(frame, ROOT.RooFit.Layout(0.55))
49data.statOn(frame, ROOT.RooFit.Layout(0.55, 0.99, 0.8))
55txt = ROOT.TText(2, 100,
"Signal")
57txt.SetTextColor(ROOT.kRed)
61arrow = ROOT.TArrow(2, 100, -1, 50, 0.01,
"|>")
62arrow.SetLineColor(ROOT.kRed)
63arrow.SetFillColor(ROOT.kRed)
70f = ROOT.TFile(
"rf106_plotdecoration.root",
"RECREATE")
78c = ROOT.TCanvas(
"rf106_plotdecoration",
"rf106_plotdecoration", 600, 600)
79ROOT.gPad.SetLeftMargin(0.15)
80frame.GetYaxis().SetTitleOffset(1.6)
83c.SaveAs(
"rf106_plotdecoration.png")