2 TClonesArray in Event

Hello rooters,
i have some doubts concerning my class structure. The problem is: in the Event I have particles and cells (in a calorimeter for instance). Both, Particles and Cells, are stored in TCloneArrays and i have pointers from Event class. I can immagine that in the near future I’ll want to analyse only Particles or only Cells. Shall I put them in two different Event classes so that when I read a tree I can choose one of two branches? Or the nature of TClonesArray saves the access time in this case?
Best regards, Mariusz Sapinski

Hi,

You have 2 TClonesArray pointer in your Event class and you create the branch with a split level greater or equal to 1 (the default is 99, so would work for you), you can the read the TClonesArray independently (they will be a separate sub branches of the Event branch).

Cheers,
Philippe