When tracking particles through a complex structure one of the critical tasks is the estimation a priori of the step size. This is performed automatically by the program. For a particle with a given energy the step size depends primarily on the intrinsic properties of the particle (mass, charge, lifetime, etc.) and on the characteristics of the current medium. The dependence may be due either to the (quasi)continuous processes which usually impose a limit to the interval of integration (energy loss, multiple scattering ...) or to the occurrence of a discrete process which introduces a discontinuity in the trajectory (decay, electromagnetic or hadronic interaction). The modification of the kinematic parameters (position and energy) due to continuous processes between two discrete ones is taken into account and the necessary modifications are applied at the end of the step.
In addition to the physical effects there are constraints of a geometrical nature, the step being limited by the path length to the medium boundary. In practice, the step size depends ultimately on a set of tolerances and cuts, which the program will set automatically, but which may be also optimised by the user, such as:
These quantities are part of the so-called tracking medium parameters. They can either be calculated by the program or provided by the user and are stored in the data structure JTMED, through the routine GSTMED (see [CONS]). Usually, this is done together with the initialisation of the geometrical setup. The optimisation is by no means trivial as the economy of computing time should not lead to an unacceptable loss of accuracy.
Other information required for the computation of the step size is found in the data structures JPART and JMATE, for the properties of the particles and of the materials, and in the data structure JVOLUM, for the current medium and its geometrical boundaries. The communication between the tracking package and the structure JVOLUM is achieved through the basic subroutines of the geometry package GMEDIA, GTMEDI, GTNEXT and GINVOL (see [GEOM]). Some information is computed at tracking time such as the probability of occurrence of an interaction.
For convenience every particle is assigned a tracking type:
Which processes have to be considered for a given particle depends on its tracking type. For the hadrons it depends also, through the subroutine GUPHAD, on which hadronic processes from GHEISHA, FLUKA have been selected (see [PHYS001]).