Skip to content

Commit 7c89004

Browse files
committed
Protect ITS-TPC matching from ITS ROF preceding TF 1st start
1 parent f71afab commit 7c89004

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Detectors/GlobalTracking/src/MatchTPCITS.cxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,8 @@ bool MatchTPCITS::prepareTPCData()
515515
//_____________________________________________________
516516
bool MatchTPCITS::prepareITSData()
517517
{
518+
static size_t errCount = 0;
519+
constexpr size_t MaxErrors2Report = 10;
518520
// Do preparatory work for matching
519521
mTimer[SWPrepITS].Start(false);
520522
const auto& inp = *mRecoCont;
@@ -555,6 +557,12 @@ bool MatchTPCITS::prepareITSData()
555557
for (int irof = 0; irof < nROFs; irof++) {
556558
const auto& rofRec = mITSTrackROFRec[irof];
557559
int nBC = rofRec.getBCData().differenceInBC(mStartIR);
560+
if (nBC < 0) {
561+
if (++errCount < MaxErrors2Report) {
562+
LOG(ERROR) << "ITS ROF start " << rofRec.getBCData() << " precedes TF 1st orbit " << mStartIR;
563+
}
564+
continue;
565+
}
558566
float tMin = nBC * o2::constants::lhc::LHCBunchSpacingMUS;
559567
float tMax = (nBC + mITSROFrameLengthInBC) * o2::constants::lhc::LHCBunchSpacingMUS;
560568
if (!mITSTriggered) {

0 commit comments

Comments
 (0)