11from __future__
import print_function
18x = ROOT.RooRealVar(
"x",
"x", -10, 10)
22 "gx",
"gx", x, ROOT.RooFit.RooConst(-2), ROOT.RooFit.RooConst(3))
28print(
"gx = ", gx.getVal())
31nset = ROOT.RooArgSet(x)
32print(
"gx_Norm[x] = ", gx.getVal(nset))
36igx = gx.createIntegral(ROOT.RooArgSet(x))
37print(
"gx_Int[x] = ", igx.getVal())
43x.setRange(
"signal", -5, 5)
48xset = ROOT.RooArgSet(x)
49igx_sig = gx.createIntegral(xset, ROOT.RooFit.NormSet(xset), ROOT.RooFit.Range(
"signal"))
50print(
"gx_Int[x|signal]_Norm[x] = ", igx_sig.getVal())
57gx_cdf = gx.createCdf(ROOT.RooArgSet(x))
60frame = x.frame(ROOT.RooFit.Title(
"c.d.f of Gaussian p.d.f"))
64c = ROOT.TCanvas(
"rf110_normintegration",
65 "rf110_normintegration", 600, 600)
66ROOT.gPad.SetLeftMargin(0.15)
67frame.GetYaxis().SetTitleOffset(1.6)
70c.SaveAs(
"rf110_normintegration.png")