Skip to content

Commit 3c44595

Browse files
committed
Discard ITS/MFT ROFs with impossible IRs
Alpide Raw decoder, clusterizer and ITS-TPC matcher will skip ROFs with IR preceding or equal previous ROF IR (or TF 1st IR)
1 parent adaabd2 commit 3c44595

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

Detectors/GlobalTracking/src/MatchTPCITS.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -633,9 +633,9 @@ bool MatchTPCITS::prepareITSData()
633633
for (int irof = 0; irof < nROFs; irof++) {
634634
const auto& rofRec = mITSTrackROFRec[irof];
635635
long nBC = rofRec.getBCData().differenceInBC(mStartIR);
636-
if (nBC > maxBCs) {
636+
if (nBC > maxBCs || nBC < 0) {
637637
if (++errCount < MaxErrors2Report) {
638-
LOGP(alarm, "ITS ROF#{} start is not compatible with TF 1st orbit {} and TF length of {} HBFs",
638+
LOGP(alarm, "ITS ROF#{} start {} is not compatible with TF 1st orbit {} or TF length of {} HBFs",
639639
irof, rofRec.getBCData().asString(), mStartIR.asString(), nHBF);
640640
}
641641
break;

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ void Clusterer::process(int nThreads, PixelReader& reader, CompClusCont* compClu
3636
}
3737
auto autoDecode = reader.getDecodeNextAuto();
3838
int rofcount{0};
39+
o2::InteractionRecord lastIR{};
3940
do {
4041
if (autoDecode) {
4142
reader.setDecodeNextAuto(false); // internally do not autodecode
@@ -46,6 +47,15 @@ void Clusterer::process(int nThreads, PixelReader& reader, CompClusCont* compClu
4647
if (reader.getInteractionRecord().isDummy()) {
4748
continue; // No IR info was found
4849
}
50+
if (!lastIR.isDummy() && lastIR >= reader.getInteractionRecord()) {
51+
const int MaxErrLog = 2;
52+
static int errLocCount = 0;
53+
if (errLocCount++ < MaxErrLog) {
54+
LOGP(warn, "Impossible ROF IR {}, does not exceed previous {}, discarding in clusterization", reader.getInteractionRecord().asString(), lastIR.asString());
55+
}
56+
continue;
57+
}
58+
lastIR = reader.getInteractionRecord();
4959
// pre-fetch all non-empty chips of current ROF
5060
ChipPixelData* curChipData = nullptr;
5161
mFiredChipsPtr.clear();

Detectors/ITSMFT/common/workflow/src/STFDecoderSpec.cxx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,17 @@ void STFDecoder<Mapping>::run(ProcessingContext& pc)
155155
}
156156

157157
mDecoder->setDecodeNextAuto(false);
158+
o2::InteractionRecord lastIR{}, firstIR{0, pc.services().get<o2::framework::TimingInfo>().firstTForbit};
158159
while (mDecoder->decodeNextTrigger() >= 0) {
160+
if ((!lastIR.isDummy() && lastIR >= mDecoder->getInteractionRecord()) || firstIR > mDecoder->getInteractionRecord()) {
161+
const int MaxErrLog = 2;
162+
static int errLocCount = 0;
163+
if (errLocCount++ < MaxErrLog) {
164+
LOGP(warn, "Impossible ROF IR {}, previous was {}, TF 1st IR was {}, discarding in decoding", mDecoder->getInteractionRecord().asString(), lastIR.asString(), firstIR.asString());
165+
}
166+
continue;
167+
}
168+
lastIR = mDecoder->getInteractionRecord();
159169
if (mDoDigits || mClusterer->getMaxROFDepthToSquash()) { // call before clusterization, since the latter will hide the digits
160170
mDecoder->fillDecodedDigits(digVec, digROFVec); // lot of copying involved
161171
if (mDoCalibData) {

0 commit comments

Comments
 (0)