Skip to content
Open
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
4 changes: 2 additions & 2 deletions PWGDQ/Tasks/mftMchMatcher.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@
DECLARE_SOA_COLUMN(Chi2Glob, chi2Glob, float);
DECLARE_SOA_COLUMN(Chi2Match, chi2Match, float);
DECLARE_SOA_COLUMN(IsAmbig, isAmbig, bool);
DECLARE_SOA_COLUMN(MFTMult, mftMult, int);

Check failure on line 145 in PWGDQ/Tasks/mftMchMatcher.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(DCAX, dcaX, float);

Check failure on line 146 in PWGDQ/Tasks/mftMchMatcher.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(DCAY, dcaY, float);
DECLARE_SOA_COLUMN(McMaskGlob, mcMaskGlob, int);
DECLARE_SOA_COLUMN(MatchLabel, matchLabel, int);
Expand Down Expand Up @@ -302,7 +302,7 @@
double p = mchTrackAtVertex.p();

double pDCA = mchTrack.pDca();
double sigmaPDCA = (thetaAbs < 3) ? sigmaPDCA23 : sigmaPDCA310;

Check failure on line 305 in PWGDQ/Tasks/mftMchMatcher.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
double nrp = nSigmaPDCA * relPRes * p;
double pResEffect = sigmaPDCA / (1. - nrp / (1. + nrp));
double slopeResEffect = 535. * slopeRes * p;
Expand Down Expand Up @@ -438,7 +438,7 @@
fBestMatch.clear();
std::unordered_map<int, std::pair<float, int>> mCandidates;
for (const auto& muon : muons) {
if (static_cast<int>(muon.trackType()) < 2) {

Check failure on line 441 in PWGDQ/Tasks/mftMchMatcher.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
auto muonID = muon.matchMCHTrackId();
auto chi2 = muon.chi2MatchMCHMFT();
if (mCandidates.find(muonID) == mCandidates.end()) {
Expand All @@ -450,7 +450,7 @@
}
}
}
for (auto& pairCand : mCandidates) {

Check failure on line 453 in PWGDQ/Tasks/mftMchMatcher.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
fBestMatch[pairCand.second.second] = true;
}
}
Expand All @@ -460,12 +460,12 @@
TMFT const& mftTracks,
std::vector<std::pair<int64_t, int64_t>>& matchablePairs)
{
static constexpr int muonPdgCode = 13;

Check failure on line 463 in PWGDQ/Tasks/mftMchMatcher.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.

// outer loop on muon tracks
for (const auto& muonTrack : muonTracks) {
// only consider MCH standalone or MCH-MID matches
if (static_cast<int>(muonTrack.trackType()) <= 2) {

Check failure on line 468 in PWGDQ/Tasks/mftMchMatcher.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue;
}

Expand Down Expand Up @@ -557,7 +557,7 @@
{
MuonMatchType result{kMatchTypeUndefined};

if (static_cast<int>(muonTrack.trackType()) > 2) {

Check failure on line 560 in PWGDQ/Tasks/mftMchMatcher.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return result;
}

Expand Down Expand Up @@ -616,13 +616,13 @@
fillMatchablePairs(muonTracks, mftTracks, matchablePairs);

mftCovIndexes.clear();
for (auto& mftTrackCov : mftCovs) {

Check failure on line 619 in PWGDQ/Tasks/mftMchMatcher.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
mftCovIndexes[mftTrackCov.matchMFTTrackId()] = mftTrackCov.globalIndex();
}

fwdMatchMLCandidates.reserve(muonTracks.size());

for (auto muon : muonTracks) {

Check failure on line 625 in PWGDQ/Tasks/mftMchMatcher.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
// only consider global MFT-MCH-MID matches
if (static_cast<int>(muon.trackType()) != 0) {
continue;
Expand Down Expand Up @@ -692,8 +692,8 @@
muonpropCov(3, 3),
muonpropCov(4, 4),
muonpropCov(1, 0),
muonpropCov(2, 0),
muonpropCov(2, 1),
muonpropCov(2, 0),
muonpropCov(3, 0),
muonpropCov(3, 1),
muonpropCov(3, 2),
Expand All @@ -717,8 +717,8 @@
mftpropCov(3, 3),
mftpropCov(4, 4),
mftpropCov(1, 0),
mftpropCov(2, 0),
mftpropCov(2, 1),
mftpropCov(2, 0),
mftpropCov(3, 0),
mftpropCov(3, 1),
mftpropCov(3, 2),
Expand Down
Loading