next up previous index
Next: GEOM700 Medium search Up: GEANT Previous: GEOM500 Volume attributes

GEOM600 User initialisation of the common block /GCVOLU/

Routine ID: GEOM600
Author(s): Submitted: 16.12.83
Origin: F.Bruyant, A.McPhersonRevised: 15.12.93

CALL GLVOLU (NLEV,LNAM,LNUM,IER*)

NLEV
( INTEGER) number of levels to fill;
LNAM
( INTEGER) array of NLEV volume names stored via the UCTOH routine;
LNUM
( INTEGER) array of NLEV volume copy (or division) numbers;
IER
( INTEGER) returns code different from 0 in case of error, a diagnostic is also printed;

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)
      .
      .

GEOM700


Janne Saarela
Mon Apr 3 12:46:29 METDST 1995