Again on TTreeeReaderArray and TVector3

Hi all,
I apologize to re-open a topic that was already discussed, for instance in these two threads:

I’m experiencing the same issue but cannot find a way to solve it.

I produced a tree via geant4_vmc (Example02 with a few tweaks, not on the root output though: a few tracks per event, several hits per track). I’m trying to read the information on hits via TTreeReaderArray, which works pretty well when I need to retrieve an array of numbers (say, TTreeReaderArray<Double_t>), but fails when the array to be retrieved is made of TVector3’s: I just get nonsense numbers (10e-312), and the length of the TVector3 array I get is zero as well, very similar to the issue discussed in the first of the threads mentioned above.
Drawing the TVector3 components works fine, so I guess the issue is related to how TTreeReaderArray handles the array of TVector3 hits.
I am running root v6.12/06 on centOs7, compiled with gcc 4.8.5. The piece of code I am using to inspect the Tree content has been produced via MakeSelector (MakeClass does not work either).

Is there any update with respect to the suggestions quoted in the mentioned threads?
Were the TVector3 contained in a TClonesArray collection as suggested (which I’m not aware of, and I cannot get any hint about), is there a way to retrieve the correct information?

I attach the root file causing the issue:

Thanks, cheers

@pcanal maybe you can recommend something here?

never mind, I solved the issue by including in the tree as separate leaves the components of the TVector3 I wasn’t able to resolve. Not elegant, but effective.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.