13from __future__
import print_function
20x = ROOT.RooRealVar(
"x",
"x", -10, 10)
24 "gx",
"gx", x, ROOT.RooFit.RooConst(-2), ROOT.RooFit.RooConst(3))
30print(
"gx = ", gx.getVal())
33nset = ROOT.RooArgSet(x)
34print(
"gx_Norm[x] = ", gx.getVal(nset))
38igx = gx.createIntegral(ROOT.RooArgSet(x))
39print(
"gx_Int[x] = ", igx.getVal())
45x.setRange(
"signal", -5, 5)
50xset = ROOT.RooArgSet(x)
51igx_sig = gx.createIntegral(xset, ROOT.RooFit.NormSet(xset), ROOT.RooFit.Range(
"signal"))
52print(
"gx_Int[x|signal]_Norm[x] = ", igx_sig.getVal())
59gx_cdf = gx.createCdf(ROOT.RooArgSet(x))
62frame = x.frame(ROOT.RooFit.Title(
"c.d.f of Gaussian p.d.f"))
66c = ROOT.TCanvas(
"rf110_normintegration",
67 "rf110_normintegration", 600, 600)
68ROOT.gPad.SetLeftMargin(0.15)
69frame.GetYaxis().SetTitleOffset(1.6)
72c.SaveAs(
"rf110_normintegration.png")