Skip to content

Commit c0437e3

Browse files
committed
fix PD codes errors
1 parent 97f429d commit c0437e3

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

PWGLF/TableProducer/Nuspex/ebyeMaker.cxx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444

4545
#include "PWGLF/DataModel/LFEbyeTables.h"
4646

47-
#include "TDatabasePDG.h"
4847
#include "TFormula.h"
4948

5049
using namespace o2;
@@ -332,7 +331,7 @@ struct ebyeMaker {
332331
case 3122: {
333332
int foundPi = 0;
334333
for (const auto& mcDaught : mother.template daughters_as<aod::McParticles>()) {
335-
if (std::abs(mcDaught.pdgCode()) == 211) {
334+
if (std::abs(mcDaught.pdgCode()) == PDG_t::kPiPlus) {
336335
foundPi = mcDaught.pdgCode();
337336
break;
338337
}
@@ -542,7 +541,7 @@ struct ebyeMaker {
542541

543542
float v0m = -1;
544543
auto scaleMC = [](float x, float pars[6]) {
545-
return std::pow(((pars[0] + pars[1] * pow(x, pars[2])) - pars[3]) / pars[4], 1.0f / pars[5]);
544+
return std::pow(((pars[0] + pars[1] * std::pow(x, pars[2])) - pars[3]) / pars[4], 1.0f / pars[5]);
546545
};
547546

548547
if (Run2V0MInfo.mMCScale != nullptr) {
@@ -958,9 +957,9 @@ struct ebyeMaker {
958957
for (const auto& posMother : mcTrackPos.template mothers_as<aod::McParticles>()) {
959958
if (posMother.globalIndex() != negMother.globalIndex())
960959
continue;
961-
if (!((mcTrackPos.pdgCode() == 2212 && mcTrackNeg.pdgCode() == -211) || (mcTrackPos.pdgCode() == 211 && mcTrackNeg.pdgCode() == -2212)))
960+
if (!((mcTrackPos.pdgCode() == PDG_t::kProton && mcTrackNeg.pdgCode() == PDT_t::kPiMinus) || (mcTrackPos.pdgCode() == PDG_t::kPiPlus && mcTrackNeg.pdgCode() == PDG_t::kProtonBar)))
962961
continue;
963-
if (std::abs(posMother.pdgCode()) != 3122) {
962+
if (std::abs(posMother.pdgCode()) != PDG_t::kLambda0) {
964963
continue;
965964
}
966965
if (!posMother.isPhysicalPrimary() && !posMother.has_mothers())
@@ -991,12 +990,12 @@ struct ebyeMaker {
991990
if (((mcPart.flags() & 0x8) && (doprocessMcRun2 || doprocessMiniMcRun2)) || (mcPart.flags() & 0x2) || ((mcPart.flags() & 0x1) && !doprocessMiniMcRun2))
992991
continue;
993992
auto pdgCode = mcPart.pdgCode();
994-
if (std::abs(pdgCode) == 3122) {
993+
if (std::abs(pdgCode) == PDG_t::kLambda0) {
995994
if (!mcPart.isPhysicalPrimary() && !mcPart.has_mothers())
996995
continue;
997996
bool foundPr = false;
998997
for (const auto& mcDaught : mcPart.daughters_as<aod::McParticles>()) {
999-
if (std::abs(mcDaught.pdgCode()) == 2212) {
998+
if (std::abs(mcDaught.pdgCode()) == PDG_t::kProton) {
1000999
foundPr = true;
10011000
break;
10021001
}

0 commit comments

Comments
 (0)