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
4 changes: 2 additions & 2 deletions Common/Core/RecoDecay.h
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@
std::array<double, 3> momTotal{0., 0., 0.}; // candidate momentum vector
double energyTot{0.}; // candidate energy
for (std::size_t iProng = 0; iProng < N; ++iProng) {
for (std::size_t iMom = 0; iMom < 3; ++iMom) {

Check failure on line 448 in Common/Core/RecoDecay.h

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.
momTotal[iMom] += arrMom[iProng][iMom];
} // loop over momentum components
energyTot += e(arrMom[iProng], arrMass[iProng]);
Expand Down Expand Up @@ -732,7 +732,7 @@
if (!arrDaughters[iProng].has_mcParticle()) {
return -1;
}
auto particleI = arrDaughters[iProng].mcParticle(); // ith daughter particle
auto particleI = arrDaughters[iProng].template mcParticle_as<T>(); // ith daughter particle
if (std::abs(particleI.getGenStatusCode()) == StatusCodeAfterFlavourOscillation) { // oscillation decay product spotted
coefFlavourOscillation = -1; // select the sign of the mother after oscillation (and not before)
break;
Expand All @@ -744,7 +744,7 @@
if (!arrDaughters[iProng].has_mcParticle()) {
return -1;
}
auto particleI = arrDaughters[iProng].mcParticle(); // ith daughter particle
auto particleI = arrDaughters[iProng].template mcParticle_as<T>(); // ith daughter particle
if constexpr (acceptTrackDecay) {
// Replace the MC particle associated with the prong by its mother for π → μ and K → π.
auto motherI = particleI.template mothers_first_as<T>();
Expand Down Expand Up @@ -1014,7 +1014,7 @@
arrayIds.push_back(initVec); // the first vector contains the index of the original particle
auto pdgParticle = std::abs(particle.pdgCode());
bool couldBePrompt = false;
if (pdgParticle / 100 == kCharm || pdgParticle / 1000 == kCharm) {

Check failure on line 1017 in Common/Core/RecoDecay.h

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.
couldBePrompt = true;
}
while (arrayIds[-stage].size() > 0) {
Expand All @@ -1028,7 +1028,7 @@
if (!searchUpToQuark) {
auto mother = particlesMC.rawIteratorAt(particleMother.mothersIds().front() - particlesMC.offset());
auto pdgParticleIMother = std::abs(mother.pdgCode()); // PDG code of the mother
if (pdgParticleIMother < 9 || (pdgParticleIMother > 20 && pdgParticleIMother < 38)) {

Check failure on line 1031 in Common/Core/RecoDecay.h

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 OriginType::Prompt;
}
}
Expand All @@ -1047,8 +1047,8 @@

if (searchUpToQuark) {
if (idxBhadMothers) {
if (pdgParticleIMother / 100 == kBottom || // b mesons

Check failure on line 1050 in Common/Core/RecoDecay.h

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.
pdgParticleIMother / 1000 == kBottom) // b baryons

Check failure on line 1051 in Common/Core/RecoDecay.h

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.
{
idxBhadMothers->push_back(iMother);
}
Expand All @@ -1061,8 +1061,8 @@
}
} else {
if (
(pdgParticleIMother / 100 == kBottom || // b mesons

Check failure on line 1064 in Common/Core/RecoDecay.h

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.
pdgParticleIMother / 1000 == kBottom) // b baryons

Check failure on line 1065 in Common/Core/RecoDecay.h

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 (idxBhadMothers) {
idxBhadMothers->push_back(iMother);
Expand All @@ -1070,8 +1070,8 @@
return OriginType::NonPrompt;
}
if (
(pdgParticleIMother / 100 == kCharm || // c mesons

Check failure on line 1073 in Common/Core/RecoDecay.h

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.
pdgParticleIMother / 1000 == kCharm) // c baryons

Check failure on line 1074 in Common/Core/RecoDecay.h

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.
) {
couldBePrompt = true;
}
Expand Down Expand Up @@ -1112,7 +1112,7 @@
arrayIds.push_back(initVec); // the first vector contains the index of the original particle
auto pdgParticle = std::abs(particle.pdgCode());
bool couldBeCharm = false;
if (pdgParticle / 100 == kCharm || pdgParticle / 1000 == kCharm) {

Check failure on line 1115 in Common/Core/RecoDecay.h

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.
couldBeCharm = true;
}
while (arrayIds[-stage].size() > 0) {
Expand Down
Loading