Compress common variables in 2 daughter classes in a tree?

Dear all,

I have a base class “Event” and two children “Vertex” and “Spectrum”. The children have their own member functions to fill their own private data members using protected data members in the base class. I would like to save both children in a TTree. However, their common data members inherited from “Event” are duplicated. Is ROOT capable to compress the common part? Do I have to do something to achieve this? Or is there a better way to do it?



One way to solve this problem is to move all variables and functions from the children classes to the base class “Event”. However, as time goes by, “Event” grows bigger and bigger. Is there a way to avoid this?