Next: GEOM310 Finding distance
Up: GEANT
Previous: GEOM299 The rotation
Routine ID: GEOM300
| Author(s): | Submitted: 18.12.83
|
Origin: R.Brun, A.C.McPherson, F.Bruyant | Revised: 14.12.93
|
CALL GMEDIA (X,NUMED*)
- X
- ( REAL) array of dimension 3 with the coordinates in the
MRS;
- NUMED
- ( INTEGER) medium number, if this is zero the point is
outside the detector.
Searches the geometrical tree structure to find in which volume the point
X is. The tracking medium is returned in NUMED, and the common
/GCVOLU/ is updated.
GMEDIA uses the geometry data structure to conduct its search
starting its search from the last volume where a point was found.
If no previous search has been conducted, the first volume is used
as a starting point.
If the point is not inside the current volume, GMEDIA looks in its
mother and so on, until it finds a volume which contains the point.
It then looks at the contents of this object and so on until the point
is in a volume but in none of its contents (if any).
If this downward search terminates in a
'MANY' object, GMEDIA looks for another candidate. See
[GEOM110] for a description of the `MANY' volumes tratment.
The physical geometrical tree from the first volume
to the current one is stored in the common block GCVOLU
(see [BASE030]) and in the structure JGPAR (see [GEOM199]).
CALL GTMEDI (X,NUMED*)
- X
- ( REAL) array of dimension 3 with the coordinates in the
MRS;
- NUMED
- ( INTEGER) medium number, if this is zero the point is
outside the detector.
This routine performs the same function than GMEDIA, but it uses
the dynamical information of the particle history to speed-up the
search:
- when INWVOL=2 (common /GCTRAK/)
the particle just came out of a volume. In this
case, if INFROM (common /GCVOLU/) is positive, it is
interpreted by GTMEDI as the number IN of the content
just left, inside the mother volume
where the point X is assumed to be. This content will not be
searched again.
- the daughter of the current volume which limits the
geometrical step of the particle (i.e. where the particle would be heading
moving along a straight line) is searched first.
INGOTO (common /GCVOLU/) is set by GTNEXT, to transmit
the information
on this one volume which has limited the geometrical step SNEXT as follows:
- >0
-
content;
- =0
- current volume;
- <0
- - NLONLY, with NLONLY defined as the lowest 'ONLY'
level up in the tree which is an ancestor of the 'MANY' volume
where the point X is.
CALL GINVOL (X,ISAME*)
- X
- ( REAL) array of dimension 3 with the coordinates in the
MRS;
- ISAME
- ( INTEGER) return flag.
Checks if particle at point X has left current volume.
If so, returns ISAME = 0 and prepares information useful to
identify the new volume entered, otherwise, returns ISAME = 1.
GEOM310
Next: GEOM310 Finding distance
Up: GEANT
Previous: GEOM299 The rotation
Janne Saarela
Mon Apr 3 12:46:29 METDST 1995