Skip to content

Commit 0dadc9e

Browse files
committed
Fix OOB access in case the ROF bin has no tracks
1 parent a43e1f5 commit 0dadc9e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Detectors/GlobalTracking/src/MatchTPCITS.cxx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,6 @@ void MatchTPCITS::doMatching(int sec)
880880
int idxMinTPC = timeStartTPC[minROFITS]; // index of 1st cached TPC track within cached ITS ROFrames
881881
auto t2nbs = tpcTimeBin2MUS(mZ2TPCBin * mParams->tpcTimeICMatchingNSigma);
882882
bool checkInteractionCandidates = mUseFT0 && mParams->validateMatchByFIT != MatchTPCITSParams::Disable;
883-
884883
int itsROBin = 0;
885884
for (int itpc = idxMinTPC; itpc < nTracksTPC; itpc++) {
886885
auto& trefTPC = mTPCWork[cacheTPC[itpc]];
@@ -893,6 +892,11 @@ void MatchTPCITS::doMatching(int sec)
893892
break;
894893
}
895894
int iits0 = timeStartITS[itsROBin];
895+
if (iits0 < 0) {
896+
LOGP(alarm, "doMatching sec={} itpc={} itsROBin={} timeStartITS.size={} iits0={} tmn={} triggered={}",
897+
sec, itpc, itsROBin, timeStartITS.size(), iits0, tmn, mITSTriggered);
898+
continue; // no ITS tracks start at this ROF bin
899+
}
896900
nCheckTPCControl++;
897901
for (auto iits = iits0; iits < nTracksITS; iits++) {
898902
auto& trefITS = mITSWork[cacheITS[iits]];

0 commit comments

Comments
 (0)