23df =
ROOT.RDataFrame(2000000).Define(
"x",
"gRandom->Uniform(-5., 5.)").Define(
"y",
"gRandom->Gaus(1., 3.)")
27x = ROOT.RooRealVar(
"x",
"x", -5.0, 5.0)
28y = ROOT.RooRealVar(
"y",
"y", -50.0, 50.0)
54roo_data_set_result = df.Book(
55 ROOT.std.move(ROOT.RooDataSetHelper(
"dataset",
"Title of dataset", ROOT.RooArgSet(x, y))), (
"x",
"y")
61rdhMaker = ROOT.RooDataHistHelper(
"dataset",
"Title of dataset", ROOT.RooArgSet(x, y))
64roo_data_hist_result = df.Book(ROOT.std.move(rdhMaker), (
"x",
"y"))
73roo_data_set = roo_data_set_result.GetValue()
74roo_data_hist = roo_data_hist_result.GetValue()
82 for i
in range(min(data.numEntries(), 20)):
85 +
", ".join([
"{0:8.3f}".
format(var.getVal())
for var
in data.get(i)])
86 +
", ) weight={0:10.3f}".
format(data.weight())
89 print(
"mean(x) = {0:.3f}".
format(data.mean(x)) +
"\tsigma(x) = {0:.3f}".
format(math.sqrt(data.moment(x, 2.0))))
90 print(
"mean(y) = {0:.3f}".
format(data.mean(y)) +
"\tsigma(y) = {0:.3f}\n".
format(math.sqrt(data.moment(y, 2.0))))
93print_data(roo_data_set)
94print_data(roo_data_hist)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t format
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...