The following facilities are kept for backward compatibility reasons. If called by the user, these optimisation tools are called at initialisation time, but not used at tracking time. Instead, the new optimisation using 'virtual divisions' is performed. If the user wants to use the older optimisation tools, he can recompile GEANT 3.21 using the PATCHY flag +OLD.
From the position of the contents inside a given volume, the subroutine GSORD computes fictitious boundaries along the specified coordinate, simulating a division with irregular step size. A binary search technique is used to identify within which.gifeudo-cell the current point is. The slow process of computing whether the point is inside or outside the contents is therefore limited to the few (if any) volumes overlapping with that pseudo-cell, as sketched in fig .
Figure: Example of.gifeudo-cells created by GSORD
The coordinate selected for the.gifeudo division can be any of X, Y, Z, , R, or ;. For a given volume, the call to GSORD has to come after all its first level contents have been positioned.
when a particle exits from a daugther of a mother volume, the contents are scanned initially in the order in which they have been positioned, and the user should take care over the best sequence of GSPOS calls. However, when the particle comes back inside the mother from any one of the contents, it is usually possible to limit the search to the neighbour contents. The subroutines GSNEXT/GSNEAR permit the user to inject, at initialisation time, for each content in turn, the list of neighbours to search for. GSNEAR is recommended, GSNEXT is kept for backward, compatibility and has a different default option. A proper use of this facility can reduce the search time significantly.
The volumes to be checked when exiting from one daughter can depend on the direction and position of the exiting particles. To optimise tracking taking into account these dynamic features, the user can code the GUNEAR routine, and inform GEANT that it has to use it at tracking time by calling the GSUNEA routine.
S.Giani, S.Ravndal