16from __future__
import print_function
23x = ROOT.RooRealVar(
"x",
"x", -10, 10)
27 "gx",
"gx", x, ROOT.RooFit.RooConst(-2), ROOT.RooFit.RooConst(3))
33print(
"gx = ", gx.getVal())
36nset = ROOT.RooArgSet(x)
37print(
"gx_Norm[x] = ", gx.getVal(nset))
41igx = gx.createIntegral(ROOT.RooArgSet(x))
42print(
"gx_Int[x] = ", igx.getVal())
48x.setRange(
"signal", -5, 5)
53igx_sig = gx.createIntegral(ROOT.RooArgSet(x), ROOT.RooFit.NormSet(
54 ROOT.RooArgSet(x)), ROOT.RooFit.Range(
"signal"))
55print(
"gx_Int[x|signal]_Norm[x] = ", igx_sig.getVal())
62gx_cdf = gx.createCdf(ROOT.RooArgSet(x))
65frame = x.frame(ROOT.RooFit.Title(
"c.d.f of Gaussian p.d.f"))
69c = ROOT.TCanvas(
"rf110_normintegration",
70 "rf110_normintegration", 600, 600)
71ROOT.gPad.SetLeftMargin(0.15)
72frame.GetYaxis().SetTitleOffset(1.6)
75c.SaveAs(
"rf110_normintegration.png")