Our simulation will make use of the ROOT geometry package to build a detector and the virtual Monte Carlo to access one or more tracers. ROOT makes it possible also to store and visualize tracks, as it is done inside the drawing package with the TGeoTrack class.
Tracks are defined by specifying their integer identification number, the particle code (from the list by the Particle Data Group), the parent track (if any), and a particle object. In addition, each track has a (possibly empty) list of daughters, that are secondary tracks originating from it. A TGeoTrack opbject stores a list of control points (position in 3D and time), and the painting algorithm allows drawing them at any time later then their creation time.
Tracks are created and managed by the TGeoManager class, that keeps a list of all primary tracks (i.e. all tracks without parent track).