Skip to content

Commit 28d9c76

Browse files
aferrero2707shahor02
authored andcommitted
[MUON] use track time in global muon matching
Added option for using the track time when selecting the MFT candidates to be matched with a given MCH track. This helps to reduce the number of candidates when the MCH track is already matched with MID and therefore has a precise timing. In this case the number of MCH tracks that need to be combined with MFT tracks from two adjacent ROFs is strongly reduced.
1 parent 81c73e4 commit 28d9c76

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

Detectors/GlobalTracking/include/GlobalTracking/MatchGlobalFwd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ class MatchGlobalFwd
339339
o2::itsmft::ChipMappingMFT mMFTMapping;
340340
bool mMCTruthON = false; ///< Flag availability of MC truth
341341
bool mUseMIDMCHMatch = false; ///< Flag for using MCHMID matches (TrackMCHMID)
342+
bool mUseTrackTime = false; ///< Flag for using the MCH or MCHMID track time information to select the MFT ROF(s)
342343
int mSaveMode = 0; ///< Output mode [0 = SaveBestMatch; 1 = SaveAllMatches; 2 = SaveTrainingData; 3 = SaveNCandidates]
343344
int mNCandidates = 5; ///< Numbers of matching candidates to save in savemode=3
344345
MatchingType mMatchingType = MATCHINGUNDEFINED;

Detectors/GlobalTracking/include/GlobalTracking/MatchGlobalFwdParam.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ struct GlobalFwdMatchingParam : public o2::conf::ConfigurableParamHelper<GlobalF
3939
bool MCMatching = false; ///< MFT-MCH matching computed from MCLabels
4040
double matchPlaneZ = -77.5; ///< MFT-MCH matching plane z coordinate
4141
bool useMIDMatch = false; ///< Use input from MCH-MID matching
42+
bool useTrackTime = false; ///< Use the MCH or MCHMID track time information to select the MFT ROF(s)
4243
Int_t saveMode = kBestMatch; ///< Global Forward Tracks save mode
4344
float MFTRadLength = 0.042; ///< MFT thickness in radiation length
4445
float alignResidual = 1.; ///< Alignment residual for cluster position uncertainty

Detectors/GlobalTracking/src/MatchGlobalFwd.cxx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)