16coordDefineCode =
'''ROOT::VecOps::RVec<double> {0}(len);
17 std::transform({0}.begin(), {0}.end(), {0}.begin(), [](double){{return gRandom->Uniform(-1.0, 1.0);}});
19d = df.Define("len", "gRandom->Uniform(0, 16)")\
20 .Define("x", coordDefineCode.format(
"x"))\
21 .Define(
"y", coordDefineCode.format(
"y"))
27d1 = d.Define(
"r",
"sqrt(x*x + y*y)")
32ring_h = d1.Define(
"rInFig",
"r > .4 && r < .8 && x*y < 0")\
33 .Define(
"yFig",
"y[rInFig]")\
34 .Define(
"xFig",
"x[rInFig]")\
35 .Histo2D((
"fig",
"Two quarters of a ring", 64, -1, 1, 64, -1, 1),
"xFig",
"yFig")
ROOT's RDataFrame offers a high level interface for analyses of data stored in TTrees,...