Routine ID: TRAK300 | |
---|---|
Author(s): | Submitted: 01.06.83 |
Origin: R.Brun | Revised: 14.12.93 |
During transport, particles can generate new particles, called secondary. In GEANT these particles are stored in the common /GCKING/ (see [BASE030] for an explanation of the variables in this common). The number of particles generated in the current step is NGKINE (common /GCKING/). If no user action is taken, the variable NGKINE is reset to 0 at the beginning of the subsequent step and these particles are not transported.
To be transported by GEANT, these particles need to be stored in the data structure JSTAK (see [TRACK399]) which normally is a LIFO stack: the last particle generated is the first one to be tracked when the current one stops. The order of tracking can be changed by the user, plase see [TRAK310] for more information on this subject.
The routine GSKING moves particles from the /GCKING/ common to the JSTAK structure, where GEANT looks for particles to transport.
When a particle is fetched from the JSTAK data structure, its place is freed for a new one, so the information on the initial kinematics of this track is lost. It may be useful in some occasion to record the initial kinematic of a track and save it till the end of the event. This is accomplished by storing the particle information both in the JSTAK data structure and in the JVERTX/JKINE one, which is permanent throughout the life of the event. As already said in [KINE100], this should not be done by the user calling directly the GSVERT/GSKINE routines during tracking, but rather controlling the action of GSKING via the array IFLGK in common /GCKING/. If the particle number IG generated in the current step ( 1 IG
NGKINE) is being moved to the JSTAK stack, either singularly or together with all the other particles generated in the current step (setting the argument of GSKING to 0), the action performed depends on IFLGK(IG):
If IFLGK(IG)>0, after the call to GSKING, IFLGK(IG) is set to the newly created track number in JKINE. The number of the vertex used is returned in IFLGK(NGKINE+1). This feature allows the user to identify the created vertex and tracks via the routines GSVERU and GSKINU (see [KINE100]).