Skip to content

Commit eca8657

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

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Detectors/GlobalTracking/src/MatchTPCITS.cxx

Lines changed: 3 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,9 @@ void MatchTPCITS::doMatching(int sec)
893892
break;
894893
}
895894
int iits0 = timeStartITS[itsROBin];
895+
if (iits0 < 0) {
896+
continue; // no ITS tracks start at this ROF bin
897+
}
896898
nCheckTPCControl++;
897899
for (auto iits = iits0; iits < nTracksITS; iits++) {
898900
auto& trefITS = mITSWork[cacheITS[iits]];

0 commit comments

Comments
 (0)