I have a TTree in which I have three branches that each store information about an object of a different type: call them A, B, and C. In each entry of my TTree I can have only two of the objects: I can have (A, B), or (A, C) or (B, C).
I’d like to keep the storage of each object separate (though their branches are identical in content), but add a branch that provides a pointer to the two that are stored in the TTree entry, so that in each branch I can use that branch to access which ever other entry exists in that entry, be it A or B, etc.
My understand is that aliases apply to the whole TTree (to all entries equally). I want something that points to a different branch of the tree depending on the particular entry.
My solution now has been to basically make an alias: using an extra variable that describes which branch should be grabbed, I can create an alias that grabs the correct one. But it’s not ideal.