next up previous index
Next: GEOM199 The volume Up: GEANT Previous: GEOM140 Division of

GEOM150 Division of a volume - general case

Routine ID: GEOM150
Author(s): Submitted: 17.12.83
Origin: R.Brun, F.Bruyant, A.McPhersonRevised: 18.11.93

CALL GSDVX (CHNAME,CHMOTH,NDIV,IAXIS,STEP,C0,NUMED,NDVMAX)

Divide a volume in a given number of parts along a direction, with a given step starting from an offset.

CHNAME
( CHARACTER*4) a unique name for the volume to be generated by subdivision of the mother volume;
CHMOTH
( CHARACTER*4) volume that has to be subdivided;
NDIV
( INTEGER) number of divisions into which the mother volume is to be divided;
IAXIS
( INTEGER) axis of the division.
STEP
( REAL) size of the divisions -- this value can be in centimeters or degrees according to the value of IAXIS;
C0
( REAL) offset where division should start -- this value can be in centimeters or degrees according to the value of IAXIS;
NUMED
( INTEGER) medium number of the divisions -- this can be different from the one of the mother, as the division cells may leave a portion of the mother undivided (see below) -- if NUMED ≤0 the medium of the mother;
NDVMX
( INTEGER) expected (maximum) number of divisions -- if ≤0 or > 255 , 255 is assumed.

For more information on the division mechanism, see [GEOM130] and [GEOM140]. For the moment either NDIV or STEP must be set negative or 0, so that they will be computed from the CHMOTH's size. The case with both NDIV and STEP positive is not coded yet. It would permit leaving different gaps at both ends of the CHMOTH.

Provisionally the code consists of a call to either GSDVN2 or GSDVT2.

CALL GSDVN2 (CHNAME,CHMOTH,NDIV,IAXIS,C0,NUMED)

Divide a volume in a given number of parts along a direction, starting from an offset.

CHNAME
( CHARACTER*4) a unique name for the volume to be generated by subdivision of the mother volume;
CHMOTH
( CHARACTER*4) volume that has to be subdivided;
NDIV
( INTEGER) number of divisions into which the mother volume is to be divided;
IAXIS
( INTEGER) axis of the division.
C0
( REAL) offset where division should start -- this value can be in centimeters or degrees according to the value of IAXIS;
NUMED
( INTEGER) medium number of the divisions -- this can be different from the one of the mother, as the division cells may leave a portion of the mother undivided (see below) -- if NUMED ≤0 the medium of the mother;

The divisions start at the user specified coordinate value and extend to the end of the volume. The range from this offset to the upper coordinate limit of the mother volume will be divided into the supplied number of cells. In the case of φ division of a complete tube or cone, the whole 360 degrees will be divided into the user-supplied number of slices no matter what the origin is. Specifying an origin for the division, in this case, just moves the division boundaries. This can be useful to avoid a rotation. In all other cases the search routines will assume that a point is in the mother if the coordinate value is less than the value of the supplied offset.

CALL GSDVT2 (CHNAME,CHMOTH,STEP,IAXIS,C0,NUMED,NDVMX)

Divide a volume along a direction with a given step starting from an offset.

CHNAME
( CHARACTER*4) a unique name for the volume to be generated by subdivision of the mother volume;
CHMOTH
( CHARACTER*4) volume that has to be subdivided;
STEP
( REAL) size of the divisions -- this value can be in centimeters or degrees according to the value of IAXIS;
IAXIS
( INTEGER) axis of the division;
C0
( REAL) offset where division should start -- this value can be in centimeters or degrees according to the value of IAXIS;
NUMED
( INTEGER) medium number of the divisions -- this can be different from the one of the mother, as the division cells may leave a portion of the mother undivided (see below) -- if NUMED ≤0 the medium of the mother;
NDVMX
( INTEGER) expected (maximum) number of divisions -- if ≤0 or > 255 , 255 is assumed.

The division start at the user-specified coordinate value and extend to the end of the volume. The range from origin to upper coordinate limit of the mother volume is divided in sections of the user supplied step. If the step is such that the range of the mother cannot be filled with cells, the largest possible number of cells is created. The excess space up to the end of the mother volume will be assumed to belong to the mother.

In the case of φ division of a complete tube or cone, the whole 360 degrees will be filled with slices, no matter what the origin is. Specifying an origin for the division, in this case, just moves the division boundaries. This can be useful to avoid a rotation.

In all other cases the search routines will assume a point is just in the mother if the coordinate value is less than the value of the user supplied origin.

GEOM199


next up previous index
Next: GEOM199 The volume Up: GEANT Previous: GEOM140 Division of


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