+-------------+ +----------## | Geant 3.10 | GEANT User's Guide | GEOM310 ## +-------------+ +----------##
Author(s) : R.Brun,A.C.McPherson Submitted: 01.06.83 Origin : Same Revised: 20.05.86
+------------------------------------------------+ |CALL GNEXT (X,SNEXT*,SAFETY*) | +------------------------------------------------+
Finds distance to the next boundary. It takes explicit account of shape content and uniqueness.
The distance to the next boundary is evaluated analytically using the volume geometrical parameters. When used in a tracking context it happens very frequently that a particle may have many steps in the same volume.In that case it is time consuming to always call the GMEDIA and GNEXT routines. The safety radius parameter can be exploited by the tracking routines, in such a way that GMEDIA and GNEXT are only called when the sum of all steps in the current volume is greater than SAFETY
In some volumes with complicated configuration the evaluation of the safety radius will be much too time consuming . In order to not lose time on one side to gain it somewhere else, the safety radius is returned=0.
+----------------------------------------------------------------+ | CALL GNEXTS (X,SH,P,*IDIST*,SNEXT*,SAFETY*) | +----------------------------------------------------------------+
This is a steering routine which calls one of a series of specialized routines depending on the shape of the volume for which it is called . These routines compute both the absolute shortest distance from the point (assumed to be INSIDE the volume) to the boundary of the volume and also the distance along a vector to that boundary.If a flag is zero or if the distance along the vector is less than the current value of the argument SNEXT then that argument is updated with the new value.The absolute shortest distance is always returned.
+------------------------------------------------------------------+ | CALL GNOSOUT (X,SH,P,*IDIST*,SNEXT*,SAFETY*) | +------------------------------------------------------------------+
This is a steering routine which calls one of a series of specialized routines depending on the shape of the volume for which it is called. These routines compute both the absolute shortest distance from the point (assumed to be OUTSIDE the volume) to the boundary of the volume and also the distance along a vector to that boundary. If a positive value is found for the distance along the vector and if a flag is zero or if that distance is less than the current value of the argument SNEXT then that argument is updated with the new value . The absolute shortest distance is always returned.
Parameters are explained in GNEXTS above , except that in the event that IDIST is zero and no positive distance to the volume along the vector is found then IDIST remains as zero.