23 auto vGen = [&](
int len) {
25 std::transform(
v.begin(),
v.end(),
v.begin(), unifGen);
29 auto d0 =
d.Define(
"len", []() {
return (
int)
gRandom->
Uniform(0, 16); })
30 .Define(
"x", vGen, {
"len"})
31 .Define(
"y", vGen, {
"len"});
37 auto d1 = d0.Define(
"r",
"sqrt(x*x + y*y)");
42 auto ring_h = d1.Define(
"rInFig",
"r > .4 && r < .8 && x*y < 0")
43 .Define(
"yFig",
"y[rInFig]")
44 .Define(
"xFig",
"x[rInFig]")
45 .Histo2D({
"fig",
"Two quarters of a ring", 64, -1, 1, 64, -1, 1},
"xFig",
"yFig");
48 ring_h->DrawCopy(
"Colz");
R__EXTERN TRandom * gRandom
ROOT's RDataFrame offers a high level interface for analyses of data stored in TTrees,...
A "std::vector"-like collection of values implementing handy operation to analyse them.
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).