The origin of the shower is reconstructed from the CsI and NaI
crystal ADC values (data) or energy depositions (simulation) using a geometric
weighting algorithm. The algorithm works by first finding the fraction
of energy deposited in each crystal,
where the sum in the denominator includes all CsI or NaI detectors.
Next, the coordinate x is calculated according to the weighting formula
where is the coordinate of the ith crystal, dx is a correction
based on the angle of incidence of the particle with the detector array,
and the exponent
is a constant which is defined by the nature of the shower
development in the CsI and NaI arrays. The coordinates of the
crystals in the NaI array are defined in a Cartesian coordinate system,
while those in the CsI array spherical. The values of and
are determined by optimizing the average angular resolution
of each crystal array in
the GEANT Monte Carlo simulation. This optimization is discussed
in Sec. 5.2.