From b69a5050401e5ee5c2e7076eec4bc85f8059932b Mon Sep 17 00:00:00 2001 From: hyungjun <109190387+hyungjun-lee@users.noreply.github.com> Date: Tue, 20 Oct 2026 13:38:35 +0900 Subject: [PATCH 1/2] 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. --- Detectors/GlobalTrackingWorkflow/study/src/CheckResidSpec.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/Detectors/GlobalTrackingWorkflow/study/src/CheckResidSpec.cxx b/Detectors/GlobalTrackingWorkflow/study/src/CheckResidSpec.cxx index 244cd03618f5d..14f82d5e463f7 100644 --- a/Detectors/GlobalTrackingWorkflow/study/src/CheckResidSpec.cxx +++ b/Detectors/GlobalTrackingWorkflow/study/src/CheckResidSpec.cxx @@ -453,6 +453,7 @@ bool CheckResidSpec::processITSTrack(const o2::its::TrackITS& iTrack, const o2:: bcPV.setSigmaY2(0.5 * (pv.getSigmaX2() + pv.getSigmaY2())); bcPV.setSigmaZ2(pv.getSigmaZ2()); bcPV.setSensorID(-1); + bcPV.setSigmaYZ(0.f); // not initialised by the BaseCluster default constructor clArr[0] = &bcPV; } // collect all track clusters to array, placing them to layer+1 slot From 4bfb3d88095473b65ccaa12d8a3e9313a0697d45 Mon Sep 17 00:00:00 2001 From: hyungjun <109190387+hyungjun-lee@users.noreply.github.com> Date: Tue, 20 Oct 2026 14:07:28 +0900 Subject: [PATCH 2/2] 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. --- .../include/ReconstructionDataFormats/BaseCluster.h | 6 +++--- .../GlobalTrackingWorkflow/study/src/CheckResidSpec.cxx | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/DataFormats/Reconstruction/include/ReconstructionDataFormats/BaseCluster.h b/DataFormats/Reconstruction/include/ReconstructionDataFormats/BaseCluster.h index de422aa0bf474..c2e5bea1ac6a3 100644 --- a/DataFormats/Reconstruction/include/ReconstructionDataFormats/BaseCluster.h +++ b/DataFormats/Reconstruction/include/ReconstructionDataFormats/BaseCluster.h @@ -34,9 +34,9 @@ class BaseCluster { private: math_utils::Point3D mPos; // cartesian position - T mSigmaY2; // error in Y direction (usually rphi) - T mSigmaZ2; // error in Z direction (usually Z) - T mSigmaYZ; // non-diagonal term of error matrix + T mSigmaY2 = 0; // error in Y direction (usually rphi) + T mSigmaZ2 = 0; // error in Z direction (usually Z) + T mSigmaYZ = 0; // non-diagonal term of error matrix std::uint16_t mSensorID = 0; // the sensor id std::int8_t mCount = 0; // user field reserved for counting std::uint8_t mBits = 0; // user field reserved for bit flags diff --git a/Detectors/GlobalTrackingWorkflow/study/src/CheckResidSpec.cxx b/Detectors/GlobalTrackingWorkflow/study/src/CheckResidSpec.cxx index 14f82d5e463f7..244cd03618f5d 100644 --- a/Detectors/GlobalTrackingWorkflow/study/src/CheckResidSpec.cxx +++ b/Detectors/GlobalTrackingWorkflow/study/src/CheckResidSpec.cxx @@ -453,7 +453,6 @@ bool CheckResidSpec::processITSTrack(const o2::its::TrackITS& iTrack, const o2:: bcPV.setSigmaY2(0.5 * (pv.getSigmaX2() + pv.getSigmaY2())); bcPV.setSigmaZ2(pv.getSigmaZ2()); bcPV.setSensorID(-1); - bcPV.setSigmaYZ(0.f); // not initialised by the BaseCluster default constructor clArr[0] = &bcPV; } // collect all track clusters to array, placing them to layer+1 slot