Skip to content
Closed
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
3 changes: 1 addition & 2 deletions PWGDQ/Tasks/qaMatching.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#include <algorithm>
#include <cinttypes>
#include <iostream>

Check failure on line 35 in PWGDQ/Tasks/qaMatching.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <limits>
#include <map>
#include <memory>
Expand Down Expand Up @@ -1408,8 +1408,8 @@
// extrapolation with MCH tools
auto mchTrackAtVertex = VarManager::PropagateMuon(mchTrack, collision, VarManager::kToVertex);
double pMCH = mchTrackAtVertex.getP();
double px = pMCH * sin(M_PI / 2 - atan(mftTrack.tgl())) * cos(mftTrack.phi());

Check failure on line 1411 in PWGDQ/Tasks/qaMatching.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
double py = pMCH * sin(M_PI / 2 - atan(mftTrack.tgl())) * sin(mftTrack.phi());

Check failure on line 1412 in PWGDQ/Tasks/qaMatching.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
double pt = std::sqrt(std::pow(px, 2) + std::pow(py, 2));
double sign = mchTrack.sign();

Expand Down Expand Up @@ -1600,7 +1600,7 @@
continue;
// get the index associated to the MC particle
auto muonMcParticle = muonTrack.mcParticle();
if (std::abs(muonMcParticle.pdgCode()) != 13)

Check failure on line 1603 in PWGDQ/Tasks/qaMatching.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.
continue;

int64_t muonMcTrackIndex = muonMcParticle.globalIndex();
Expand Down Expand Up @@ -1679,7 +1679,7 @@
if (mchMcParticle.globalIndex() != mftMcParticle.globalIndex())
return false;

if (std::abs(mchMcParticle.pdgCode()) != 13)

Check failure on line 1682 in PWGDQ/Tasks/qaMatching.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.
return false;

return true;
Expand Down Expand Up @@ -1728,7 +1728,7 @@
}

if (result == kMatchTypeUndefined) {
std::cout << std::format("[GetMatchType] isPaired={} isMuon={} decayRanking={} result={}",

Check failure on line 1731 in PWGDQ/Tasks/qaMatching.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
isPaired, isMuon, decayRanking, static_cast<int>(result))
<< std::endl;
}
Expand Down Expand Up @@ -2120,7 +2120,7 @@
// find the index of the matching candidate that corresponds to the true match
// index=1 corresponds to the leading candidate
// index=0 means no candidate was found that corresponds to the true match
int trueMatchIndex= GetTrueMatchIndexTrackType(muonTracks, muonTracks, mftTracks, globalTracksVector, matchablePairs);
int trueMatchIndex = GetTrueMatchIndexTrackType(muonTracks, muonTracks, mftTracks, globalTracksVector, matchablePairs);
int trueMatchIndexProd = GetTrueMatchIndexTrackType(muonTracks, muonTracks, mftTracks, matchingCandidatesProd.at(mchIndex), matchablePairs);

float mcParticleDz = -1000;
Expand Down Expand Up @@ -2297,7 +2297,7 @@
// ====================================
// Matching purity
if (verbose)
std::cout << std::format(" Filling matching purity plots with score cut {}", matchingScoreCut) << std::endl;

Check failure on line 2300 in PWGDQ/Tasks/qaMatching.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
for (auto [mchIndex, globalTracksVector] : matchingCandidates) {
if (globalTracksVector.size() < 1)
continue;
Expand Down Expand Up @@ -2331,10 +2331,10 @@
}

if (verbose) {
std::cout << std::format(" MCH track #{} -> Muon track #{}, isTrueMatch={}", mchIndex, globalTracksVector[0].globalTrackId, isTrueMatch) << std::endl;

Check failure on line 2334 in PWGDQ/Tasks/qaMatching.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
std::cout << " MC ancestry (pdg): ";

Check failure on line 2335 in PWGDQ/Tasks/qaMatching.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
for (auto const& [pdg, idx] : motherParticles) {
std::cout << "(" << pdg << ") ";

Check failure on line 2337 in PWGDQ/Tasks/qaMatching.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
}
std::cout << std::endl;
}
Expand Down Expand Up @@ -2887,7 +2887,6 @@
static_cast<int32_t>(candidate.matchRanking));
}
}

}

template <class TCOLLISION>
Expand Down
Loading