Skip to content

Commit 630acbb

Browse files
chiarazampollishahor02
authored andcommitted
Fix condition to trigger FATAL in ITSTPC matching QC
1 parent 18e9250 commit 630acbb

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Detectors/GlobalTracking/src/MatchITSTPCQC.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,6 @@ void MatchITSTPCQC::run(o2::framework::ProcessingContext& ctx)
423423
if (trk.getRefTPC().getIndex() >= mTPCTracks.size()) {
424424
LOG(fatal) << "******************** ATTENTION! for TPC track associated to matched track: idx = " << trk.getRefTPC().getIndex() << ", size of container = " << mTPCTracks.size() << " in TF " << evCount;
425425
}
426-
if (trk.getRefITS().getIndex() >= mITSTracks.size()) {
427-
LOG(fatal) << "******************** ATTENTION! for ITS track associated to matched track: idx = " << trk.getRefITS().getIndex() << ", size of container = " << mITSTracks.size() << " in TF " << evCount;
428-
}
429426
std::array<std::string, 2> title{"TPC", "ITS"};
430427
for (int i = 0; i < matchType::SIZE; ++i) {
431428
o2::track::TrackParCov trkRef;
@@ -440,14 +437,17 @@ void MatchITSTPCQC::run(o2::framework::ProcessingContext& ctx)
440437
++mNITSTPCSelectedTracks[i];
441438
}
442439
} else {
443-
trkRef = mITSTracks[trk.getRefITS()];
444440
idxTrkRef = trk.getRefITS().getIndex();
445-
LOG(debug) << "Checking track (ITS) with id " << idxTrkRef << " for ITSTPC track " << iITSTPC << " and pt = " << trkRef.getPt();
446441
if (trk.getRefITS().getSource() == GID::ITSAB) {
447442
// do not use afterburner tracks
448443
LOG(debug) << "Track (ITS) with id " << idxTrkRef << " for ITSTPC track " << iITSTPC << " is from afterburner";
449444
continue;
450445
}
446+
if (idxTrkRef >= mITSTracks.size()) {
447+
LOG(fatal) << "******************** ATTENTION! for ITS track associated to matched track (NOT from AB): idx = " << trk.getRefITS().getIndex() << ", size of container = " << mITSTracks.size() << " in TF " << evCount;
448+
}
449+
trkRef = mITSTracks[trk.getRefITS()];
450+
LOG(debug) << "Checking track (ITS) with id " << idxTrkRef << " for ITSTPC track " << iITSTPC << " and pt = " << trkRef.getPt();
451451
if (isITSTrackSelectedEntry[idxTrkRef] == true) {
452452
LOG(debug) << "Track was selected (ITS), with id " << idxTrkRef << " for ITSTPC track " << iITSTPC << " , we keep it in the numerator, pt = " << trkRef.getPt();
453453
fillHisto = true;

0 commit comments

Comments
 (0)