Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion PWGLF/Tasks/QC/mcParticlePrediction.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 PWGLF/Tasks/QC/mcParticlePrediction.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 @@ -57,7 +57,7 @@
// Particles
static const std::vector<std::string> parameterNames{"Enable"};
static constexpr int nParameters = 1;
static const int defaultParticles[PIDExtended::NIDsTot][nParameters]{{0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {1}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}};
static const int defaultParticles[PIDExtended::NIDsTot][nParameters]{{0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {1}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}};
bool enabledParticlesArray[PIDExtended::NIDsTot];

// Estimators
Expand Down Expand Up @@ -456,7 +456,7 @@
}

histos.fill(HIST("collisions/generated"), 1);
if (std::abs(mcCollision.posZ()) > 10.f) {

Check failure on line 459 in PWGLF/Tasks/QC/mcParticlePrediction.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.
return;
}
histos.fill(HIST("collisions/generated"), 2);
Expand Down Expand Up @@ -500,7 +500,7 @@

TParticlePDG* p = pdgDB->GetParticle(particle.pdgCode());
if (p) {
if (std::abs(p->Charge()) > 1e-3) {

Check failure on line 503 in PWGLF/Tasks/QC/mcParticlePrediction.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.
histos.fill(HIST("particles/eta/charged"), particle.eta());
} else {
histos.fill(HIST("particles/eta/neutral"), particle.eta());
Expand Down
14 changes: 13 additions & 1 deletion PWGLF/Utils/mcParticle.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ class PIDExtended
static constexpr ID XiCPlus = PIDCounts + 37;
static constexpr ID XiC0 = PIDCounts + 38;
static constexpr ID Kstar = PIDCounts + 39;
static constexpr ID NIDsTot = PIDCounts + 40;
static constexpr ID KstarPM = PIDCounts + 40;
static constexpr ID Kshort = PIDCounts + 41;
static constexpr ID Xi1530 = PIDCounts + 42;
static constexpr ID NIDsTot = PIDCounts + 43;

static constexpr const char* sNames[NIDsTot + 1] = {
o2::track::pid_constants::sNames[Electron], // Electron
Expand Down Expand Up @@ -193,6 +196,9 @@ class PIDExtended
"XiCPlus", // XiCPlus
"XiC0", // XiC0
"Kstar", // Kstar
"KstarPM", // KstarPM
"Kshort", // Kshort
"Xi1530", // Xi1530
nullptr};

static std::vector<std::string> arrayNames()
Expand Down Expand Up @@ -329,6 +335,12 @@ class PIDExtended
return XiC0;
case o2::constants::physics::Pdg::kK0Star892:
return Kstar;
case 323:
return KstarPM;
case 310:
return Kshort;
case 3324:
return Xi1530;
default:
LOG(debug) << "Cannot identify particle with PDG code " << particle.pdgCode();
break;
Expand Down
Loading