Skip to content

Commit 4bfb3d8

Browse files
committed
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 b69a505 commit 4bfb3d8

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

‎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

‎Detectors/GlobalTrackingWorkflow/study/src/CheckResidSpec.cxx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,6 @@ bool CheckResidSpec::processITSTrack(const o2::its::TrackITS& iTrack, const o2::
453453
bcPV.setSigmaY2(0.5 * (pv.getSigmaX2() + pv.getSigmaY2()));
454454
bcPV.setSigmaZ2(pv.getSigmaZ2());
455455
bcPV.setSensorID(-1);
456-
bcPV.setSigmaYZ(0.f); // not initialised by the BaseCluster default constructor
457456
clArr[0] = &bcPV;
458457
}
459458
// collect all track clusters to array, placing them to layer+1 slot

0 commit comments

Comments
 (0)