Hi ROOT,
I would like to be able to use TTree::Draw() to plot quantities in the current entry against quantities in the prior entry of my tree. I thought I could do this using a tree index and friendship but I am failing to make the two trees out-of-sync by one entry. It may be that I am not correctly understanding how TreeIndex/Friends work.
Attached is a modified version of treefriend.C from the tutorial area that shows what I'm trying to do. My changes are near comments like "//bv". The pertinent line is:
TF->BuildIndex("Event-1","0");
The documentation says that an expression can be used for the "majorname" and/or "minorname" so I expected this should work. Runing the script like:
root -l treefriend.C
will produce a plot of the difference in Event numbers between the original and the copied/indexed/friended trees. I want it to produce a spike at +1 but it gives one at 0. This indicates to me (?) that the trees are not out of step by 1 entry as I want.
Any ideas how to make this work?
BTW, I have found I can do what I want by calling CopyTree("Event>0"), that is, not write out the first entry, but I'd like to find an index-based solution if there is one.
Thanks,
-Brett.
PS: Version 5.26/00e on linuxx8664gcc, SL5.3
This archive was generated by hypermail 2.2.0 : Tue Sep 27 2011 - 23:50:02 CEST