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
12 changes: 7 additions & 5 deletions DPG/Tasks/MFT/aQCMFTTracks.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in DPG/Tasks/MFT/aQCMFTTracks.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down 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,16 +89,17 @@
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 >= 6) {
registry.fill(HIST("mMFTTrackXY_6_MinClusters"), x, y);
registry.fill(HIST("mMFTTrackEtaPhi_6_MinClusters"), eta, phi);
} if (nCls >= 7) {
if (nCls >= 6) {

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_6_MinClusters"), x, y);
registry.fill(HIST("mMFTTrackEtaPhi_6_MinClusters"), eta, phi);
}
if (nCls >= 7) {

Check failure on line 99 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 102 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 @@ -123,7 +125,7 @@
if (clsSize[layer] > 0) {
truncatedAvgCls += clsSize[layer];
ncls++;
if (ncls >= 3) {

Check failure on line 128 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 @@ -166,7 +168,7 @@
if (clsSize[layer] > 0) {
truncatedAvgCls += clsSize[layer];
ncls++;
if (ncls >= 3) {

Check failure on line 171 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 @@ -175,7 +177,7 @@

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

Check failure on line 180 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 180 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