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