Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please consider the following formatting changes to #13911 #37

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ class MatchGlobalFwd
o2::itsmft::ChipMappingMFT mMFTMapping;
bool mMCTruthON = false; ///< Flag availability of MC truth
bool mUseMIDMCHMatch = false; ///< Flag for using MCHMID matches (TrackMCHMID)
bool mUseTrackTime = false; ///< Flag for using the MCH or MCHMID track time information to select the MFT ROF(s)
int mSaveMode = 0; ///< Output mode [0 = SaveBestMatch; 1 = SaveAllMatches; 2 = SaveTrainingData; 3 = SaveNCandidates]
int mNCandidates = 5; ///< Numbers of matching candidates to save in savemode=3
MatchingType mMatchingType = MATCHINGUNDEFINED;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ struct GlobalFwdMatchingParam : public o2::conf::ConfigurableParamHelper<GlobalF
bool MCMatching = false; ///< MFT-MCH matching computed from MCLabels
double matchPlaneZ = -77.5; ///< MFT-MCH matching plane z coordinate
bool useMIDMatch = false; ///< Use input from MCH-MID matching
bool useTrackTime = false; ///< Use the MCH or MCHMID track time information to select the MFT ROF(s)
Int_t saveMode = kBestMatch; ///< Global Forward Tracks save mode
float MFTRadLength = 0.042; ///< MFT thickness in radiation length
float alignResidual = 1.; ///< Alignment residual for cluster position uncertainty
Expand Down
14 changes: 12 additions & 2 deletions Detectors/GlobalTracking/src/MatchGlobalFwd.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ void MatchGlobalFwd::init()
mUseMIDMCHMatch = matchingParam.useMIDMatch;
LOG(info) << "UseMIDMCH Matching = " << (mUseMIDMCHMatch ? "true" : "false");

mUseTrackTime = matchingParam.useTrackTime;
LOG(info) << "Use track time = " << (mUseTrackTime ? "true" : "false");

mSaveMode = matchingParam.saveMode;
LOG(info) << "Save mode MFTMCH candidates = " << mSaveMode;

Expand Down Expand Up @@ -216,8 +219,8 @@ bool MatchGlobalFwd::processMCHMIDMatches()
LOG(debug) << " MCHId: " << MCHId << " --> mMCHID2Work[MCHId]:" << mMCHID2Work[MCHId];
const auto& IR = MIDMatch.getIR();
int nBC = IR.differenceInBC(mStartIR);
float tMin = nBC * o2::constants::lhc::LHCBunchSpacingMUS;
float tMax = (nBC + 1) * o2::constants::lhc::LHCBunchSpacingMUS;
float tMin = (nBC - 1) * o2::constants::lhc::LHCBunchSpacingMUS;
float tMax = (nBC + 2) * o2::constants::lhc::LHCBunchSpacingMUS;
thisMuonTrack.setMIDTrackID(MIDId);
thisMuonTrack.setTimeMUS(MIDMatch.getTimeMUS(mStartIR).first);
thisMuonTrack.tBracket.set(tMin, tMax);
Expand Down Expand Up @@ -435,6 +438,7 @@ void MatchGlobalFwd::ROFMatch(int MFTROFId, int firstMCHROFId, int lastMCHROFId)
{
/// Matches MFT tracks on a given ROF with MCH tracks in a range of ROFs
const auto& thisMFTROF = mMFTTrackROFRec[MFTROFId];
const auto& thisMFTBracket = mMFTROFTimes[MFTROFId];
const auto& firstMCHROF = mMCHTrackROFRec[firstMCHROFId];
const auto& lastMCHROF = mMCHTrackROFRec[lastMCHROFId];
int nFakes = 0, nTrue = 0;
Expand Down Expand Up @@ -464,6 +468,12 @@ void MatchGlobalFwd::ROFMatch(int MFTROFId, int firstMCHROFId, int lastMCHROFId)
// loop over all MCH tracks
for (auto MCHId = firstMCHTrackID; MCHId <= lastMCHTrackID; MCHId++) {
auto& thisMCHTrack = mMCHWork[MCHId];

// If enabled, use the muon track time to check if the track is correlated with the MFT ROF
if (mUseTrackTime && (thisMFTBracket.isOutside(thisMCHTrack.tBracket))) {
continue;
}

o2::MCCompLabel matchLabel;
for (auto MFTId = firstMFTTrackID; MFTId <= lastMFTTrackID; MFTId++) {
auto& thisMFTTrack = mMFTWork[MFTId];
Expand Down