12from __future__
import print_function
19x = ROOT.RooRealVar(
"x",
"x", -10, 10)
23 "gx",
"gx", x, ROOT.RooFit.RooConst(-2), ROOT.RooFit.RooConst(3))
29print(
"gx = ", gx.getVal())
32nset = ROOT.RooArgSet(x)
33print(
"gx_Norm[x] = ", gx.getVal(nset))
37igx = gx.createIntegral(ROOT.RooArgSet(x))
38print(
"gx_Int[x] = ", igx.getVal())
44x.setRange(
"signal", -5, 5)
49xset = ROOT.RooArgSet(x)
50igx_sig = gx.createIntegral(xset, ROOT.RooFit.NormSet(xset), ROOT.RooFit.Range(
"signal"))
51print(
"gx_Int[x|signal]_Norm[x] = ", igx_sig.getVal())
58gx_cdf = gx.createCdf(ROOT.RooArgSet(x))
61frame = x.frame(ROOT.RooFit.Title(
"cdf of Gaussian pdf"))
65c = ROOT.TCanvas(
"rf110_normintegration",
66 "rf110_normintegration", 600, 600)
67ROOT.gPad.SetLeftMargin(0.15)
68frame.GetYaxis().SetTitleOffset(1.6)
71c.SaveAs(
"rf110_normintegration.png")