Skip to content
Merged
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: 2 additions & 1 deletion PWGUD/TableProducer/upcCandProducerGlobalMuon.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
/// \author Roman Lavicka, roman.lavicka@cern.ch
/// \since 11.02.2026

#include "Common/Core/fwdtrackUtilities.h"
#include "PWGUD/Core/UPCCutparHolder.h"
#include "PWGUD/Core/UPCHelpers.h"
#include "PWGUD/DataModel/UDTables.h"

#include "Common/Core/fwdtrackUtilities.h"

#include <CCDB/BasicCCDBManager.h>
#include <CCDB/CcdbApi.h>
#include <CommonConstants/LHCConstants.h>
Expand Down Expand Up @@ -513,7 +514,7 @@
fBestMuonMatch.clear();
std::unordered_map<int, std::pair<float, int>> mCandidates;
for (const auto& muon : fwdTracks) {
if (static_cast<int>(muon.trackType()) < 2) {

Check failure on line 517 in PWGUD/TableProducer/upcCandProducerGlobalMuon.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 @@ -525,7 +526,7 @@
}
}
}
for (auto& pairCand : mCandidates) {

Check failure on line 529 in PWGUD/TableProducer/upcCandProducerGlobalMuon.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.
fBestMuonMatch[pairCand.second.second] = true;
}
}
Expand Down Expand Up @@ -637,7 +638,7 @@
continue;

// For global tracks, skip if not the best match for this MCH track
if (fKeepBestMuonMatch && static_cast<int>(trackType) < 2) {

Check failure on line 641 in PWGUD/TableProducer/upcCandProducerGlobalMuon.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.
if (fBestMuonMatch.find(fwdTrack.globalIndex()) == fBestMuonMatch.end()) {
continue;
}
Expand Down
Loading