Skip to content

Commit 714cf05

Browse files
committed
ITSMFT: fix MC labels for single pixel clusters in the labels
1 parent a8a2a45 commit 714cf05

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎Detectors/ITSMFT/common/reconstruction/src/Clusterer.cxx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,10 @@ void Clusterer::ClustererThread::finishChipSingleHitFast(uint32_t hit, ChipPixel
315315

316316
if (labelsClusPtr) { // MC labels were requested
317317
int nlab = 0;
318-
fetchMCLabels(curChipData->getStartID() + hit, labelsDigPtr, nlab);
318+
// Squashing can remove earlier digits on the chip, so the surviving
319+
// pixel's source index need not be contiguous with the chip's start.
320+
const auto digitID = parent->mSquashingDepth ? curChipData->getOrderedPixId(hit) : curChipData->getStartID() + hit;
321+
fetchMCLabels(digitID, labelsDigPtr, nlab);
319322
auto cnt = compClusPtr->size();
320323
for (int i = 0; i < nlab; i++) {
321324
labelsClusPtr->addElement(cnt, labelsBuff[i]);

0 commit comments

Comments
 (0)