Process collections in RDataFrame with the help of RVec.
This tutorial shows the potential of the VecOps approach for treating collections stored in datasets, a situation very common in HEP data analysis.
{
auto vGen = [&](int len) {
std::transform(
v.begin(),
v.end(),
v.begin(), unifGen);
};
.Define("x", vGen, {"len"})
.Define("y", vGen, {"len"});
auto d1 = d0.Define("r", "sqrt(x*x + y*y)");
auto ring_h = d1.Define("rInFig", "r > .4 && r < .8 && x*y < 0")
.Define("yFig", "y[rInFig]")
.Define("xFig", "x[rInFig]")
.Histo2D({"fig", "Two quarters of a ring", 64, -1, 1, 64, -1, 1}, "xFig", "yFig");
ring_h->DrawCopy("Colz");
return 0;
}
R__EXTERN TRandom * gRandom
ROOT's RDataFrame offers a high level interface for analyses of data stored in TTree,...
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
- Date
- February 2018
- Author
- Danilo Piparo (CERN)
Definition in file df016_vecOps.C.