Skip to content

Commit 121fbac

Browse files
authored
BaseCluster: initialise errors to 0 by default (#15988)
* CheckResid: initialise sigmaYZ of the PV pseudo-cluster o2::BaseCluster default constructor leaves mSigmaYZ uninitialised, so with addPVAsCluster the PV cluster entered the refit with a garbage YZ covariance term, making the residuals non-reproducible between identical runs. * BaseCluster: initialise errors to 0 by default Following review: rather than setting sigmaYZ explicitly in CheckResid, zero-initialise mSigmaY2/mSigmaZ2/mSigmaYZ in BaseCluster so that default-constructed clusters (e.g. the PV pseudo-cluster in CheckResid) never carry uninitialised error terms.
1 parent 8cc0b98 commit 121fbac

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • DataFormats/Reconstruction/include/ReconstructionDataFormats

‎DataFormats/Reconstruction/include/ReconstructionDataFormats/BaseCluster.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ class BaseCluster
3434
{
3535
private:
3636
math_utils::Point3D<T> mPos; // cartesian position
37-
T mSigmaY2; // error in Y direction (usually rphi)
38-
T mSigmaZ2; // error in Z direction (usually Z)
39-
T mSigmaYZ; // non-diagonal term of error matrix
37+
T mSigmaY2 = 0; // error in Y direction (usually rphi)
38+
T mSigmaZ2 = 0; // error in Z direction (usually Z)
39+
T mSigmaYZ = 0; // non-diagonal term of error matrix
4040
std::uint16_t mSensorID = 0; // the sensor id
4141
std::int8_t mCount = 0; // user field reserved for counting
4242
std::uint8_t mBits = 0; // user field reserved for bit flags

0 commit comments

Comments
 (0)