next up previous contents
Next: EGS4_AUSGAB. Up: Electron, Positrons, and Gammas Previous: Electron, Positrons, and Gammas   Contents

EGS4_HOWFAR - the geometry routine.

In a normal implementation of EGS, the EGS4_HOWFAR routine would specify the geometry of the simulation. However, in this implementation of SNOMAN, the authors have tried to avoid having the geometry specified in more than one place (in order to limit the potential for the confusion when the geometry is changed!) and thus HOWFAR acts more as an interpreter between the EGS code and GE_NEXT, the SNOMAN geometry routine, as well as handling the changes in region number as the particle crosses a boundary. EGS4_HOWFAR then calls GE_NEXT to find the distance to the next boundary in the particle's current direction of motion. If this is greater than the particle's proposed next step, then no boundary will be encountered, EGS4_HOWFAR returns and execution continues. If the distance to the boundary is shorter than the proposed step length then EGS4_HOWFAR sets the step length to that distance and then determines (based on the media code returned to it by GE_NEXT) what the medium on the other side of the boundary is.

EGS4_HOWFAR is currently set up with fourteen regions. These correspond to the 14 media types found in the PEGS file. It should be emphasised that these regions have no geometrical significance, and serve only to tell the EGS code what the characteristics of the particle's current medium are. Care should be taken not to disturb the order of the materials in the PEGS file (if remaking it to change the values of AE or AP for example) as this will destroy the operation of the code.


next up previous contents
Next: EGS4_AUSGAB. Up: Electron, Positrons, and Gammas Previous: Electron, Positrons, and Gammas   Contents
sno Guest Acct 2009-09-09