From 70d3edd81a42c2d4a245a8a94c43703aaebabbfc Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 1 Nov 2026 20:13:47 +0000 Subject: [PATCH] TPC SCD: fix getDXI off-by-one for row 127 Row 127 (the first row of OROC3, NRowsAccumulated[2] = 127) failed the check ix > NRowsAccumulated[NROCTypes - 2] and fell through to the OROC2 branch, so it got the OROC2 pad height (1/1.2 cm^-1 instead of 1/1.5 cm^-1). This affects the x-kernel width of TrackResiduals::getSmoothEstimate when the closest voxel is in row 127, and the x mean-position validity check in TPCFastSpaceChargeCorrectionHelper for that row. Only non-uniform (per pad row) x-binning is affected. Co-Authored-By: Claude Opus 5.5 --- .../SpacePoints/include/SpacePoints/TrackResiduals.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Detectors/TPC/calibration/SpacePoints/include/SpacePoints/TrackResiduals.h b/Detectors/TPC/calibration/SpacePoints/include/SpacePoints/TrackResiduals.h index 202df063bf0fc..c95f3efe5048a 100644 --- a/Detectors/TPC/calibration/SpacePoints/include/SpacePoints/TrackResiduals.h +++ b/Detectors/TPC/calibration/SpacePoints/include/SpacePoints/TrackResiduals.h @@ -552,8 +552,8 @@ inline float TrackResiduals::getDXI(int ix) const if (ix < param::NRowsPerROC[0]) { // we are in the IROC return 1.f / param::RowDX[0]; - } else if (ix > param::NRowsAccumulated[param::NROCTypes - 2]) { - // we are in the last OROC + } else if (ix >= param::NRowsAccumulated[param::NROCTypes - 2]) { + // we are in the last OROC (rows 127 - 151) return 1.f / param::RowDX[param::NROCTypes - 1]; } else if (ix < param::NRowsAccumulated[1]) { // OROC1