@@ -183,7 +183,19 @@ void EveWorkflowHelper::selectTracks(const CalibObjectsConst* calib,
183183 return flag;
184184 };
185185
186- auto creator = [maskTrk, this , &correctTrackTime, &flagTime](auto & trk, GID gid, float time, float terr) {
186+ // MFT-MCH-MID tracks are labeled as MFT-MCH in the reco container
187+ auto fixMFTMCHMIDLabel = [this ](GID & gid) {
188+ if (gid.getSource () == GID ::MFTMCH ) {
189+ const auto & trFwd = mRecoCont ->getGlobalFwdTrack (gid);
190+ if (trFwd.getMIDTrackID () != -1 ) {
191+ gid = GID {gid.getIndex (), GID ::MFTMCHMID };
192+ }
193+ }
194+ };
195+
196+ auto creator = [maskTrk, this , &correctTrackTime, &flagTime, &fixMFTMCHMIDLabel](auto & trk, GID gid, float time, float terr) {
197+ fixMFTMCHMIDLabel (gid);
198+
187199 const auto src = gid.getSource ();
188200 mTotalDataTypes [src]++;
189201
@@ -230,9 +242,12 @@ void EveWorkflowHelper::selectTracks(const CalibObjectsConst* calib,
230242
231243 // TODO: fix TPC tracks?
232244
245+ GID gid = tvid;
246+ fixMFTMCHMIDLabel (gid);
247+
233248 // If a track was not rejected, associate it with its primary vertex
234- if (mGIDTrackTime .find (tvid ) != mGIDTrackTime .end ()) {
235- mPrimaryVertexTrackGIDs [iv].push_back (tvid );
249+ if (mGIDTrackTime .find (gid ) != mGIDTrackTime .end ()) {
250+ mPrimaryVertexTrackGIDs [iv].push_back (gid );
236251 }
237252 }
238253 }
@@ -692,7 +707,7 @@ void EveWorkflowHelper::drawMFTMCH(GID gid, float trackTime)
692707
693708void EveWorkflowHelper::drawMFTMCHMID (GID gid, float trackTime)
694709{
695- const auto & trMFTMCHMID = mRecoCont ->getGlobalFwdTrack (gid);
710+ const auto & trMFTMCHMID = mRecoCont ->getGlobalFwdTrack (GID { gid. getIndex (), GID :: MFTMCH } );
696711
697712 const auto & trackParam = forwardTrackToMCHTrack (trMFTMCHMID);
698713
0 commit comments