DETAILS

The geometry portion of the code is subdivided into two groups of subroutines: GEOMU and HOWFAR. GEOMU (which is often referred to as simply GEOM) is used to convert user specified parameter input to information of a form useful to HOWFAR. GEOMU is called just once at the beginning of each run. HOWFAR uses the results of the GEOMU calculations to determine the DISTance to the next boundary and the NEXT region to be entered assuming that the particle continues along a straight line path.

Both GEOMU and HOWFAR farm out their tasks by calling subroutines corresponding to the various macro regions of the detector. For example, HOWFAR calls the routines HOWFTG, HOWFDC, HOWFRS etc., depending on the loaction of the particle under consideration. Likewise, GEOMU calls GEOMTG, GEOMDC, etc. The macro regions are decoupled from one another though a system of buffer regions specified in GEOMBF and HOWFBF. Each subsystem also has regions known as "local buffers." This arrangement allows one to modify individual subsystems without having to worry about the impact on other portions of the detector.

SUBSYSTEMS

Each region is a member of one subsystem. These have the following standard mnemonics (used as suffixes for variables and routines) and numbers: number mnemonic subsystem 1 BF Buffer regions 2 TG Target and degrader 3 DC Drift chamber 4 RS Range stack, including RSPC's 5 BV Barrel photon veto 6 EC Upstream end cap photon veto 7 EC Downstream end cap photon veto

The routines for new versions of subsystems often have 1 appended, e.g., geomtg1.cdf for the new target.