\ARRAY VOLUME_LIST
!----------------------------------------------------------------------
! CENTRAL CALORIMETER VOLUMES
!----------------------------------------------------------------------
!FORMAT IS 4 CHARACTER GEANT VOLUME NAME (IN QUOTES).
'CCEM'   !CENTRAL CALORIMETER MOTHER VOLUME
'CEM1'   !CENTRAL CALORIMETER EM LAYER 1
'CMP1'   !CENTRAL CALORIMETER EM1 PHI DIVISIONS
'CEM2'   !CENTRAL CALORIMETER EM LAYER 2
'CMP2'   !CENTRAL CALORIMETER EM LAYER 3
'CMP3'   !CENTRAL CALORIMETER EM3 PHI DIVISIONS
'CEM4'   !CENTRAL CALORIMETER EM LAYER 4
'CMP4'   !CENTRAL CALORIMETER EM4 PHI DIVISIONS
!
'CCFH'   !CENTRAL CALORIMETER FINE HADRONIC
'CFHR'   !CENTRAL CALORIMETER FINE HADRONIC RADIAL DIVISIONS
'CFHP'   !CENTRAL CALORIMETER FINE HADRONIC PHI DIVISIONS
\END

The above excerpt is from (OLD)CALORIMETER.RCP that is not relevant to E907. It illustrates the general principles however. It shows the volumes used to define the CENTRAL calorimeter only. CCEM is the name of the Central calorimeter electromagnetic Mother volume. To each 4 character GEANT volume name XXXX in this list, there must exist another RCP array structure called

\ARRAY ACT_XXXX
\END

This ACTion array, describes to GEANT the actions to be taken on the mother volume. The first action for a volume is usually to define it in the call to GSVOLU. This is done (in the case of CCEM) as follows.

\ARRAY ACT_CCEM
'VOLU'  'TUBE'  'AIR'  3  'RCE1'  'RCE5'  'ZCE4'
'POS '  1  'MVOL'  0. 0.  0.  0  'ONLY'
\END

The GSVOLU command is invoked by the ACTion line beginning with the command 'VOLU' , with the proviso that the volume CCEM to be postioned is not mentioned since that is implicit in the \ARRAY ACT_CCEM declaration. This is followed by the GSVOLU argument list CHSHAP (the shape of the volume) and NMED (the medium number of the volume). In our example, CHSHAP is a character*4 variable 'TUBE'. The medium number can be an integer or the RCP structure allows you to give a character*4 variable name (in this case 'AIR'), which has been declared in the RCP file by the line

 
AIR 15    !DEFINED IN MOTHERS.RCP
 

The medium number is 15 substituted for the character variable 'AIR' by the RCP system. In this example, this makes for easier reading. This feature is very useful when the same number occurs in multiple RCP command lines. Using symbolic values facilitates changing all of them by changing a single line.

The next parameter in the VOLU line is NPAR, the number of parameters needed to define the shape. This is followed by PAR(1:NPAR) parameters. Note that this is in reverse order to the GSVOLU call, in which the order of PAR and NPAR is reversed. The three parameters defining the tube are again symbolically entered as character*4 variables 'RCE1' 'RCE5' 'ZCE4' which are defined previously. Having defined the volume, one must position the volume in a mother volume. This is accomplished by the next line

 
'POS ' 1 'MVOL' 0. 0. 0. 0 'ONLY'
 

which invokes the GSPOS subroutine call. The arguments to this line are identical to the arguments to the GSPOS call. In our example, the first copy of the volume CCEM of copy NR 1 is positioned in mother volume (CHMOTH) MVOL at X,Y,Z position 0.,0.,0. The rotation matrix used is IROT=0, which indicates to GEANT that there is no need to rotate this at all. The 'ONLY' declaration signifies that this volume will not overlap with other volumes in the GEANT 'MANY' sense.
It is possible to use the GEANT subroutine
GSPOSP by the 'POSP' command which permits one to place many copies of the same volume with differing parameters in the geometry. In this case, the 'VOLU' line should specify 0 for NPAR. The values of NPAR and PAR are given at the end of each 'POSP' line mimicing the arguments to GSPOSP. The only difference is that the order of NPAR and PAR are interchanged, since RCP needs to know the number of parameters before decoding the PAR(1:NPAR) array. This scheme allows all GEANT subroutine calls to define and position geometrical objects. The complete set of commands permitted is

'POS' 'POSP' 'DVN' 'DVT' AND 'DVX' which permits the positioning and division of volumes corresponding to the GEANT subroutines
GSPOS, GSPOSP, GSDVN, GSDVT and GSDVX. The argument list for the division commands follows the respective subroutine calls identically. As an example of a division command 'DVN', the volume 'CMP1' is a set of PHI divisions. This is accomplished by the RCP array structure

 
\ARRAY ACT_CMP1             !DIVIDE IN PHI
'DVN'   'CEM1'  'CE1D'     2
\END
 

which divides the volume 'CEM1' into 'CE1D' divisions (declared symbolically earlier) along the Phi axis (signified by the number 2).