Fill a 1-D histogram from a parametric function.
Original tutorial by Rene Brun.
import ROOT
c1 =
ROOT.TCanvas(
"c1",
"The FillRandom example",200,10,700,900)
pad1 =
ROOT.TPad(
"pad1",
"The pad with the function",0.05,0.50,0.95,0.95)
pad2 =
ROOT.TPad(
"pad2",
"The pad with the histogram",0.05,0.05,0.95,0.45)
sqroot =
ROOT.TF1(
"sqroot",
"x*gaus(0) + [3]*form1",0,10)
h1f =
ROOT.TH1F(
"h1f",
"Test random numbers",200,0,10)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
- Author
- Alberto Ferro
Definition in file fillrandom.py.