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: 2 additions & 2 deletions PWGDQ/Tasks/muonGlobalAlignment.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@
#include <THnSparse.h>
#include <TMath.h>

#include "rapidjson/document.h"

#include <GPUROOTCartesianFwd.h>
#include <RtypesCore.h>

#include "rapidjson/document.h"

#include <algorithm>
#include <array>
#include <chrono>
Expand Down Expand Up @@ -250,7 +250,7 @@
std::map<uint64_t, CollisionInfo>& collisionInfos)
{
// fill collision information for global muon tracks (MFT-MCH-MID matches)
for (auto muonTrack : muonTracks) {

Check failure on line 253 in PWGDQ/Tasks/muonGlobalAlignment.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 @@ -298,8 +298,8 @@
return (track1.chi2MatchMCHMFT() < track2.chi2MatchMCHMFT());
};

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

Check failure on line 301 in PWGDQ/Tasks/muonGlobalAlignment.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.globalMuonTracks) {

Check failure on line 302 in PWGDQ/Tasks/muonGlobalAlignment.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(), compareChi2);
}
}
Expand All @@ -314,7 +314,7 @@
InitCollisions(collisions, bcs, muonTracks, collisionInfos);

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

Check failure on line 317 in PWGDQ/Tasks/muonGlobalAlignment.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 Down Expand Up @@ -1027,8 +1027,8 @@
track.setBendingCoor(y + yCorrection);
track.setBendingSlope(ySlope + ySlopeCorrection);
/*
std::cout << std::format("[TOTO] MFT position: pos={:0.3f},{:0.3f}", x, y) << std::endl;

Check failure on line 1030 in PWGDQ/Tasks/muonGlobalAlignment.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
std::cout << std::format("[TOTO] MFT corrections: pos={:0.3f},{:0.3f} slope={:0.12f},{:0.12f} angle={:0.12f},{:0.12f}",

Check failure on line 1031 in PWGDQ/Tasks/muonGlobalAlignment.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
xCorrection, yCorrection, xSlopeCorrection, ySlopeCorrection,
std::atan2(xSlopeCorrection, 1), std::atan2(ySlopeCorrection, 1)) << std::endl;
*/
Expand Down Expand Up @@ -1066,8 +1066,8 @@
template <typename T>
T UpdateTrackMomentum(const T& track, const double p, int sign)
{
double px = p * sin(M_PI / 2 - atan(track.tgl())) * cos(track.phi());

Check failure on line 1069 in PWGDQ/Tasks/muonGlobalAlignment.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

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

Check failure on line 1070 in PWGDQ/Tasks/muonGlobalAlignment.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));

SMatrix5 tpars = {track.x(), track.y(), track.phi(), track.tgl(), sign / pt};
Expand All @@ -1087,8 +1087,8 @@
template <typename T>
T UpdateTrackMomentum(const T& track, const o2::mch::TrackParam& track4mom)
{
double px = track4mom.p() * sin(M_PI / 2 - atan(track.tgl())) * cos(track.phi());

Check failure on line 1090 in PWGDQ/Tasks/muonGlobalAlignment.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

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

Check failure on line 1091 in PWGDQ/Tasks/muonGlobalAlignment.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 = track4mom.getCharge();

Expand Down
Loading