Skip to content

Commit 27d5f68

Browse files
matthias-kleinerdavidrohr
authored andcommitted
Checking for ITS track
1 parent d244d2a commit 27d5f68

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Detectors/TPC/workflow/src/TPCTimeSeriesSpec.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -979,8 +979,8 @@ class TPCTimeSeries : public Task
979979
const auto dedxQMaxVars = getdEdxVars(1, track);
980980

981981
// make check to avoid crash in case no or less ITS tracks have been found!
982-
const int idxITSTrack = hasITSTPC ? tracksITSTPC[idxITSTPC.front()].getRefITS().getIndex() : -1;
983-
const bool idxITSCheck = (idxITSTrack < tracksITS.size()) && hasITSTPC;
982+
const int idxITSTrack = (hasITSTPC && (gID == o2::dataformats::GlobalTrackID::Source::ITS)) ? tracksITSTPC[idxITSTPC.front()].getRefITS().getIndex() : -1;
983+
const bool idxITSCheck = (idxITSTrack != -1);
984984

985985
const int nClITS = idxITSCheck ? tracksITS[idxITSTrack].getNClusters() : -1;
986986
float chi2ITS = idxITSCheck ? tracksITS[idxITSTrack].getChi2() : -1;

0 commit comments

Comments
 (0)