Creating ntuples of functions with the same independent variable

Please provide the following information:

ROOT Version (5.34/24):
Platform, compiler (scientific linux, gcc version 4.4.7):

Dear root experts,

I read an ASCII file that have the following columns

x a b c

a,b, and c values depend on the x value. Then calculate a function based on a, b, and c, lets say f1 and f2. Then I fill an ntuple with x:f1:f2 following an example from the tutorial (basic.C in the tutorial for trees). When I plot the distributions for x, f1 and f2, they all have different ranges, but when I plot a scatter plot of x:f1, and x:f2, I got the shapes that I want to see. How can I do to create ntuples in which the x axis correspond to x for all variables and the y axis corresponds to f1(x) and f2(x)?

Thanks in advance,


Hi Cesar,

ROOT6 has the solution for your problem, and it requires very little effort to be put in place (2-3 lines of code): TDataFrame and in particular its snapshot capabilities.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.