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 DPG/Tasks/MFT/aQCMFTTracks.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@
#include "Framework/TimingInfo.h"
#include "Framework/runDataProcessing.h"

#include <algorithm>
#include <TH1F.h>
#include <TH2F.h>

#include <algorithm>

using namespace o2;
using namespace o2::framework;
using namespace o2::aod;
Expand Down Expand Up @@ -88,13 +89,13 @@
float eta = track.eta();
float phi = track.phi();
float nCls = track.nClusters();
if (nCls >= 5) {

Check failure on line 92 in DPG/Tasks/MFT/aQCMFTTracks.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.
registry.fill(HIST("mMFTTrackXY_5_MinClusters"), x, y);
registry.fill(HIST("mMFTTrackEtaPhi_5_MinClusters"), eta, phi);
if (nCls >= 7) {

Check failure on line 95 in DPG/Tasks/MFT/aQCMFTTracks.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.
registry.fill(HIST("mMFTTrackXY_7_MinClusters"), x, y);
registry.fill(HIST("mMFTTrackEtaPhi_7_MinClusters"), eta, phi);
if (nCls >= 8) {

Check failure on line 98 in DPG/Tasks/MFT/aQCMFTTracks.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.
registry.fill(HIST("mMFTTrackXY_8_MinClusters"), x, y);
registry.fill(HIST("mMFTTrackEtaPhi_8_MinClusters"), eta, phi);
}
Expand All @@ -102,12 +103,12 @@
}
if (avClsPlots) {
std::array<float, 10> clsSize;
for (unsigned int layer = 0; layer < 10; layer++) {

Check failure on line 106 in DPG/Tasks/MFT/aQCMFTTracks.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.
clsSize[layer] = (track.mftClusterSizesAndTrackFlags() >> (layer * 6)) & 0x3f;
// LOG(info) << "Layer " << layer << ": " << clsSize[layer];
}
float avgCls = 0;
for (unsigned int layer = 0; layer < 10; layer++) {

Check failure on line 111 in DPG/Tasks/MFT/aQCMFTTracks.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.
avgCls += clsSize[layer];
}
avgCls /= track.nClusters();
Expand All @@ -115,11 +116,11 @@
std::sort(clsSize.begin(), clsSize.end());
float truncatedAvgCls = 0;
int ncls = 0;
for (unsigned int layer = 0; layer < 10; layer++) {

Check failure on line 119 in DPG/Tasks/MFT/aQCMFTTracks.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 (clsSize[layer] > 0) {
truncatedAvgCls += clsSize[layer];
ncls++;
if (ncls >= 3) {

Check failure on line 123 in DPG/Tasks/MFT/aQCMFTTracks.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.
break; // we take the average of the first 5 non-zero clusters
}
}
Expand Down Expand Up @@ -162,7 +163,7 @@
if (clsSize[layer] > 0) {
truncatedAvgCls += clsSize[layer];
ncls++;
if (ncls >= 3) {

Check failure on line 166 in DPG/Tasks/MFT/aQCMFTTracks.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.
break; // we take the average of the first 5 non-zero clusters
}
}
Expand All @@ -171,7 +172,7 @@

if (track.has_mcParticle()) {
const auto& mcParticle = track.mcParticle();
if (std::abs(mcParticle.pdgCode()) == 1000020040) { // He4

Check failure on line 175 in DPG/Tasks/MFT/aQCMFTTracks.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.

Check failure on line 175 in DPG/Tasks/MFT/aQCMFTTracks.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.
registry.fill(HIST("mMFTTrackAvgClustersHe"), track.p(), avgCls);
registry.fill(HIST("mMFTTrackAvgClustersTruHe"), track.p(), truncatedAvgCls);
}
Expand Down
Loading