This is a bit of a speculative question, so apologies in advance if this is not clear.
I have a TTree with a number of branches. At the moment, this is processed using a TSelector, going entry by entry and making graphs etc.
I would like to calculate a numerical differential between two of the branches e.g. suppose my branches were 1D displacement of a particle, x, and the time, t, then I want to calculate something like
dx/dt ~ ( x[n+1] - x[n] )/( t[n+1] - t[n] ) for all n
where n is just the entry number (or something similar - choose your favourite method here)
However, my TSelector only accesses one entry at a time (as far as I know), so I can’t take a difference between branches easily. While this could be sidestepped by remembering the previous value or so, I have more than two branches, so that its not trivial to just remember the last value – e.g. like also having y, z, temperature, size of particle, etc. which vary as well. I can’t calculate dx/dt with fixed temperature if the next entry has a different temperature…
Is there any way to calculate sums like this one with a TSelector?
ROOT Version: 6.18/04