From 714cf05287db318c4a35f03dad0714b6ecbecdac Mon Sep 17 00:00:00 2001 From: Maximiliano Puccio Date: Tue, 10 Nov 2026 14:42:01 +0100 Subject: [PATCH] ITSMFT: fix MC labels for single pixel clusters in the labels --- Detectors/ITSMFT/common/reconstruction/src/Clusterer.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Detectors/ITSMFT/common/reconstruction/src/Clusterer.cxx b/Detectors/ITSMFT/common/reconstruction/src/Clusterer.cxx index 2168c4b8d3308..8f872361d35d8 100644 --- a/Detectors/ITSMFT/common/reconstruction/src/Clusterer.cxx +++ b/Detectors/ITSMFT/common/reconstruction/src/Clusterer.cxx @@ -315,7 +315,10 @@ void Clusterer::ClustererThread::finishChipSingleHitFast(uint32_t hit, ChipPixel if (labelsClusPtr) { // MC labels were requested int nlab = 0; - fetchMCLabels(curChipData->getStartID() + hit, labelsDigPtr, nlab); + // Squashing can remove earlier digits on the chip, so the surviving + // pixel's source index need not be contiguous with the chip's start. + const auto digitID = parent->mSquashingDepth ? curChipData->getOrderedPixId(hit) : curChipData->getStartID() + hit; + fetchMCLabels(digitID, labelsDigPtr, nlab); auto cnt = compClusPtr->size(); for (int i = 0; i < nlab; i++) { labelsClusPtr->addElement(cnt, labelsBuff[i]);