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
Original file line number Diff line number Diff line change
Expand Up @@ -323,25 +323,25 @@
bool isKaonNSigma(float mom, float nsigmaTPCK, float nsigmaTOFK)
{

if (mom < 0.3) { // 0.0-0.3

Check warning on line 326 in PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.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 (std::abs(nsigmaTPCK) < ConfPhiSelection.confPhiKaonNsigmaTPCfrom0_0to0_3) {
return true;
} else {
return false;
}
} else if (mom < 0.45) { // 0.30 - 0.45

Check warning on line 332 in PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.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 (std::abs(nsigmaTPCK) < ConfPhiSelection.confPhiKaonNsigmaTPCfrom0_3to0_45) {
return true;
} else {
return false;
}
} else if (mom < 0.55) { // 0.45-0.55

Check warning on line 338 in PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.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 (std::abs(nsigmaTPCK) < ConfPhiSelection.confPhiKaonNsigmaTPCfrom0_45to0_55) {
return true;
} else {
return false;
}
} else if (mom < 1.5) { // 0.55-1.5 (now we use TPC and TOF)

Check warning on line 344 in PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.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 ((std::abs(nsigmaTOFK) < ConfPhiSelection.confPhiKaonNsigmaTOFfrom0_55to1_5) && (std::abs(nsigmaTPCK) < ConfPhiSelection.confPhiKaonNsigmaTPCfrom0_55to1_5)) {
{
return true;
Expand All @@ -349,7 +349,7 @@
} else {
return false;
}
} else if (mom > 1.5) { // 1.5 -

Check warning on line 352 in PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.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 ((std::abs(nsigmaTOFK) < ConfPhiSelection.confPhiKaonNsigmaTOFfrom1_5) && (std::abs(nsigmaTPCK) < ConfPhiSelection.confPhiKaonNsigmaTPCfrom1_5)) {
return true;
} else {
Expand All @@ -362,7 +362,7 @@

bool isKaonNSigmaLF(float mom, float nsigmaTPCK, float nsigmaTOFK, bool hasTOF)
{
if (mom < 0.5) {

Check warning on line 365 in PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.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 (std::abs(nsigmaTPCK) < 3.0) {
return true;
} else {
Expand Down Expand Up @@ -740,7 +740,7 @@
if ((kaon1MC.isPhysicalPrimary() && kaon2MC.isPhysicalPrimary()) && (!motherskaon1MC.empty() && !motherskaon2MC.empty())) {
for (const auto& particleMotherOfNeg : motherskaon1MC) {
for (const auto& particleMotherOfPos : motherskaon2MC) {
if (particleMotherOfNeg == particleMotherOfPos && particleMotherOfNeg.pdgCode() == 333) {

Check warning on line 743 in PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
phiOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary;
} else {
phiOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake;
Expand Down Expand Up @@ -1549,9 +1549,13 @@
}
// implementing PID cuts for phi children
if (ConfPhiSelection.confPhiDoLFPID4Kaons) {
if ((p1.isGlobalTrackWoDCA() == false) || (p2.isGlobalTrackWoDCA() == false) || (p1.isPVContributor() == false) || (p2.isPVContributor() == false)) {
continue;
}
if (!(isKaonNSigmaLF(p1.pt(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon), p1.hasTOF()))) {
continue;
} else if (!(isKaonNSigmaLF(p2.pt(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), p2.hasTOF()))) {
}
if (!(isKaonNSigmaLF(p2.pt(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon), p2.hasTOF()))) {
continue;
}
} else {
Expand All @@ -1563,7 +1567,8 @@
}
if (isKaonRejected(p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion))) {
continue;
} else if (isKaonRejected(p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion))) {
}
if (isKaonRejected(p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion))) {
continue;
}

Expand Down Expand Up @@ -1683,7 +1688,7 @@
std::vector<int> tmpPDGCodes = confMCTruthPDGCodes; // necessary due to some features of the Configurable
for (auto const& pdg : tmpPDGCodes) {
if (static_cast<int>(pdg) == static_cast<int>(pdgCode)) {
if (pdgCode == 333) { // && (recoMcIds && recoMcIds->get().contains(particle.globalIndex()))) { // ATTENTION: all Phi mesons are NOT primary particles

Check warning on line 1691 in PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
pass = true;
} else {
if (particle.isPhysicalPrimary() || (confActivateSecondaries && recoMcIds && recoMcIds->get().contains(particle.globalIndex())))
Expand Down Expand Up @@ -1824,9 +1829,9 @@
std::vector<int> tmpPDGCodes = confMCTruthPDGCodes; // necessary due to some features of the Configurable
for (auto const& pdg : tmpPDGCodes) {
if (static_cast<int>(pdg) == static_cast<int>(pdgCode)) {
if (pdgCode == 333) { // && (recoMcIds && recoMcIds->get().contains(particle.globalIndex()))) { // ATTENTION: all Phi mesons are NOT primary particles

Check warning on line 1832 in PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
pass = true;
} else if (pdgCode == 421) {

Check warning on line 1834 in PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
pass = true;
} else {
if (particle.isPhysicalPrimary() || (confActivateSecondaries && recoMcIds && recoMcIds->get().contains(particle.globalIndex())))
Expand Down
Loading