Differencing of variables in ntuple

Hello All,

I haven't seen where this can be done from the root command line, but I may be missing something. Suppose that I have an ntuple variable X, and what I really would like to plot is dX ( Adjacent entries.) Other than using a process loop on the ntuple, is there an easy way

to do this?

The only other way I can imagine is getting the column for a particular variable and then
manipulating it to produce dx.

Regards,
Chris

Hi,

TTree::Draw does not support correlating values from different entries.
Hence in order to plot the delta of a variable between 2 entries, you have to use a custom loop (I recomment using the result of MakeSelector).

Cheers,
Philippe.

Hi Chris,

This is a simple solution, eg
ntuple.Draw(“px”,"",“goff”);
double *px = ntuple.GetV1();
TGraph gr(ntuple.GetSelectedRows()-5, &px[0],&px[5]);
gr.Draw(“ap”)

This will show the correlation between entry i and entry i+5.

Rene