Skip to content

Commit 262d2c2

Browse files
authored
TOF: Update track index fetch in TOF matching task (#810)
1 parent 35502dc commit 262d2c2

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

Modules/TOF/include/TOF/TOFMatchedTracks.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
///
1313
/// \file TOFMatchedTracks.h
1414
/// \author Chiara Zampolli
15+
/// \brief Task to monitor TOF matching efficiency
1516
/// \since 03/08/2021
1617
///
1718

Modules/TOF/src/TOFMatchedTracks.cxx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
///
1313
/// \file TOFMatchedTracks.cxx
1414
/// \author Chiara Zampolli
15+
/// \brief Task to monitor TOF matching efficiency
16+
/// \since 03/08/2021
1517
///
1618

1719
#include <TCanvas.h>
@@ -120,7 +122,7 @@ void TOFMatchedTracks::monitorData(o2::framework::ProcessingContext& ctx)
120122
}
121123
// loop over TOF MatchInfo
122124
for (const auto& matchTOF : mTPCTOFMatches) {
123-
const auto& trk = mTPCTracks[matchTOF.getTrackIndex()];
125+
const auto& trk = mTPCTracks[matchTOF.getTrackRef().getIndex()];
124126
mMatchedTracksPt[trkType::UNCONS]->Fill(trk.getPt());
125127
mMatchedTracksEta[trkType::UNCONS]->Fill(trk.getEta());
126128
}
@@ -134,7 +136,7 @@ void TOFMatchedTracks::monitorData(o2::framework::ProcessingContext& ctx)
134136
ILOG(Info, Support) << "We found " << mITSTPCTOFMatches.size() << " ITS-TPC tracks matched to TOF" << ENDM;
135137
// loop over TOF MatchInfo
136138
for (const auto& matchTOF : mITSTPCTOFMatches) {
137-
const auto& trk = mITSTPCTracks[matchTOF.getTrackIndex()];
139+
const auto& trk = mITSTPCTracks[matchTOF.getTrackRef().getIndex()];
138140
mMatchedTracksPt[trkType::CONSTR]->Fill(trk.getPt());
139141
mMatchedTracksEta[trkType::CONSTR]->Fill(trk.getEta());
140142
}
@@ -156,7 +158,7 @@ void TOFMatchedTracks::monitorData(o2::framework::ProcessingContext& ctx)
156158
return true;
157159
}
158160
} else if constexpr (isTPCTOFTrack<decltype(trk)>()) {
159-
const auto& tpcTrack = mTPCTracks[mTPCTOFMatches[trk.getRefMatch()].getTrackIndex()];
161+
const auto& tpcTrack = mTPCTracks[mTPCTOFMatches[trk.getRefMatch()].getTrackRef().getIndex()];
160162
if (tpcTrack.getNClusters() < nMinTPCClusters) {
161163
return true;
162164
}

0 commit comments

Comments
 (0)