Link/Reference between Branches

Hi everybody

I have a question that I’ve tried to figure out with google for a while and I couldn’t. Not sure if it is because of the wording or because of my insufficient comprehension of root (I understand some basics but the more advanced functions are beyond me) so I thought I’ll just ask experienced people.

The problem is quite simple:
I have a lot of Events recorded by my DAQ.
For each Event I reconstruct tracks which den have a bunch of parameters (point, vector, chi2, …) which are of course all float
For each Event I then try to reconstruct one or multiple vertices out of the tracks (parameters are for example point and used tracks)

Currently I store the event information in one TTree, the Track information in one TTree and the Vertices in a third TTree. That requires me to once again store all the information associated with the tracks to the vertex Tree for me to be able to use their parameters.

Therefore the question is: Can I somehow refer to another TTree from my Vertices tree to just say: Vertex 1 was calculated using track 3,5,7 or something like that and then use that during analysis.
Or is there a completely different approach recommended for storing this kind of data (I imagine not being the first person wanting to do that)

Cheers
Ben

Hi Ben,

Maybe you can try to use the tree friends technique to connect your trees together…

Cheers, Bertrand