Skip to content

improve position stability in calculateClusterEXY

Gerhard Raven requested to merge improve-position-stability into master

When computing the energy-weighted position of a calorimeter cluster, instead of computing sum of energy * position, take the position of the first entry as reference, then take the sum of energy*(position-reference), and finally add back the reference. This improves the numerical stability of the computed X and Y positions.

Note that with this change the energy of that first digit now doesn't enter in the sum, and, assuming it is the most-energetic digit, that thus the energies that do enter have a smaller dynamic range, increasing the precision, and as a result, it may now be possible to move to single precision (or even less) for the digit energies...

Towards solving Rec#118

References updated in Brunel!968 (merged)

Edited by Rosen Matev

Merge request reports