Routine ID: GEOM600 | |
---|---|
Author(s): | Submitted: 16.12.83 |
Origin: F.Bruyant, A.McPherson | Revised: 15.12.93 |
CALL GLVOLU (NLEV,LNAM,LNUM,IER*)
This routine fills the volume parameters in common /GCVOLU/ for a physical tree, specified by the lists LNAM and LNUM of volumes names and numbers, and for all its ascendants up to level 1.
The routine is optimised and does not re-compute the part of history already available in GCVOLU. This means that if it is used in user programs outside the usual framework of the tracking, the user has to initialise to zero NLEVEL in common GCVOLU.
An example of use of GLVOLU in this context could be to find the position and direction of a particle in the local coordinate system of a volume:
. . +SEQ,GCVOLU DIMENSION LNAM(15), LNUM(15), POS(3), DIR(3), POSL(3), DIRL(3) . . CALL UCTOH('MOTH',LNAM(1),4,4) LNUM(1) = 1 CALL UCTOH('CAL1',LNAM(2),4,4) LNUM(2) = 2 CALL UCTOH('MOD1',LNAM(3),4,4) LNUM(3) = 5 CALL UCTOH('CHAM',LNAM(4),4,4) LNUM(4) = 18 *--- NLEVEL = 0 CALL GLVOLU(4,LNAM,LNUM,IER) *--- CALL GMTOD(POS,POSL,1) CALL GMTOD(DIR,DIRL,2) . .