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
4 changes: 4 additions & 0 deletions PWGDQ/Tasks/qaMatching.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@
#include "GlobalTracking/MatchGlobalFwd.h"
#include "MFTTracking/Constants.h"

#include <algorithm>
#include <limits>
#include <map>
#include <memory>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>

using namespace o2;
using namespace o2::framework;
Expand All @@ -49,7 +53,7 @@
using MyMFTCovariance = MyMFTCovariances::iterator;

using SMatrix55 = ROOT::Math::SMatrix<double, 5, 5, ROOT::Math::MatRepSym<double, 5>>;
using SMatrix5 = ROOT::Math::SVector<Double_t, 5>;

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

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.

static float chi2ToScore(float chi2)
{
Expand Down Expand Up @@ -282,7 +286,7 @@
template <class T>
void Fill(const T& track, bool passed)
{
double phi = track.phi() * 180 / TMath::Pi();

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

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
std::get<std::shared_ptr<TH1>>(p_den)->Fill(track.p());
std::get<std::shared_ptr<TH1>>(pt_den)->Fill(track.pt());
std::get<std::shared_ptr<TH1>>(eta_den)->Fill(track.eta());
Expand Down Expand Up @@ -709,7 +713,7 @@
static const double relPRes = 0.0004;
static const double slopeRes = 0.0005;

double thetaAbs = TMath::ATan(mchTrack.rAtAbsorberEnd() / 505.) * TMath::RadToDeg();

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

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.

// propagate muon track to vertex
auto mchTrackAtVertex = VarManager::PropagateMuon(mchTrack, collision, VarManager::kToVertex);
Expand All @@ -722,7 +726,7 @@
double nrp = nSigmaPDCA * relPRes * p;
double pResEffect = sigmaPDCA / (1. - nrp / (1. + nrp));
double slopeResEffect = 535. * slopeRes * p;
double sigmaPDCAWithRes = TMath::Sqrt(pResEffect * pResEffect + slopeResEffect * slopeResEffect);

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

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
if (pDCA > nSigmaPDCA * sigmaPDCAWithRes) {
return false;
}
Expand Down Expand Up @@ -847,7 +851,7 @@

bool IsMatchableMCH(int64_t mchTrackId, const std::vector<std::pair<int64_t, int64_t>>& matchablePairs)
{
for (auto [id1, id2] : matchablePairs) {

Check failure on line 854 in PWGDQ/Tasks/qaMatching.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.
if (mchTrackId == id1)
return true;
}
Expand All @@ -856,7 +860,7 @@

std::optional<std::pair<int64_t, int64_t>> GetMatchablePairForMCH(int64_t mchTrackId, const std::vector<std::pair<int64_t, int64_t>>& matchablePairs)
{
for (auto pair : matchablePairs) {

Check failure on line 863 in PWGDQ/Tasks/qaMatching.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.
if (mchTrackId == pair.first)
return pair;
}
Expand Down Expand Up @@ -983,7 +987,7 @@
collisionInfos.clear();

// fill collision information for global muon tracks (MFT-MCH-MID matches)
for (auto muonTrack : muonTracks) {

Check failure on line 990 in PWGDQ/Tasks/qaMatching.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.
if (!muonTrack.has_collision())
continue;

Expand Down Expand Up @@ -1025,7 +1029,7 @@
}

// fill collision information for MFT standalone tracks
for (auto mftTrack : mftTracks) {

Check failure on line 1032 in PWGDQ/Tasks/qaMatching.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.
if (!mftTrack.has_collision())
continue;

Expand All @@ -1049,8 +1053,8 @@
return (track1.second > track2.second);
};

for (auto& [collisionIndex, collisionInfo] : collisionInfos) {

Check failure on line 1056 in PWGDQ/Tasks/qaMatching.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.
for (auto& [mchIndex, globalTracksVector] : collisionInfo.matchingCandidates) {

Check failure on line 1057 in PWGDQ/Tasks/qaMatching.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.
std::sort(globalTracksVector.begin(), globalTracksVector.end(), compareMatchingScore);
}
}
Expand Down
Loading