12from __future__
import print_function
19x = ROOT.RooRealVar(
"x",
"x", -10, 10)
22gx = ROOT.RooGaussian(
"gx",
"gx", x, ROOT.RooFit.RooConst(-2), ROOT.RooFit.RooConst(3))
28print(
"gx = ", gx.getVal())
32print(
"gx_Norm[x] = ", gx.getVal(nset))
36igx = gx.createIntegral({x})
37print(
"gx_Int[x] = ", igx.getVal())
43x.setRange(
"signal", -5, 5)
49igx_sig = gx.createIntegral(xset, NormSet=xset, Range=
"signal")
50print(
"gx_Int[x|signal]_Norm[x] = ", igx_sig.getVal())
57gx_cdf = gx.createCdf({x})
60frame = x.frame(Title=
"cdf of Gaussian pdf")
64c = ROOT.TCanvas(
"rf110_normintegration",
"rf110_normintegration", 600, 600)
65ROOT.gPad.SetLeftMargin(0.15)
66frame.GetYaxis().SetTitleOffset(1.6)
69c.SaveAs(
"rf110_normintegration.png")