@@ -65,6 +65,9 @@ void MatchGlobalFwd::init()
6565 mUseMIDMCHMatch = matchingParam.useMIDMatch ;
6666 LOG (info) << " UseMIDMCH Matching = " << (mUseMIDMCHMatch ? " true" : " false" );
6767
68+ mUseTrackTime = matchingParam.useTrackTime ;
69+ LOG (info) << " Use track time = " << (mUseTrackTime ? " true" : " false" );
70+
6871 mSaveMode = matchingParam.saveMode ;
6972 LOG (info) << " Save mode MFTMCH candidates = " << mSaveMode ;
7073
@@ -216,8 +219,8 @@ bool MatchGlobalFwd::processMCHMIDMatches()
216219 LOG (debug) << " MCHId: " << MCHId << " --> mMCHID2Work[MCHId]:" << mMCHID2Work [MCHId];
217220 const auto & IR = MIDMatch.getIR ();
218221 int nBC = IR.differenceInBC (mStartIR );
219- float tMin = nBC * o2::constants::lhc::LHCBunchSpacingMUS;
220- float tMax = (nBC + 1 ) * o2::constants::lhc::LHCBunchSpacingMUS;
222+ float tMin = ( nBC - 1 ) * o2::constants::lhc::LHCBunchSpacingMUS;
223+ float tMax = (nBC + 2 ) * o2::constants::lhc::LHCBunchSpacingMUS;
221224 thisMuonTrack.setMIDTrackID (MIDId);
222225 thisMuonTrack.setTimeMUS (MIDMatch.getTimeMUS (mStartIR ).first );
223226 thisMuonTrack.tBracket .set (tMin, tMax);
@@ -435,6 +438,7 @@ void MatchGlobalFwd::ROFMatch(int MFTROFId, int firstMCHROFId, int lastMCHROFId)
435438{
436439 // / Matches MFT tracks on a given ROF with MCH tracks in a range of ROFs
437440 const auto & thisMFTROF = mMFTTrackROFRec [MFTROFId];
441+ const auto & thisMFTBracket = mMFTROFTimes [MFTROFId];
438442 const auto & firstMCHROF = mMCHTrackROFRec [firstMCHROFId];
439443 const auto & lastMCHROF = mMCHTrackROFRec [lastMCHROFId];
440444 int nFakes = 0 , nTrue = 0 ;
@@ -464,6 +468,12 @@ void MatchGlobalFwd::ROFMatch(int MFTROFId, int firstMCHROFId, int lastMCHROFId)
464468 // loop over all MCH tracks
465469 for (auto MCHId = firstMCHTrackID; MCHId <= lastMCHTrackID; MCHId++) {
466470 auto & thisMCHTrack = mMCHWork [MCHId];
471+
472+ // If enabled, use the muon track time to check if the track is correlated with the MFT ROF
473+ if (mUseTrackTime && (thisMFTBracket.isOutside (thisMCHTrack.tBracket ))) {
474+ continue ;
475+ }
476+
467477 o2::MCCompLabel matchLabel;
468478 for (auto MFTId = firstMFTTrackID; MFTId <= lastMFTTrackID; MFTId++) {
469479 auto & thisMFTTrack = mMFTWork [MFTId];
0 commit comments