23ROOT.ROOT.EnableImplicitMT()
27dd = d.Define(
"x",
"gRandom->Uniform(-5., 5.)").Define(
"y",
"gRandom->Gaus(1., 3.)")
31x = ROOT.RooRealVar(
"x",
"x", -5.0, 5.0)
32y = ROOT.RooRealVar(
"y",
"y", -50.0, 50.0)
49 ROOT.std.move(ROOT.RooDataSetHelper(
"dataset",
"Title of dataset", ROOT.RooArgSet(x, y))), (
"x",
"y")
55rdhMaker = ROOT.RooDataSetHelper(
"dataset",
"Title of dataset", ROOT.RooArgSet(x, y))
58rooDataHist = dd.Book(ROOT.std.move(rdhMaker), (
"x",
"y"))
66for data
in [rooDataSet, rooDataHist]:
68 for i
in range(data.numEntries(), 20):
70 for var
in data.get(i):
71 print(
"{0:.3f}".format(var.getVal()))
72 print(
")\tweight= {0:<10}".format(data.weight()))
74 print(
"mean(x) = {0:.3f}".format(data.mean(x)) +
"\tsigma(x) = {0:.3f}".format(math.sqrt(data.moment(x, 2.0))))
75 print(
"mean(y) = {0:.3f}".format(data.mean(y)) +
"\tsigma(y) = {0:.3f}\n".format(math.sqrt(data.moment(y, 2.0))))
ROOT's RDataFrame offers a high level interface for analyses of data stored in TTree,...