24x = ROOT.RooRealVar(
"x",
"x", -10, 10)
25mean = ROOT.RooRealVar(
"mean",
"mean of gaussian", 1, -10, 10)
26sigma = ROOT.RooRealVar(
"sigma",
"width of gaussian", 1, 0.1, 10)
29gauss = ROOT.RooGaussian(
"gauss",
"gaussian PDF", x, mean, sigma)
35dgdx = gauss.derivative(x, 1)
38d2gdx2 = gauss.derivative(x, 2)
39d3gdx3 = gauss.derivative(x, 3)
42xframe = x.frame(Title=
"d(Gauss)/dx")
48dgdx.plotOn(xframe, LineColor=
"m")
49d2gdx2.plotOn(xframe, LineColor=
"r")
50d3gdx3.plotOn(xframe, LineColor=
"kOrange")
56dgds = gauss.derivative(sigma, 1)
59d2gds2 = gauss.derivative(sigma, 2)
60d3gds3 = gauss.derivative(sigma, 3)
63sframe = sigma.frame(Title=
"d(Gauss)/d(sigma)", Range=(0.0, 2.0))
69dgds.plotOn(sframe, LineColor=
"m")
70d2gds2.plotOn(sframe, LineColor=
"r")
71d3gds3.plotOn(sframe, LineColor=
"kOrange")
74c = ROOT.TCanvas(
"rf111_derivatives",
"rf111_derivatives", 800, 400)
77ROOT.gPad.SetLeftMargin(0.15)
78xframe.GetYaxis().SetTitleOffset(1.6)
81ROOT.gPad.SetLeftMargin(0.15)
82sframe.GetYaxis().SetTitleOffset(1.6)
85c.SaveAs(
"rf111_derivatives.png")