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