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
20 changes: 5 additions & 15 deletions PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@

bool isProtonRejected(float mom, float nsigmaTPCPi, float nsigmaTOFPi, float nsigmaTPCK, float nsigmaTOFK)
{
if (mom < 0.5) {

Check failure on line 220 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.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 true;
}
if (mom > 0.5) {
Expand Down Expand Up @@ -513,13 +513,6 @@
if constexpr (isMC) {
// reco
effCorrection.fillRecoHist<ParticleNo::ONE, FilteredFDCollisions>(phicandidate, 333);
// truth
auto mcPartId1 = phicandidate.fdMCParticleId();
auto const& mcpart1 = mcParts.iteratorAt(mcPartId1);
if (mcpart1.pdgMCTruth() != 333) {
continue;
}
effCorrection.fillTruthHist<ParticleNo::ONE, FilteredFDCollisions>(phicandidate);
}
}

Expand Down Expand Up @@ -560,14 +553,6 @@

if constexpr (isMC) {
effCorrection.fillRecoHist<ParticleNo::TWO, FilteredFDCollisions>(track, ConfTrackPDGCode);

// truth
auto mcPartId2 = track.fdMCParticleId();
auto const& mcpart2 = mcParts.iteratorAt(mcPartId2);
if (mcpart2.pdgMCTruth() != ConfTrackPDGCode) {
continue;
}
effCorrection.fillTruthHist<ParticleNo::TWO, FilteredFDCollisions>(track);
}
}

Expand Down Expand Up @@ -728,23 +713,28 @@
continue;
}

if (pdgCode == ConfTrackPDGCode) {
effCorrection.fillTruthHist<ParticleNo::TWO, FilteredFDCollisions>(part);
}

// charge +
if (pdgParticle->Charge() > 0.0) {
registryMCtruth.fill(HIST("MCtruthAllPositivePt"), part.pt());
if (pdgCode == 2212) {

Check failure on line 723 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registryMCtruth.fill(HIST("MCtruthPpos"), part.pt(), part.eta());
registryMCtruth.fill(HIST("MCtruthPposPt"), part.pt());
continue;
} else if (pdgCode == 321) {

Check failure on line 727 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registryMCtruth.fill(HIST("MCtruthKp"), part.pt(), part.eta());
registryMCtruth.fill(HIST("MCtruthKpPt"), part.pt());
continue;
}
}
// charge 0
if (pdgCode == 333) {

Check failure on line 734 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registryMCtruth.fill(HIST("MCtruthPhi"), part.pt(), part.eta());
registryMCtruth.fill(HIST("MCtruthPhiPt"), part.pt());
effCorrection.fillTruthHist<ParticleNo::ONE, FilteredFDCollisions>(part);
continue;
}

Expand All @@ -752,11 +742,11 @@
if (pdgParticle->Charge() < 0.0) {
registryMCtruth.fill(HIST("MCtruthAllNegativePt"), part.pt());

if (pdgCode == -321) {

Check failure on line 745 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registryMCtruth.fill(HIST("MCtruthKm"), part.pt(), part.eta());
registryMCtruth.fill(HIST("MCtruthKmPt"), part.pt());
continue;
} else if (pdgCode == -2212) {

Check failure on line 749 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registryMCtruth.fill(HIST("MCtruthPneg"), part.pt(), part.eta());
registryMCtruth.fill(HIST("MCtruthPnegPt"), part.pt());
continue;
Expand All @@ -779,7 +769,7 @@
float weightTrack = effCorrection.getWeight<FilteredFDCollisions>(ParticleNo::TWO, part);
registryMCpT.fill(HIST("MCReco/C_p_pT"), part.pt(), weightTrack);
}
if ((mcpart.pdgMCTruth() == 333) && (part.partType() == aod::femtouniverseparticle::ParticleType::kPhi) && (part.pt() > ConfPhiPtLow) && (part.pt() < ConfPhiPtHigh)) {

Check failure on line 772 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registryMCpT.fill(HIST("MCReco/NC_phi_pT"), part.pt());
float weightPhi = effCorrection.getWeight<FilteredFDCollisions>(ParticleNo::ONE, part);
registryMCpT.fill(HIST("MCReco/C_phi_pT"), part.pt(), weightPhi);
Expand All @@ -787,19 +777,19 @@

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)))
hTrackDCA.fillQA<true, true>(part);
if ((part.partType() == aod::femtouniverseparticle::ParticleType::kPhi) && (mcpart.pdgMCTruth() == 333) && (mcpart.partOriginMCTruth() == aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary)) {

Check failure on line 780 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registryMCreco.fill(HIST("MCrecoPhi"), mcpart.pt(), mcpart.eta()); // phi
registryMCreco.fill(HIST("MCrecoPhiPt"), mcpart.pt());
} else if (part.partType() == aod::femtouniverseparticle::ParticleType::kTrack) {
if (part.sign() > 0) {
registryMCreco.fill(HIST("MCrecoAllPositivePt"), mcpart.pt());
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))) {

Check failure on line 786 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registryMCreco.fill(HIST("MCrecoPpos"), mcpart.pt(), mcpart.eta());
registryMCreco.fill(HIST("MCrecoPposPt"), mcpart.pt());
}
} else if (part.sign() < 0) {
registryMCreco.fill(HIST("MCrecoAllNegativePt"), mcpart.pt());
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))) {

Check failure on line 792 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registryMCreco.fill(HIST("MCrecoPneg"), mcpart.pt(), mcpart.eta());
registryMCreco.fill(HIST("MCrecoPnegPt"), mcpart.pt());
}
Expand Down
Loading