From 6f8f9779617421960e1f996548c854b584c7b382 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Wed, 25 Nov 2026 13:54:36 +0100 Subject: [PATCH] ITS: mask overflow pixels only with a preceding ROF The clusterer keeps each chip's last ROF data to mask the pixels which fired again in the next ROF. The BC distance was taken in absolute value, so the data kept from a TF processed before could mask the pixels of a ROF which is not later than it: a TF decoded again with the same IRs (as the raw reader's --loop does) lost all clusters of the chips fired in a single ROF, and the result depended on which TFs an instance processed before. Use the old data only if it precedes the current ROF. --- Detectors/ITSMFT/common/reconstruction/src/Clusterer.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Detectors/ITSMFT/common/reconstruction/src/Clusterer.cxx b/Detectors/ITSMFT/common/reconstruction/src/Clusterer.cxx index 23717e8b0a7f1..9d6a90dcb4c69 100644 --- a/Detectors/ITSMFT/common/reconstruction/src/Clusterer.cxx +++ b/Detectors/ITSMFT/common/reconstruction/src/Clusterer.cxx @@ -176,7 +176,8 @@ void Clusterer::ClustererThread::process(uint16_t chip, uint16_t nChips, CompClu auto chipID = curChipData->getChipID(); if (parent->mMaxBCSeparationToMask > 0) { // mask pixels fired from the previous ROF const auto& chipInPrevROF = parent->mChipsOld[chipID]; - if (std::abs(rofPtr.getBCData().differenceInBC(chipInPrevROF.getInteractionRecord())) < parent->mMaxBCSeparationToMask) { + auto bcDiff = rofPtr.getBCData().differenceInBC(chipInPrevROF.getInteractionRecord()); // the sample must precede, it may come from an unrelated earlier TF + if (bcDiff > 0 && bcDiff < parent->mMaxBCSeparationToMask) { parent->mMaxRowColDiffToMask ? curChipData->maskFiredInSample(parent->mChipsOld[chipID], parent->mMaxRowColDiffToMask) : curChipData->maskFiredInSample(parent->mChipsOld[chipID]); } }