Notes on new shower track philosophy
G. Eppley and P. Nevski
14-Feb-1997

New versions of GSTAR and G2T were released on Feb. 10, 1997 containing a new  treatment of secondary tracks. The definition if shower tracks in the GSTAR document, STAR note 235, p 11, is now obsolete. There is no longer a distinction  between the way shower tracks and secondary tracks are handled in the G2T event  tables.  In general, it is undesirable to save all the secondary tracks produced in dense  material in the detector because of space considerations in the eventrecord.   Most of these secondary particles never interact with sensitive material in the  detector. It is, however, often desirable to be able to determine the origin of  hits from secondary tracks. 

Normally GEANT places secondary tracks in a temporary stack and does not write them out.  The new version of GSTAR appends any secondary track which produces  a hit in a specified detector (see detailed example below) to the output KINE bank.  In the output g2t_track table, start_vertex_p points to the starting vertex of the track in g2t_vertex for both primary tracks and for secondaries that have been saved. In the g2t_vertex table, parent_p points to zero in the case of primary tracks or to the closest saved ancestor track in the case of  secondary tracks.  If the intervening tracks and vertices have not been saved  (as in a shower in non sensitive material), the vertex is displaced in space from the ancestor track and is_shower = 1 in g2t_track. 

It is also possible to save secondary tracks whether or not they produce hits. This is achieved with the following commands:

MODE TRAC SIMU 2
DETP TRAC proc rmax zmax epar epro

where proc       = GEANT process (see PHYS001-3) or ALL
      rmax, zmax = outer limits for saving secondaries, (cm)
      epar, epro = minimum energy for PARent and secondary (PROduct), (GeV)

The default setting in gstar_example.scr is
MODE TRAC SIMU 2
DETP TRAC DCAY 220. 270. 0. 0.

The following command determines whether hits are saved and whether secondary tracks producing hits are saved:

MODE dete SIMU n

where dete = GSTAR subdetector, e.g. TPCE
         = 0, no hit production
             1, hit production
             2, hit production and secondary tracks producing hits are saved

The default setting in gstar_example.scr is:
MODE TPCE SIMU 2
MODE FTPC SIMU 2
MODE SVTT SIMU 2
MODE BTOF SIMU 2

As a result of the above setting, a secondary track that produces a hit in  any of the specified detectors will be saved.

Historically, next_parent_p in g2t_track pointed to the closest saved ancestor  track in the case of tracks with is_shower = 1. (There was no entry in g2t_vertex.) This pointer has been retained temporarily for secondary tracks. It will be dropped in a subsequent release of G2T since two different ways of finding the ancestor track are not necessary.