# BCAL Reconstruction Algorithms

From GlueXWiki

## List of Reconstruction Algorithms

- KLOE
- Some description can be found in GlueX-doc-569

- MATT
- JLAB: very simple algorithm based on the radial phi distribution.
- Generate two matrices 4 x 48*4 (all readout channels) for up and down stream readout
- Project the ADC values into an array 1 to 48*4 for both up and down stream => sum over the layers
- Find largest ADC sum in array for up and downstream array and project it into an array from 0 to 60 with the maximum at 20
- Fit the position maximum with a Gaussian to determine position and take the average of up and down stream result. This will lead to the phi angle of the cluster
- Calculate the geometric mean of the energy (from up and downstream energy sums) using BCAL length and attenuation values.
- Calculate the average position along the BCAL using average time difference, length of the BCAL and attenuation values.
- Calculate the average mean time using BCAL lenth and effective speed of light in the fibers.
- No other attempt to separate clusters is done at this point.