Skip to content

Commit 0ce7e94

Browse files
author
Zuzanna Chochulska
committed
Corrections for the PR part 2
1 parent 7a40200 commit 0ce7e94

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
#include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h"
2626
#include "PWGCF/FemtoUniverse/DataModel/FemtoDerived.h"
2727

28+
#include "TPDGCode.h"
2829
#include <CommonConstants/MathConstants.h>
30+
#include "CommonConstants/PhysicsConstants.h"
2931
#include <Framework/ASoA.h>
3032
#include <Framework/ASoAHelpers.h>
3133
#include <Framework/AnalysisDataModel.h>
@@ -483,7 +485,7 @@ struct FemtoUniversePairTaskTrackPhi {
483485
trackHistoPartPhi.fillQA<false, false>(phicandidate);
484486
if constexpr (isMC) {
485487
// reco
486-
effCorrection.fillRecoHist<ParticleNo::ONE, FilteredFDCollisions>(phicandidate, 333);
488+
effCorrection.fillRecoHist<ParticleNo::ONE, FilteredFDCollisions>(phicandidate, o2::constants::physics::Pdg::kPhi );
487489
}
488490
}
489491

@@ -691,18 +693,18 @@ struct FemtoUniversePairTaskTrackPhi {
691693
// charge +
692694
if (pdgParticle->Charge() > 0.0) {
693695
registryMCtruth.fill(HIST("MCtruthAllPositivePt"), part.pt());
694-
if (pdgCode == 2212) {
696+
if (pdgCode == kProton) {
695697
registryMCtruth.fill(HIST("MCtruthPpos"), part.pt(), part.eta());
696698
registryMCtruth.fill(HIST("MCtruthPposPt"), part.pt());
697699
continue;
698-
} else if (pdgCode == 321) {
700+
} else if (pdgCode == kKPlus) {
699701
registryMCtruth.fill(HIST("MCtruthKp"), part.pt(), part.eta());
700702
registryMCtruth.fill(HIST("MCtruthKpPt"), part.pt());
701703
continue;
702704
}
703705
}
704706
// charge 0
705-
if (pdgCode == 333) {
707+
if (pdgCode == o2::constants::physics::Pdg::kPhi) {
706708
registryMCtruth.fill(HIST("MCtruthPhi"), part.pt(), part.eta());
707709
registryMCtruth.fill(HIST("MCtruthPhiPt"), part.pt());
708710
effCorrection.fillTruthHist<ParticleNo::ONE, FilteredFDCollisions>(part);
@@ -713,11 +715,11 @@ struct FemtoUniversePairTaskTrackPhi {
713715
if (pdgParticle->Charge() < 0.0) {
714716
registryMCtruth.fill(HIST("MCtruthAllNegativePt"), part.pt());
715717

716-
if (pdgCode == -321) {
718+
if (pdgCode == kKMinus) {
717719
registryMCtruth.fill(HIST("MCtruthKm"), part.pt(), part.eta());
718720
registryMCtruth.fill(HIST("MCtruthKmPt"), part.pt());
719721
continue;
720-
} else if (pdgCode == -2212) {
722+
} else if (pdgCode == kProtonBar) {
721723
registryMCtruth.fill(HIST("MCtruthPneg"), part.pt(), part.eta());
722724
registryMCtruth.fill(HIST("MCtruthPnegPt"), part.pt());
723725
continue;
@@ -740,27 +742,27 @@ struct FemtoUniversePairTaskTrackPhi {
740742
float weightTrack = effCorrection.getWeight<FilteredFDCollisions>(ParticleNo::TWO, part);
741743
registryMCpT.fill(HIST("MCReco/C_p_pT"), part.pt(), weightTrack);
742744
}
743-
if ((mcpart.pdgMCTruth() == 333) && (part.partType() == aod::femtouniverseparticle::ParticleType::kPhi) && (part.pt() > ConfPhiPtLow) && (part.pt() < ConfPhiPtHigh)) {
745+
if ((mcpart.pdgMCTruth() == o2::constants::physics::Pdg::kPhi) && (part.partType() == aod::femtouniverseparticle::ParticleType::kPhi) && (part.pt() > ConfPhiPtLow) && (part.pt() < ConfPhiPtHigh)) {
744746
registryMCpT.fill(HIST("MCReco/NC_phi_pT"), part.pt());
745747
float weightPhi = effCorrection.getWeight<FilteredFDCollisions>(ParticleNo::ONE, part);
746748
registryMCpT.fill(HIST("MCReco/C_phi_pT"), part.pt(), weightPhi);
747749
}
748750

749751
if (isParticleNSigmaAccepted(part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon)))
750752
hTrackDCA.fillQA<true, true>(part);
751-
if ((part.partType() == aod::femtouniverseparticle::ParticleType::kPhi) && (mcpart.pdgMCTruth() == 333) && (mcpart.partOriginMCTruth() == aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary)) {
753+
if ((part.partType() == aod::femtouniverseparticle::ParticleType::kPhi) && (mcpart.pdgMCTruth() == o2::constants::physics::Pdg::kPhi) && (mcpart.partOriginMCTruth() == aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary)) {
752754
registryMCreco.fill(HIST("MCrecoPhi"), mcpart.pt(), mcpart.eta()); // phi
753755
registryMCreco.fill(HIST("MCrecoPhiPt"), mcpart.pt());
754756
} else if (part.partType() == aod::femtouniverseparticle::ParticleType::kTrack) {
755757
if (part.sign() > 0) {
756758
registryMCreco.fill(HIST("MCrecoAllPositivePt"), mcpart.pt());
757-
if (mcpart.pdgMCTruth() == 2212 && isParticleNSigmaAccepted(part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon))) {
759+
if (mcpart.pdgMCTruth() == kProton && isParticleNSigmaAccepted(part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon))) {
758760
registryMCreco.fill(HIST("MCrecoPpos"), mcpart.pt(), mcpart.eta());
759761
registryMCreco.fill(HIST("MCrecoPposPt"), mcpart.pt());
760762
}
761763
} else if (part.sign() < 0) {
762764
registryMCreco.fill(HIST("MCrecoAllNegativePt"), mcpart.pt());
763-
if (mcpart.pdgMCTruth() == -2212 && isParticleNSigmaAccepted(part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon))) {
765+
if (mcpart.pdgMCTruth() == kProtonBar && isParticleNSigmaAccepted(part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon))) {
764766
registryMCreco.fill(HIST("MCrecoPneg"), mcpart.pt(), mcpart.eta());
765767
registryMCreco.fill(HIST("MCrecoPnegPt"), mcpart.pt());
766768
}

0 commit comments

Comments
 (0)