@Axel, Say in your example I specifically want to plot the difference in phi between the station 3 and st. 5 hit. Assume you don’t have repeated stations hits just to keep this simple. Does Tree.Draw have a way to pick out these two hits and draw the difference?
Maybe it is more clear if I show what I want to do using an event loop:
for iEvt in range(evt_tree.GetEntries()):
for i in range(len(evt_tree.hit_station)):
if evt_tree.hit_station[i] == 1: var1 = evt_tree.hit_phi[i]
if evt_tree.hit_station[i] == 2: var2 = evt_tree.hit_phi[i]
(Of course you must have both station hits available in the event, but hopefully the idea is clear).
I am trying to avoid using an event loop because it takes too long to fill histograms for millions of events. Instead I want to do this with Tree.Draw because that is much faster. Is this more clear what I am trying to do, or still not clear enough?