From 738e9425dd4e01d6cb1f65c5622646692b41dc64 Mon Sep 17 00:00:00 2001 From: Zuzanna Chochulska <01150674@pw.edu.pl> Date: Wed, 22 Jul 2026 12:19:18 +0200 Subject: [PATCH 1/7] FemtoUniverse - Track-Phi - new PID for Phi --- .../Tasks/femtoUniversePairTaskTrackPhi.cxx | 89 +++++++++++++------ 1 file changed, 61 insertions(+), 28 deletions(-) diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx index 5fc9dd9c59a..fb492a54df9 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx @@ -119,6 +119,7 @@ struct FemtoUniversePairTaskTrackPhi { Configurable ConfTrackPtPIDLimit{"ConfTrackPtPIDLimit", 0.5, "Momentum threshold for change of the PID method (from using TPC to TPC and TOF)."}; Configurable ConfTrackPtLow{"ConfTrackPtLow", 0.5, "Lower limit of the hadron pT."}; Configurable ConfTrackPtHigh{"ConfTrackPtHigh", 2.5, "Higher limit of the hadron pT."}; + Configurable ConfTrackUseRun3PIDforKaons{"ConfTrackUseRun3PIDforKaons", true, "Use Run3 PID for kaons from Veronika Barbasova's AN (https://alice-notes.web.cern.ch/node/1758). If this is on the other PID methods are ignored for kaons."}; /// Partitions for the track (particle 1) Partition partsTrack = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && @@ -247,42 +248,72 @@ struct FemtoUniversePairTaskTrackPhi { } } - bool isKaonNSigma(float mom, float nsigmaTPCK, float nsigmaTOFK) + bool isKaonNSigma(float mom, bool hasTOF, float nsigmaTPCK, float nsigmaTOFK) { - if (mom < 0.3) { // 0.0-0.3 - if (std::abs(nsigmaTPCK) < 3.0) { - return true; - } else { - return false; - } - } else if (mom < 0.45) { // 0.30 - 0.45 - if (std::abs(nsigmaTPCK) < 2.0) { - return true; - } else { - return false; + if (ConfTrackUseRun3PIDforKaons) { + if (mom < 0.5) { + if (std::abs(nsigmaTPCK) < 3.0) { + return true; + } else { + return false; + } + } else if (mom >= 0.5) { + if (hasTOF) // if TOF is available, use combine nsigma + { + if (std::hypot(nsigmaTOFK, nsigmaTPCK) < 3.0) { + return true; + } else { + return false; + } + } else // if TOF is not available, use TPC nsigma only + { + if (std::abs(nsigmaTPCK) < 3.0) { + return true; + } else { + return false; + } + } } - } else if (mom < 0.55) { // 0.45-0.55 - if (std::abs(nsigmaTPCK) < 1.0) { - return true; - } else { + + else { return false; } - } else if (mom < 1.5) { // 0.55-1.5 (now we use TPC and TOF) - if ((std::abs(nsigmaTOFK) < 3.0) && (std::abs(nsigmaTPCK) < 3.0)) { - { + } else { + if (mom < 0.3) { // 0.0-0.3 + if (std::abs(nsigmaTPCK) < 3.0) { return true; + } else { + return false; + } + } else if (mom < 0.45) { // 0.30 - 0.45 + if (std::abs(nsigmaTPCK) < 2.0) { + return true; + } else { + return false; + } + } else if (mom < 0.55) { // 0.45-0.55 + if (std::abs(nsigmaTPCK) < 1.0) { + return true; + } else { + return false; + } + } else if (mom < 1.5) { // 0.55-1.5 (now we use TPC and TOF) + if ((std::abs(nsigmaTOFK) < 3.0) && (std::abs(nsigmaTPCK) < 3.0)) { + { + return true; + } + } else { + return false; + } + } else if (mom > 1.5) { // 1.5 - + if ((std::abs(nsigmaTOFK) < 2.0) && (std::abs(nsigmaTPCK) < 3.0)) { + return true; + } else { + return false; } } else { return false; } - } else if (mom > 1.5) { // 1.5 - - if ((std::abs(nsigmaTOFK) < 2.0) && (std::abs(nsigmaTPCK) < 3.0)) { - return true; - } else { - return false; - } - } else { - return false; } } @@ -352,6 +383,8 @@ struct FemtoUniversePairTaskTrackPhi { bool isParticleNSigmaAccepted(float mom, float nsigmaTPCPr, float nsigmaTOFPr, float nsigmaTPCPi, float nsigmaTOFPi, float nsigmaTPCK, float nsigmaTOFK) { + bool hasTOF = std::isfinite(nsigmaTOFPr) || std::isfinite(nsigmaTOFPi) || std::isfinite(nsigmaTOFK); + switch (ConfTrackPDGCode) { case 2212: // Proton case -2212: // anty Proton @@ -363,7 +396,7 @@ struct FemtoUniversePairTaskTrackPhi { break; case 321: // Kaon+ case -321: // Kaon- - return isKaonNSigma(mom, nsigmaTPCK, nsigmaTOFK); + return isKaonNSigma(mom, hasTOF, nsigmaTPCK, nsigmaTOFK); break; default: return false; From 7a40200e90ec5f102fcaaf357eb9518f4ba05c7d Mon Sep 17 00:00:00 2001 From: Zuzanna Chochulska <01150674@pw.edu.pl> Date: Fri, 24 Jul 2026 23:12:14 +0200 Subject: [PATCH 2/7] Corrections for the PR part 1 --- .../Tasks/femtoUniversePairTaskTrackPhi.cxx | 120 ++++-------------- 1 file changed, 22 insertions(+), 98 deletions(-) diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx index fb492a54df9..7138f6d9af2 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx @@ -61,8 +61,8 @@ namespace { // static constexpr int NPart = 2; // static constexpr int NCuts = 5; -static const std::vector partNames{"PhiCandidate", "Track"}; -static const std::vector cutNames{"MaxPt", "PIDthr", "nSigmaTPC", "nSigmaTPCTOF", "MaxP"}; +const std::vector partNames{"PhiCandidate", "Track"}; +const std::vector cutNames{"MaxPt", "PIDthr", "nSigmaTPC", "nSigmaTPCTOF", "MaxP"}; // static const float cutsTable[NPart][NCuts]{ //unused variable // {4.05f, 1.f, 3.f, 3.f, 100.f}, // {4.05f, 1.f, 3.f, 3.f, 100.f}}; @@ -70,7 +70,7 @@ static const std::vector cutNames{"MaxPt", "PIDthr", "nSigmaTPC", " struct FemtoUniversePairTaskTrackPhi { - Service pdgMC; + Service pdgMC = {}; using FilteredFemtoFullParticles = soa::Join; @@ -215,17 +215,9 @@ struct FemtoUniversePairTaskTrackPhi { bool isProtonNSigma(float mom, float nsigmaTPCPr, float nsigmaTOFPr) // previous version from: https://github.com/alisw/AliPhysics/blob/master/PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoMJTrackCut.cxx { if (mom < ConfTrackPtPIDLimit) { - if (std::abs(nsigmaTPCPr) < ConfPIDProtonNsigmaTPC) { - return true; - } else { - return false; - } + return std::abs(nsigmaTPCPr) < ConfPIDProtonNsigmaTPC; } else if (mom > ConfTrackPtPIDLimit) { - if (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < ConfPIDProtonNsigmaCombined) { - return true; - } else { - return false; - } + return std::hypot(nsigmaTOFPr, nsigmaTPCPr) < ConfPIDProtonNsigmaCombined; } return false; } @@ -236,13 +228,7 @@ struct FemtoUniversePairTaskTrackPhi { return true; } if (mom > 0.5) { - if (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < ConfPIDPionNsigmaReject) { - return true; - } else if (std::hypot(nsigmaTOFK, nsigmaTPCK) < ConfPIDKaonNsigmaReject) { - return true; - } else { - return false; - } + return std::hypot(nsigmaTOFPi, nsigmaTPCPi) < ConfPIDPionNsigmaReject || std::hypot(nsigmaTOFK, nsigmaTPCK) < ConfPIDKaonNsigmaReject; } else { return false; } @@ -252,26 +238,14 @@ struct FemtoUniversePairTaskTrackPhi { { if (ConfTrackUseRun3PIDforKaons) { if (mom < 0.5) { - if (std::abs(nsigmaTPCK) < 3.0) { - return true; - } else { - return false; - } + return std::abs(nsigmaTPCK) < 3.0; } else if (mom >= 0.5) { if (hasTOF) // if TOF is available, use combine nsigma { - if (std::hypot(nsigmaTOFK, nsigmaTPCK) < 3.0) { - return true; - } else { - return false; - } + return std::hypot(nsigmaTOFK, nsigmaTPCK) < 3.0; } else // if TOF is not available, use TPC nsigma only { - if (std::abs(nsigmaTPCK) < 3.0) { - return true; - } else { - return false; - } + return std::abs(nsigmaTPCK) < 3.0; } } @@ -280,37 +254,15 @@ struct FemtoUniversePairTaskTrackPhi { } } else { if (mom < 0.3) { // 0.0-0.3 - if (std::abs(nsigmaTPCK) < 3.0) { - return true; - } else { - return false; - } + return std::abs(nsigmaTPCK) < 3.0; } else if (mom < 0.45) { // 0.30 - 0.45 - if (std::abs(nsigmaTPCK) < 2.0) { - return true; - } else { - return false; - } + return std::abs(nsigmaTPCK) < 2.0; } else if (mom < 0.55) { // 0.45-0.55 - if (std::abs(nsigmaTPCK) < 1.0) { - return true; - } else { - return false; - } + return std::abs(nsigmaTPCK) < 1.0; } else if (mom < 1.5) { // 0.55-1.5 (now we use TPC and TOF) - if ((std::abs(nsigmaTOFK) < 3.0) && (std::abs(nsigmaTPCK) < 3.0)) { - { - return true; - } - } else { - return false; - } + return std::hypot(nsigmaTOFK, nsigmaTPCK) < 3.0; } else if (mom > 1.5) { // 1.5 - - if ((std::abs(nsigmaTOFK) < 2.0) && (std::abs(nsigmaTPCK) < 3.0)) { - return true; - } else { - return false; - } + return (std::abs(nsigmaTOFK) < 2.0) && (std::abs(nsigmaTPCK) < 3.0); } else { return false; } @@ -320,20 +272,10 @@ struct FemtoUniversePairTaskTrackPhi { bool isKaonRejected(float mom, float nsigmaTPCPr, float nsigmaTOFPr, float nsigmaTPCPi, float nsigmaTOFPi) { if (mom < 0.5) { - if (std::abs(nsigmaTPCPi) < ConfPIDPionNsigmaReject) { - return true; - } else if (std::abs(nsigmaTPCPr) < ConfPIDProtonNsigmaReject) { - return true; - } + return (std::abs(nsigmaTPCPi) < ConfPIDPionNsigmaReject) || (std::abs(nsigmaTPCPr) < ConfPIDProtonNsigmaReject); } if (mom > 0.5) { - if (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < ConfPIDPionNsigmaReject) { - return true; - } else if (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < ConfPIDProtonNsigmaReject) { - return true; - } else { - return false; - } + return (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < ConfPIDPionNsigmaReject) || (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < ConfPIDProtonNsigmaReject); } else { return false; } @@ -343,17 +285,9 @@ struct FemtoUniversePairTaskTrackPhi { { if (true) { if (mom < 0.5) { - if (std::abs(nsigmaTPCPi) < ConfPIDPionNsigmaTPC) { - return true; - } else { - return false; - } + return (std::abs(nsigmaTPCPi) < ConfPIDPionNsigmaTPC); } else if (mom > 0.5) { - if (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < ConfPIDPionNsigmaCombined) { - return true; - } else { - return false; - } + return (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < ConfPIDPionNsigmaCombined); } } return false; @@ -362,20 +296,10 @@ struct FemtoUniversePairTaskTrackPhi { bool isPionRejected(float mom, float nsigmaTPCPr, float nsigmaTOFPr, float nsigmaTPCK, float nsigmaTOFK) { if (mom < 0.5) { - if (std::abs(nsigmaTPCK) < ConfPIDKaonNsigmaReject) { - return true; - } else if (std::abs(nsigmaTPCPr) < ConfPIDProtonNsigmaReject) { - return true; - } + return (std::abs(nsigmaTPCK) < ConfPIDKaonNsigmaReject) || (std::abs(nsigmaTPCPr) < ConfPIDProtonNsigmaReject); } if (mom > 0.5) { - if (std::hypot(nsigmaTOFK, nsigmaTPCK) < ConfPIDKaonNsigmaReject) { - return true; - } else if (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < ConfPIDProtonNsigmaReject) { - return true; - } else { - return false; - } + return (std::hypot(nsigmaTOFK, nsigmaTPCK) < ConfPIDKaonNsigmaReject) || (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < ConfPIDProtonNsigmaReject); } else { return false; } @@ -532,7 +456,7 @@ struct FemtoUniversePairTaskTrackPhi { } template - void doSameEvent(PartitionType groupPartsTrack, PartitionType groupPartsPhi, PartType parts, float magFieldTesla, int multCol, [[maybe_unused]] MCParticles mcParts = nullptr) + void doSameEvent(const PartitionType& groupPartsTrack, const PartitionType& groupPartsPhi, const PartType& parts, float magFieldTesla, int multCol, [[maybe_unused]] MCParticles mcParts = nullptr) { for (auto const& phicandidate : groupPartsPhi) { // TODO: add phi meson minv cut here @@ -660,7 +584,7 @@ struct FemtoUniversePairTaskTrackPhi { } template - void doMixedEvent(PartitionType groupPartsTrack, PartitionType groupPartsPhi, PartType parts, float magFieldTesla, int multCol, [[maybe_unused]] MCParticles mcParts = nullptr) + void doMixedEvent(const PartitionType& groupPartsTrack, const PartitionType& groupPartsPhi, const PartType& parts, float magFieldTesla, int multCol, [[maybe_unused]] MCParticles mcParts = nullptr) { for (auto const& [track, phicandidate] : combinations(CombinationsFullIndexPolicy(groupPartsTrack, groupPartsPhi))) { if (ConfTrackIsIdentified) { From 0ce7e94d454987447f89a556ff5b952234248ec3 Mon Sep 17 00:00:00 2001 From: Zuzanna Chochulska <01150674@pw.edu.pl> Date: Sat, 25 Jul 2026 00:59:38 +0200 Subject: [PATCH 3/7] Corrections for the PR part 2 --- .../Tasks/femtoUniversePairTaskTrackPhi.cxx | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx index 7138f6d9af2..856ffa27b13 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx @@ -25,7 +25,9 @@ #include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h" #include "PWGCF/FemtoUniverse/DataModel/FemtoDerived.h" +#include "TPDGCode.h" #include +#include "CommonConstants/PhysicsConstants.h" #include #include #include @@ -483,7 +485,7 @@ struct FemtoUniversePairTaskTrackPhi { trackHistoPartPhi.fillQA(phicandidate); if constexpr (isMC) { // reco - effCorrection.fillRecoHist(phicandidate, 333); + effCorrection.fillRecoHist(phicandidate, o2::constants::physics::Pdg::kPhi ); } } @@ -691,18 +693,18 @@ struct FemtoUniversePairTaskTrackPhi { // charge + if (pdgParticle->Charge() > 0.0) { registryMCtruth.fill(HIST("MCtruthAllPositivePt"), part.pt()); - if (pdgCode == 2212) { + if (pdgCode == kProton) { registryMCtruth.fill(HIST("MCtruthPpos"), part.pt(), part.eta()); registryMCtruth.fill(HIST("MCtruthPposPt"), part.pt()); continue; - } else if (pdgCode == 321) { + } else if (pdgCode == kKPlus) { registryMCtruth.fill(HIST("MCtruthKp"), part.pt(), part.eta()); registryMCtruth.fill(HIST("MCtruthKpPt"), part.pt()); continue; } } // charge 0 - if (pdgCode == 333) { + if (pdgCode == o2::constants::physics::Pdg::kPhi) { registryMCtruth.fill(HIST("MCtruthPhi"), part.pt(), part.eta()); registryMCtruth.fill(HIST("MCtruthPhiPt"), part.pt()); effCorrection.fillTruthHist(part); @@ -713,11 +715,11 @@ struct FemtoUniversePairTaskTrackPhi { if (pdgParticle->Charge() < 0.0) { registryMCtruth.fill(HIST("MCtruthAllNegativePt"), part.pt()); - if (pdgCode == -321) { + if (pdgCode == kKMinus) { registryMCtruth.fill(HIST("MCtruthKm"), part.pt(), part.eta()); registryMCtruth.fill(HIST("MCtruthKmPt"), part.pt()); continue; - } else if (pdgCode == -2212) { + } else if (pdgCode == kProtonBar) { registryMCtruth.fill(HIST("MCtruthPneg"), part.pt(), part.eta()); registryMCtruth.fill(HIST("MCtruthPnegPt"), part.pt()); continue; @@ -740,7 +742,7 @@ struct FemtoUniversePairTaskTrackPhi { float weightTrack = effCorrection.getWeight(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)) { + if ((mcpart.pdgMCTruth() == o2::constants::physics::Pdg::kPhi) && (part.partType() == aod::femtouniverseparticle::ParticleType::kPhi) && (part.pt() > ConfPhiPtLow) && (part.pt() < ConfPhiPtHigh)) { registryMCpT.fill(HIST("MCReco/NC_phi_pT"), part.pt()); float weightPhi = effCorrection.getWeight(ParticleNo::ONE, part); registryMCpT.fill(HIST("MCReco/C_phi_pT"), part.pt(), weightPhi); @@ -748,19 +750,19 @@ struct FemtoUniversePairTaskTrackPhi { 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(part); - if ((part.partType() == aod::femtouniverseparticle::ParticleType::kPhi) && (mcpart.pdgMCTruth() == 333) && (mcpart.partOriginMCTruth() == aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary)) { + if ((part.partType() == aod::femtouniverseparticle::ParticleType::kPhi) && (mcpart.pdgMCTruth() == o2::constants::physics::Pdg::kPhi) && (mcpart.partOriginMCTruth() == aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary)) { 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))) { + 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))) { 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))) { + 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))) { registryMCreco.fill(HIST("MCrecoPneg"), mcpart.pt(), mcpart.eta()); registryMCreco.fill(HIST("MCrecoPnegPt"), mcpart.pt()); } From 548e0f4e8d2a67bbe89b0f5dce01e58f2e39b1b9 Mon Sep 17 00:00:00 2001 From: Zuzanna Chochulska <01150674@pw.edu.pl> Date: Sat, 25 Jul 2026 01:02:10 +0200 Subject: [PATCH 4/7] Corrections for the PR part 3 --- .../Tasks/femtoUniversePairTaskTrackPhi.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx index 856ffa27b13..0673331f832 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx @@ -25,9 +25,8 @@ #include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h" #include "PWGCF/FemtoUniverse/DataModel/FemtoDerived.h" -#include "TPDGCode.h" -#include #include "CommonConstants/PhysicsConstants.h" +#include #include #include #include @@ -45,6 +44,8 @@ #include #include +#include "TPDGCode.h" + #include #include #include @@ -485,7 +486,7 @@ struct FemtoUniversePairTaskTrackPhi { trackHistoPartPhi.fillQA(phicandidate); if constexpr (isMC) { // reco - effCorrection.fillRecoHist(phicandidate, o2::constants::physics::Pdg::kPhi ); + effCorrection.fillRecoHist(phicandidate, o2::constants::physics::Pdg::kPhi); } } @@ -704,7 +705,7 @@ struct FemtoUniversePairTaskTrackPhi { } } // charge 0 - if (pdgCode == o2::constants::physics::Pdg::kPhi) { + if (pdgCode == o2::constants::physics::Pdg::kPhi) { registryMCtruth.fill(HIST("MCtruthPhi"), part.pt(), part.eta()); registryMCtruth.fill(HIST("MCtruthPhiPt"), part.pt()); effCorrection.fillTruthHist(part); From de6f624675fb63a5543941f95b433eb66515227e Mon Sep 17 00:00:00 2001 From: Zuzanna Chochulska <01150674@pw.edu.pl> Date: Sat, 25 Jul 2026 01:11:26 +0200 Subject: [PATCH 5/7] Corrections for the PR part 4 --- PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx index 0673331f832..41ce93718cc 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx @@ -25,8 +25,8 @@ #include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h" #include "PWGCF/FemtoUniverse/DataModel/FemtoDerived.h" -#include "CommonConstants/PhysicsConstants.h" #include +#include #include #include #include @@ -44,7 +44,7 @@ #include #include -#include "TPDGCode.h" +#include #include #include From 48bdee65febc5f66efb25080bec0c89ee02bc3cd Mon Sep 17 00:00:00 2001 From: Zuzanna Chochulska <01150674@pw.edu.pl> Date: Sat, 25 Jul 2026 12:03:21 +0200 Subject: [PATCH 6/7] Corrections for the PR part 5 --- .../Tasks/femtoUniversePairTaskTrackPhi.cxx | 62 ++++++++++--------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx index 41ce93718cc..9a276443def 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx @@ -219,7 +219,8 @@ struct FemtoUniversePairTaskTrackPhi { { if (mom < ConfTrackPtPIDLimit) { return std::abs(nsigmaTPCPr) < ConfPIDProtonNsigmaTPC; - } else if (mom > ConfTrackPtPIDLimit) { + } + if (mom > ConfTrackPtPIDLimit) { return std::hypot(nsigmaTOFPr, nsigmaTPCPr) < ConfPIDProtonNsigmaCombined; } return false; @@ -230,11 +231,11 @@ struct FemtoUniversePairTaskTrackPhi { if (mom < 0.5) { return true; } - if (mom > 0.5) { + if (mom >= 0.5) { return std::hypot(nsigmaTOFPi, nsigmaTPCPi) < ConfPIDPionNsigmaReject || std::hypot(nsigmaTOFK, nsigmaTPCK) < ConfPIDKaonNsigmaReject; - } else { - return false; } + // this will never be reached but is needed to avoid compiler warnings + return false; } bool isKaonNSigma(float mom, bool hasTOF, float nsigmaTPCK, float nsigmaTOFK) @@ -242,33 +243,34 @@ struct FemtoUniversePairTaskTrackPhi { if (ConfTrackUseRun3PIDforKaons) { if (mom < 0.5) { return std::abs(nsigmaTPCK) < 3.0; - } else if (mom >= 0.5) { - if (hasTOF) // if TOF is available, use combine nsigma - { + } + if (mom >= 0.5) { + if (hasTOF) { // if TOF is available, use combine nsigma return std::hypot(nsigmaTOFK, nsigmaTPCK) < 3.0; - } else // if TOF is not available, use TPC nsigma only + } + if (!hasTOF) // if TOF is not available, use TPC nsigma only { return std::abs(nsigmaTPCK) < 3.0; } } - - else { - return false; - } + return false; } else { if (mom < 0.3) { // 0.0-0.3 return std::abs(nsigmaTPCK) < 3.0; - } else if (mom < 0.45) { // 0.30 - 0.45 + } + if (mom < 0.45) { // 0.30 - 0.45 return std::abs(nsigmaTPCK) < 2.0; - } else if (mom < 0.55) { // 0.45-0.55 + } + if (mom < 0.55) { // 0.45-0.55 return std::abs(nsigmaTPCK) < 1.0; - } else if (mom < 1.5) { // 0.55-1.5 (now we use TPC and TOF) + } + if (mom < 1.5) { // 0.55-1.5 (now we use TPC and TOF) return std::hypot(nsigmaTOFK, nsigmaTPCK) < 3.0; - } else if (mom > 1.5) { // 1.5 - + } + if (mom > 1.5) { // 1.5 - return (std::abs(nsigmaTOFK) < 2.0) && (std::abs(nsigmaTPCK) < 3.0); - } else { - return false; } + return false; } } @@ -277,21 +279,19 @@ struct FemtoUniversePairTaskTrackPhi { if (mom < 0.5) { return (std::abs(nsigmaTPCPi) < ConfPIDPionNsigmaReject) || (std::abs(nsigmaTPCPr) < ConfPIDProtonNsigmaReject); } - if (mom > 0.5) { + if (mom >= 0.5) { return (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < ConfPIDPionNsigmaReject) || (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < ConfPIDProtonNsigmaReject); - } else { - return false; } + return false; } bool isPionNSigma(float mom, float nsigmaTPCPi, float nsigmaTOFPi) { - if (true) { - if (mom < 0.5) { - return (std::abs(nsigmaTPCPi) < ConfPIDPionNsigmaTPC); - } else if (mom > 0.5) { - return (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < ConfPIDPionNsigmaCombined); - } + if (mom < 0.5) { + return (std::abs(nsigmaTPCPi) < ConfPIDPionNsigmaTPC); + } + if (mom >= 0.5) { + return (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < ConfPIDPionNsigmaCombined); } return false; } @@ -301,7 +301,7 @@ struct FemtoUniversePairTaskTrackPhi { if (mom < 0.5) { return (std::abs(nsigmaTPCK) < ConfPIDKaonNsigmaReject) || (std::abs(nsigmaTPCPr) < ConfPIDProtonNsigmaReject); } - if (mom > 0.5) { + if (mom >= 0.5) { return (std::hypot(nsigmaTOFK, nsigmaTPCK) < ConfPIDKaonNsigmaReject) || (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < ConfPIDProtonNsigmaReject); } else { return false; @@ -698,7 +698,8 @@ struct FemtoUniversePairTaskTrackPhi { registryMCtruth.fill(HIST("MCtruthPpos"), part.pt(), part.eta()); registryMCtruth.fill(HIST("MCtruthPposPt"), part.pt()); continue; - } else if (pdgCode == kKPlus) { + } + if (pdgCode == kKPlus) { registryMCtruth.fill(HIST("MCtruthKp"), part.pt(), part.eta()); registryMCtruth.fill(HIST("MCtruthKpPt"), part.pt()); continue; @@ -720,7 +721,8 @@ struct FemtoUniversePairTaskTrackPhi { registryMCtruth.fill(HIST("MCtruthKm"), part.pt(), part.eta()); registryMCtruth.fill(HIST("MCtruthKmPt"), part.pt()); continue; - } else if (pdgCode == kProtonBar) { + } + if (pdgCode == kProtonBar) { registryMCtruth.fill(HIST("MCtruthPneg"), part.pt(), part.eta()); registryMCtruth.fill(HIST("MCtruthPnegPt"), part.pt()); continue; From f1a5ca6186b3b628bebccb935b8764a3ca8388ee Mon Sep 17 00:00:00 2001 From: Zuzanna Chochulska <01150674@pw.edu.pl> Date: Sat, 25 Jul 2026 12:43:14 +0200 Subject: [PATCH 7/7] Corrections for the PR part 6 --- .../Tasks/femtoUniversePairTaskTrackPhi.cxx | 188 +++++++++--------- 1 file changed, 94 insertions(+), 94 deletions(-) diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx index 9a276443def..f85ec7dba8e 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx @@ -83,74 +83,74 @@ struct FemtoUniversePairTaskTrackPhi { using FemtoRecoParticles = soa::Join; Preslice perColMC = aod::femtouniverseparticle::fdCollisionId; - Configurable ConfZVertexCut{"ConfZVertexCut", 10.f, "Event sel: Maximum z-Vertex (cm)"}; - Configurable ConfNEventsMix{"ConfNEventsMix", 5, "Number of events for mixing"}; - Filter collisionFilter = (nabs(aod::collision::posZ) < ConfZVertexCut); + Configurable confZVertexCut{"confZVertexCut", 10.f, "Event sel: Maximum z-Vertex (cm)"}; + // Configurable confNEventsMix{"confNEventsMix", 5, "Number of events for mixing"}; + Filter collisionFilter = (nabs(aod::collision::posZ) < confZVertexCut); using FilteredFDCollisions = soa::Filtered; using FilteredFDCollision = FilteredFDCollisions::iterator; - Configurable ConfCPRIsEnabled{"ConfCPRIsEnabled", false, "Close Pair Rejection"}; - Configurable ConfCPRPlotPerRadii{"ConfCPRPlotPerRadii", false, "Plot CPR per radii"}; - Configurable ConfCPRdeltaPhiCutMax{"ConfCPRdeltaPhiCutMax", 0.0, "Delta Phi max cut for Close Pair Rejection"}; - Configurable ConfCPRdeltaPhiCutMin{"ConfCPRdeltaPhiCutMin", 0.0, "Delta Phi min cut for Close Pair Rejection"}; - Configurable ConfCPRdeltaEtaCutMax{"ConfCPRdeltaEtaCutMax", 0.0, "Delta Eta max cut for Close Pair Rejection"}; - Configurable ConfCPRdeltaEtaCutMin{"ConfCPRdeltaEtaCutMin", 0.0, "Delta Eta min cut for Close Pair Rejection"}; - Configurable ConfCPRInvMassCutMin{"ConfCPRInvMassCutMin", 1.014, "Invariant mass (low) cut for Close Pair Rejection"}; - Configurable ConfCPRInvMassCutMax{"ConfCPRInvMassCutMax", 1.026, "Invariant mass (high) cut for Close Pair Rejection"}; - Configurable ConfCPRChosenRadii{"ConfCPRChosenRadii", 0.80, "Delta Eta cut for Close Pair Rejection"}; + Configurable confCPRIsEnabled{"confCPRIsEnabled", false, "Close Pair Rejection"}; + Configurable confCPRPlotPerRadii{"confCPRPlotPerRadii", false, "Plot CPR per radii"}; + Configurable confCPRdeltaPhiCutMax{"confCPRdeltaPhiCutMax", 0.0, "Delta Phi max cut for Close Pair Rejection"}; + Configurable confCPRdeltaPhiCutMin{"confCPRdeltaPhiCutMin", 0.0, "Delta Phi min cut for Close Pair Rejection"}; + Configurable confCPRdeltaEtaCutMax{"confCPRdeltaEtaCutMax", 0.0, "Delta Eta max cut for Close Pair Rejection"}; + Configurable confCPRdeltaEtaCutMin{"confCPRdeltaEtaCutMin", 0.0, "Delta Eta min cut for Close Pair Rejection"}; + Configurable confCPRInvMassCutMin{"confCPRInvMassCutMin", 1.014, "Invariant mass (low) cut for Close Pair Rejection"}; + Configurable confCPRInvMassCutMax{"confCPRInvMassCutMax", 1.026, "Invariant mass (high) cut for Close Pair Rejection"}; + Configurable confCPRChosenRadii{"confCPRChosenRadii", 0.80, "Delta Eta cut for Close Pair Rejection"}; ConfigurableAxis confDeltaEtaAxis{"confDeltaEtaAxis", {100, -0.15, 0.15}, "DeltaEta"}; ConfigurableAxis confDeltaPhiStarAxis{"confDeltaPhiStarAxis", {100, -0.15, 0.15}, "DeltaPhiStar"}; /// Table for both particles - Configurable ConfPIDProtonNsigmaCombined{"ConfPIDProtonNsigmaCombined", 3.0, "TPC and TOF Proton Sigma (combined) for momentum > 0.5"}; - Configurable ConfPIDProtonNsigmaTPC{"ConfPIDProtonNsigmaTPC", 3.0, "TPC Proton Sigma for momentum < 0.5"}; - Configurable ConfPIDKaonNsigmaReject{"ConfPIDKaonNsigmaReject", 3.0, "Reject if particle could be a Kaon combined nsigma value."}; - Configurable ConfPIDPionNsigmaReject{"ConfPIDPionNsigmaReject", 3.0, "Reject if particle could be a Pion combined nsigma value."}; - Configurable ConfPIDProtonNsigmaReject{"ConfPIDProtonNsigmaReject", 3.0, "Reject if particle could be a Proton combined nsigma value."}; - Configurable ConfPIDPionNsigmaCombined{"ConfPIDPionNsigmaCombined", 3.0, "TPC and TOF Pion Sigma (combined) for momentum > 0.5"}; - Configurable ConfPIDPionNsigmaTPC{"ConfPIDPionNsigmaTPC", 3.0, "TPC Pion Sigma for momentum < 0.5"}; - Configurable ConfIsMC{"ConfIsMC", false, "Enable additional Histograms in the case of a MonteCarlo Run"}; - Configurable ConfUse3D{"ConfUse3D", false, "Enable three dimensional histogramms (to be used only for analysis with high statistics): k* vs mT vs multiplicity"}; - Configurable ConfBinsPhi{"ConfBinsPhi", 29, "Number of phi bins in deta dphi"}; - Configurable ConfBinsEta{"ConfBinsEta", 29, "Number of eta bins in deta dphi"}; + Configurable confPIDProtonNsigmaCombined{"confPIDProtonNsigmaCombined", 3.0, "TPC and TOF Proton Sigma (combined) for momentum > 0.5"}; + Configurable confPIDProtonNsigmaTPC{"confPIDProtonNsigmaTPC", 3.0, "TPC Proton Sigma for momentum < 0.5"}; + Configurable confPIDKaonNsigmaReject{"confPIDKaonNsigmaReject", 3.0, "Reject if particle could be a Kaon combined nsigma value."}; + Configurable confPIDPionNsigmaReject{"confPIDPionNsigmaReject", 3.0, "Reject if particle could be a Pion combined nsigma value."}; + Configurable confPIDProtonNsigmaReject{"confPIDProtonNsigmaReject", 3.0, "Reject if particle could be a Proton combined nsigma value."}; + Configurable confPIDPionNsigmaCombined{"confPIDPionNsigmaCombined", 3.0, "TPC and TOF Pion Sigma (combined) for momentum > 0.5"}; + Configurable confPIDPionNsigmaTPC{"confPIDPionNsigmaTPC", 3.0, "TPC Pion Sigma for momentum < 0.5"}; + Configurable confIsMC{"confIsMC", false, "Enable additional Histograms in the case of a MonteCarlo Run"}; + Configurable confUse3D{"confUse3D", false, "Enable three dimensional histogramms (to be used only for analysis with high statistics): k* vs mT vs multiplicity"}; + Configurable confBinsPhi{"confBinsPhi", 29, "Number of phi bins in deta dphi"}; + Configurable confBinsEta{"confBinsEta", 29, "Number of eta bins in deta dphi"}; /// Particle 1 --- IDENTIFIED TRACK - Configurable ConfTrackPDGCode{"ConfTrackPDGCode", 2212, "Particle 2 - PDG code"}; - Configurable ConfTrackSign{"ConfTrackSign", 1, "Track sign"}; - Configurable ConfTrackIsIdentified{"ConfTrackIsIdentified", true, "Enable PID for the track"}; - Configurable ConfTrackIsRejected{"ConfTrackIsRejected", true, "Enable PID rejection for the track other species than the identified one."}; - Configurable ConfTrackPtPIDLimit{"ConfTrackPtPIDLimit", 0.5, "Momentum threshold for change of the PID method (from using TPC to TPC and TOF)."}; - Configurable ConfTrackPtLow{"ConfTrackPtLow", 0.5, "Lower limit of the hadron pT."}; - Configurable ConfTrackPtHigh{"ConfTrackPtHigh", 2.5, "Higher limit of the hadron pT."}; - Configurable ConfTrackUseRun3PIDforKaons{"ConfTrackUseRun3PIDforKaons", true, "Use Run3 PID for kaons from Veronika Barbasova's AN (https://alice-notes.web.cern.ch/node/1758). If this is on the other PID methods are ignored for kaons."}; + Configurable confTrackPDGCode{"confTrackPDGCode", 2212, "Particle 2 - PDG code"}; + Configurable confTrackSign{"confTrackSign", 1, "Track sign"}; + Configurable confTrackIsIdentified{"confTrackIsIdentified", true, "Enable PID for the track"}; + Configurable confTrackIsRejected{"confTrackIsRejected", true, "Enable PID rejection for the track other species than the identified one."}; + Configurable confTrackPtPIDLimit{"confTrackPtPIDLimit", 0.5, "Momentum threshold for change of the PID method (from using TPC to TPC and TOF)."}; + Configurable confTrackPtLow{"confTrackPtLow", 0.5, "Lower limit of the hadron pT."}; + Configurable confTrackPtHigh{"confTrackPtHigh", 2.5, "Higher limit of the hadron pT."}; + Configurable confTrackUseRun3PIDforKaons{"confTrackUseRun3PIDforKaons", true, "Use Run3 PID for kaons from Veronika Barbasova's AN (https://alice-notes.web.cern.ch/node/1758). If this is on the other PID methods are ignored for kaons."}; /// Partitions for the track (particle 1) Partition partsTrack = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && - (aod::femtouniverseparticle::sign == ConfTrackSign) && - (aod::femtouniverseparticle::pt > ConfTrackPtLow) && - (aod::femtouniverseparticle::pt < ConfTrackPtHigh); + (aod::femtouniverseparticle::sign == confTrackSign) && + (aod::femtouniverseparticle::pt > confTrackPtLow) && + (aod::femtouniverseparticle::pt < confTrackPtHigh); Partition partsTrackMCReco = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && - (aod::femtouniverseparticle::sign == ConfTrackSign) && - (aod::femtouniverseparticle::pt > ConfTrackPtLow) && - (aod::femtouniverseparticle::pt < ConfTrackPtHigh); + (aod::femtouniverseparticle::sign == confTrackSign) && + (aod::femtouniverseparticle::pt > confTrackPtLow) && + (aod::femtouniverseparticle::pt < confTrackPtHigh); /// Particle 2 --- PHI MESON - Configurable ConfPhiPtLow{"ConfPhiPtLow", 0.8, "Lower limit of the Phi pT."}; - Configurable ConfPhiPtHigh{"ConfPhiPtHigh", 4.0, "Higher limit of the Phi pT."}; + Configurable confPhiPtLow{"confPhiPtLow", 0.8, "Lower limit of the Phi pT."}; + Configurable confPhiPtHigh{"confPhiPtHigh", 4.0, "Higher limit of the Phi pT."}; Configurable confInvMassLowLimitPhi{"confInvMassLowLimitPhi", 1.011, "Lower limit of the Phi invariant mass"}; // change that to do invariant mass cut Configurable confInvMassUpLimitPhi{"confInvMassUpLimitPhi", 1.027, "Upper limit of the Phi invariant mass"}; /// Partitions for the Phi meson (particle 2) Partition partsPhi = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kPhi)) && - (aod::femtouniverseparticle::pt > ConfPhiPtLow) && - (aod::femtouniverseparticle::pt < ConfPhiPtHigh) && + (aod::femtouniverseparticle::pt > confPhiPtLow) && + (aod::femtouniverseparticle::pt < confPhiPtHigh) && (aod::femtouniverseparticle::tempFitVar > confInvMassLowLimitPhi) && (aod::femtouniverseparticle::tempFitVar < confInvMassUpLimitPhi); Partition partsPhiMCReco = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kPhi)) && - (aod::femtouniverseparticle::pt > ConfPhiPtLow) && - (aod::femtouniverseparticle::pt < ConfPhiPtHigh) && + (aod::femtouniverseparticle::pt > confPhiPtLow) && + (aod::femtouniverseparticle::pt < confPhiPtHigh) && (aod::femtouniverseparticle::tempFitVar > confInvMassLowLimitPhi) && (aod::femtouniverseparticle::tempFitVar < confInvMassUpLimitPhi); @@ -173,17 +173,17 @@ struct FemtoUniversePairTaskTrackPhi { FemtoUniverseEventHisto eventHisto; /// particle part - ConfigurableAxis ConfBinsTempFitVar{"ConfBinsTempFitVar", {300, -0.15, 0.15}, "binning of the TempFitVar in the pT vs. TempFitVar plot"}; - ConfigurableAxis ConfBinsTempFitVarInvMass{"ConfBinsTempFitVarInvMass", {6000, 0.9, 4.0}, "binning of the TempFitVar in the pT vs. TempFitVar plot"}; - ConfigurableAxis ConfBinsTempFitVarpT{"ConfBinsTempFitVarpT", {20, 0.5, 4.05}, "pT binning of the pT vs. TempFitVar plot"}; - ConfigurableAxis ConfBinsTempFitVarPDG{"ConfBinsTempFitVarPDG", {6000, -2300, 2300}, "Binning of the PDG code in the pT vs. TempFitVar plot"}; - ConfigurableAxis ConfBinsTempFitVarDCA{"ConfBinsTempFitVarDCA", {300, -3.0, 3.0}, "binning of the TempFitVar in the pT vs. TempFitVar plot"}; + ConfigurableAxis confBinsTempFitVar{"confBinsTempFitVar", {300, -0.15, 0.15}, "binning of the TempFitVar in the pT vs. TempFitVar plot"}; + ConfigurableAxis confBinsTempFitVarInvMass{"confBinsTempFitVarInvMass", {6000, 0.9, 4.0}, "binning of the TempFitVar in the pT vs. TempFitVar plot"}; + ConfigurableAxis confBinsTempFitVarpT{"confBinsTempFitVarpT", {20, 0.5, 4.05}, "pT binning of the pT vs. TempFitVar plot"}; + ConfigurableAxis confBinsTempFitVarPDG{"confBinsTempFitVarPDG", {6000, -2300, 2300}, "Binning of the PDG code in the pT vs. TempFitVar plot"}; + ConfigurableAxis confBinsTempFitVarDCA{"confBinsTempFitVarDCA", {300, -3.0, 3.0}, "binning of the TempFitVar in the pT vs. TempFitVar plot"}; /// Correlation part - ConfigurableAxis ConfBinsMult{"ConfBinsMult", {VARIABLE_WIDTH, 0.0f, 4.0f, 8.0f, 12.0f, 16.0f, 20.0f, 24.0f, 28.0f, 32.0f, 36.0f, 40.0f, 44.0f, 48.0f, 52.0f, 56.0f, 60.0f, 64.0f, 68.0f, 72.0f, 76.0f, 80.0f, 84.0f, 88.0f, 92.0f, 96.0f, 100.0f, 200.0f, 99999.f}, "Mixing bins - multiplicity"}; // \todo to be obtained from the hash task - ConfigurableAxis ConfBinsVtx{"ConfBinsVtx", {VARIABLE_WIDTH, -10.0f, -8.f, -6.f, -4.f, -2.f, 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, "Mixing bins - z-vertex"}; - ConfigurableAxis ConfBins3DmT{"ConfBins3DmT", {VARIABLE_WIDTH, 1.02f, 1.14f, 1.20f, 1.26f, 1.38f, 1.56f, 1.86f, 4.50f}, "mT Binning for the 3Dimensional plot: k* vs multiplicity vs mT (set <> to true in order to use)"}; - ConfigurableAxis ConfBins3Dmult{"ConfBins3Dmult", {VARIABLE_WIDTH, 0.0f, 20.0f, 30.0f, 40.0f, 99999.0f}, "multiplicity Binning for the 3Dimensional plot: k* vs multiplicity vs mT (set <> to true in order to use)"}; + ConfigurableAxis confBinsMult{"confBinsMult", {VARIABLE_WIDTH, 0.0f, 4.0f, 8.0f, 12.0f, 16.0f, 20.0f, 24.0f, 28.0f, 32.0f, 36.0f, 40.0f, 44.0f, 48.0f, 52.0f, 56.0f, 60.0f, 64.0f, 68.0f, 72.0f, 76.0f, 80.0f, 84.0f, 88.0f, 92.0f, 96.0f, 100.0f, 200.0f, 99999.f}, "Mixing bins - multiplicity"}; // \todo to be obtained from the hash task + ConfigurableAxis confBinsVtx{"confBinsVtx", {VARIABLE_WIDTH, -10.0f, -8.f, -6.f, -4.f, -2.f, 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, "Mixing bins - z-vertex"}; + ConfigurableAxis confBins3DmT{"confBins3DmT", {VARIABLE_WIDTH, 1.02f, 1.14f, 1.20f, 1.26f, 1.38f, 1.56f, 1.86f, 4.50f}, "mT Binning for the 3Dimensional plot: k* vs multiplicity vs mT (set <> to true in order to use)"}; + ConfigurableAxis confBins3Dmult{"confBins3Dmult", {VARIABLE_WIDTH, 0.0f, 20.0f, 30.0f, 40.0f, 99999.0f}, "multiplicity Binning for the 3Dimensional plot: k* vs multiplicity vs mT (set <> to true in order to use)"}; ConfigurableAxis ConfBinskstar{"ConfBinskstar", {1500, 0., 6.}, "binning kstar"}; ConfigurableAxis ConfBinskT{"ConfBinskT", {150, 0., 9.}, "binning kT"}; @@ -205,7 +205,7 @@ struct FemtoUniversePairTaskTrackPhi { HistogramRegistry registryDCA{"registryDCA", {}, OutputObjHandlingPolicy::AnalysisObject, false, true}; HistogramRegistry registryMCpT{"registryMCpT", {}, OutputObjHandlingPolicy::AnalysisObject, false, true}; - ColumnBinningPolicy colBinning{{ConfBinsVtx, ConfBinsMult}, true}; + ColumnBinningPolicy colBinning{{confBinsVtx, confBinsMult}, true}; HistogramRegistry effCorrRegistry{"EfficiencyCorrection", {}, OutputObjHandlingPolicy::AnalysisObject}; @@ -217,11 +217,11 @@ struct FemtoUniversePairTaskTrackPhi { // PID for protons bool isProtonNSigma(float mom, float nsigmaTPCPr, float nsigmaTOFPr) // previous version from: https://github.com/alisw/AliPhysics/blob/master/PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoMJTrackCut.cxx { - if (mom < ConfTrackPtPIDLimit) { - return std::abs(nsigmaTPCPr) < ConfPIDProtonNsigmaTPC; + if (mom < confTrackPtPIDLimit) { + return std::abs(nsigmaTPCPr) < confPIDProtonNsigmaTPC; } - if (mom > ConfTrackPtPIDLimit) { - return std::hypot(nsigmaTOFPr, nsigmaTPCPr) < ConfPIDProtonNsigmaCombined; + if (mom > confTrackPtPIDLimit) { + return std::hypot(nsigmaTOFPr, nsigmaTPCPr) < confPIDProtonNsigmaCombined; } return false; } @@ -232,7 +232,7 @@ struct FemtoUniversePairTaskTrackPhi { return true; } if (mom >= 0.5) { - return std::hypot(nsigmaTOFPi, nsigmaTPCPi) < ConfPIDPionNsigmaReject || std::hypot(nsigmaTOFK, nsigmaTPCK) < ConfPIDKaonNsigmaReject; + return std::hypot(nsigmaTOFPi, nsigmaTPCPi) < confPIDPionNsigmaReject || std::hypot(nsigmaTOFK, nsigmaTPCK) < confPIDKaonNsigmaReject; } // this will never be reached but is needed to avoid compiler warnings return false; @@ -240,7 +240,7 @@ struct FemtoUniversePairTaskTrackPhi { bool isKaonNSigma(float mom, bool hasTOF, float nsigmaTPCK, float nsigmaTOFK) { - if (ConfTrackUseRun3PIDforKaons) { + if (confTrackUseRun3PIDforKaons) { if (mom < 0.5) { return std::abs(nsigmaTPCK) < 3.0; } @@ -277,10 +277,10 @@ struct FemtoUniversePairTaskTrackPhi { bool isKaonRejected(float mom, float nsigmaTPCPr, float nsigmaTOFPr, float nsigmaTPCPi, float nsigmaTOFPi) { if (mom < 0.5) { - return (std::abs(nsigmaTPCPi) < ConfPIDPionNsigmaReject) || (std::abs(nsigmaTPCPr) < ConfPIDProtonNsigmaReject); + return (std::abs(nsigmaTPCPi) < confPIDPionNsigmaReject) || (std::abs(nsigmaTPCPr) < confPIDProtonNsigmaReject); } if (mom >= 0.5) { - return (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < ConfPIDPionNsigmaReject) || (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < ConfPIDProtonNsigmaReject); + return (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < confPIDPionNsigmaReject) || (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < confPIDProtonNsigmaReject); } return false; } @@ -288,10 +288,10 @@ struct FemtoUniversePairTaskTrackPhi { bool isPionNSigma(float mom, float nsigmaTPCPi, float nsigmaTOFPi) { if (mom < 0.5) { - return (std::abs(nsigmaTPCPi) < ConfPIDPionNsigmaTPC); + return (std::abs(nsigmaTPCPi) < confPIDPionNsigmaTPC); } if (mom >= 0.5) { - return (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < ConfPIDPionNsigmaCombined); + return (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < confPIDPionNsigmaCombined); } return false; } @@ -299,10 +299,10 @@ struct FemtoUniversePairTaskTrackPhi { bool isPionRejected(float mom, float nsigmaTPCPr, float nsigmaTOFPr, float nsigmaTPCK, float nsigmaTOFK) { if (mom < 0.5) { - return (std::abs(nsigmaTPCK) < ConfPIDKaonNsigmaReject) || (std::abs(nsigmaTPCPr) < ConfPIDProtonNsigmaReject); + return (std::abs(nsigmaTPCK) < confPIDKaonNsigmaReject) || (std::abs(nsigmaTPCPr) < confPIDProtonNsigmaReject); } if (mom >= 0.5) { - return (std::hypot(nsigmaTOFK, nsigmaTPCK) < ConfPIDKaonNsigmaReject) || (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < ConfPIDProtonNsigmaReject); + return (std::hypot(nsigmaTOFK, nsigmaTPCK) < confPIDKaonNsigmaReject) || (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < confPIDProtonNsigmaReject); } else { return false; } @@ -312,7 +312,7 @@ struct FemtoUniversePairTaskTrackPhi { { bool hasTOF = std::isfinite(nsigmaTOFPr) || std::isfinite(nsigmaTOFPi) || std::isfinite(nsigmaTOFK); - switch (ConfTrackPDGCode) { + switch (confTrackPDGCode) { case 2212: // Proton case -2212: // anty Proton return isProtonNSigma(mom, nsigmaTPCPr, nsigmaTOFPr); @@ -332,7 +332,7 @@ struct FemtoUniversePairTaskTrackPhi { bool isParticleNSigmaRejected(float mom, float nsigmaTPCPr, float nsigmaTOFPr, float nsigmaTPCPi, float nsigmaTOFPi, float nsigmaTPCK, float nsigmaTOFK) { - switch (ConfTrackPDGCode) { + switch (confTrackPDGCode) { case 2212: // Proton case -2212: // anty Proton return isProtonRejected(mom, nsigmaTPCPi, nsigmaTOFPi, nsigmaTPCK, nsigmaTOFK); @@ -358,8 +358,8 @@ struct FemtoUniversePairTaskTrackPhi { void init(InitContext&) { - if (ConfIsMC) { - hTrackDCA.init(®istryDCA, ConfBinsTempFitVarpT, ConfBinsTempFitVarDCA, true, ConfTrackPDGCode, true); + if (confIsMC) { + hTrackDCA.init(®istryDCA, confBinsTempFitVarpT, confBinsTempFitVarDCA, true, confTrackPDGCode, true); registryMCpT.add("MCReco/C_phi_pT", "; #it{p_T} (GeV/#it{c}); Counts", kTH1F, {{100, 0, 10}}); registryMCpT.add("MCReco/NC_phi_pT", "; #it{p_T} (GeV/#it{c}); Counts", kTH1F, {{100, 0, 10}}); @@ -371,9 +371,9 @@ struct FemtoUniversePairTaskTrackPhi { effCorrection.init( &effCorrRegistry, { - static_cast(ConfBinsTempFitVarpT), - {ConfBinsEta, -1, 1}, - ConfBinsMult, + static_cast(confBinsTempFitVarpT), + {confBinsEta, -1, 1}, + confBinsMult, }); eventHisto.init(&qaRegistry); @@ -440,21 +440,21 @@ struct FemtoUniversePairTaskTrackPhi { registryMCreco.add("MCrecoPhi", "MC reco Phi;#it{p}_{T} (GeV/c); #eta", {HistType::kTH2F, {{500, 0, 5}, {400, -1.0, 1.0}}}); registryMCreco.add("MCrecoPhiPt", "MC reco Phi; #it{p_T} (GeV/#it{c}); Counts", kTH1F, {{500, 0, 5}}); - trackHistoPartPhi.init(&qaRegistry, ConfBinsTempFitVarpT, ConfBinsTempFitVarInvMass, ConfIsMC, 333); - trackHistoPartTrack.init(&qaRegistry, ConfBinsTempFitVarpT, ConfBinsTempFitVar, ConfIsMC, ConfTrackPDGCode); + trackHistoPartPhi.init(&qaRegistry, confBinsTempFitVarpT, confBinsTempFitVarInvMass, confIsMC, 333); + trackHistoPartTrack.init(&qaRegistry, confBinsTempFitVarpT, confBinsTempFitVar, confIsMC, confTrackPDGCode); mixQaRegistry.add("MixingQA/hSECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}}); mixQaRegistry.add("MixingQA/hMECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}}); - sameEventCont.init(&resultRegistry, ConfBinskstar, ConfBinsMult, ConfBinskT, ConfBinsmT, ConfBins3Dmult, ConfBins3DmT, ConfBinsEta, ConfBinsPhi, ConfIsMC, ConfUse3D); - mixedEventCont.init(&resultRegistry, ConfBinskstar, ConfBinsMult, ConfBinskT, ConfBinsmT, ConfBins3Dmult, ConfBins3DmT, ConfBinsEta, ConfBinsPhi, ConfIsMC, ConfUse3D); + sameEventCont.init(&resultRegistry, ConfBinskstar, confBinsMult, ConfBinskT, ConfBinsmT, confBins3Dmult, confBins3DmT, confBinsEta, confBinsPhi, confIsMC, confUse3D); + mixedEventCont.init(&resultRegistry, ConfBinskstar, confBinsMult, ConfBinskT, ConfBinsmT, confBins3Dmult, confBins3DmT, confBinsEta, confBinsPhi, confIsMC, confUse3D); - sameEventCont.setPDGCodes(333, ConfTrackPDGCode); - mixedEventCont.setPDGCodes(333, ConfTrackPDGCode); + sameEventCont.setPDGCodes(333, confTrackPDGCode); + mixedEventCont.setPDGCodes(333, confTrackPDGCode); pairCleaner.init(&qaRegistry); - if (ConfCPRIsEnabled) { - pairCloseRejection.init(&resultRegistry, &qaRegistry, confDeltaEtaAxis, confDeltaPhiStarAxis, ConfCPRdeltaPhiCutMin, ConfCPRdeltaPhiCutMax, ConfCPRdeltaEtaCutMin, ConfCPRdeltaEtaCutMax, ConfCPRChosenRadii, ConfCPRPlotPerRadii, ConfCPRInvMassCutMin, ConfCPRInvMassCutMax); + if (confCPRIsEnabled) { + pairCloseRejection.init(&resultRegistry, &qaRegistry, confDeltaEtaAxis, confDeltaPhiStarAxis, confCPRdeltaPhiCutMin, confCPRdeltaPhiCutMax, confCPRdeltaEtaCutMin, confCPRdeltaEtaCutMax, confCPRChosenRadii, confCPRPlotPerRadii, confCPRInvMassCutMin, confCPRInvMassCutMax); } } @@ -498,11 +498,11 @@ struct FemtoUniversePairTaskTrackPhi { float tpcNSigmaPr = trackCuts.getNsigmaTPC(track, o2::track::PID::Proton); float tofNSigmaPr = trackCuts.getNsigmaTOF(track, o2::track::PID::Proton); - if (ConfTrackIsIdentified) { + if (confTrackIsIdentified) { if (!isParticleNSigmaAccepted(track.p(), tpcNSigmaPr, tofNSigmaPr, tpcNSigmaPi, tofNSigmaPi, tpcNSigmaKa, tofNSigmaKa)) { continue; } - if (ConfTrackIsRejected) { + if (confTrackIsRejected) { if (isParticleNSigmaRejected(track.p(), tpcNSigmaPr, tofNSigmaPr, tpcNSigmaPi, tofNSigmaPi, tpcNSigmaKa, tofNSigmaKa)) { continue; } @@ -526,26 +526,26 @@ struct FemtoUniversePairTaskTrackPhi { trackHistoPartTrack.fillQA(track); if constexpr (isMC) { - effCorrection.fillRecoHist(track, ConfTrackPDGCode); + effCorrection.fillRecoHist(track, confTrackPDGCode); } } /// Now build the combinations for (auto const& [track, phicandidate] : combinations(CombinationsFullIndexPolicy(groupPartsTrack, groupPartsPhi))) { - if (ConfTrackIsIdentified) { + if (confTrackIsIdentified) { if (!isParticleNSigmaAccepted(track.p(), trackCuts.getNsigmaTPC(track, o2::track::PID::Proton), trackCuts.getNsigmaTOF(track, o2::track::PID::Proton), trackCuts.getNsigmaTPC(track, o2::track::PID::Pion), trackCuts.getNsigmaTOF(track, o2::track::PID::Pion), trackCuts.getNsigmaTPC(track, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(track, o2::track::PID::Kaon))) { continue; } } - if (ConfTrackIsRejected) { + if (confTrackIsRejected) { if (isParticleNSigmaRejected(track.p(), trackCuts.getNsigmaTPC(track, o2::track::PID::Proton), trackCuts.getNsigmaTOF(track, o2::track::PID::Proton), trackCuts.getNsigmaTPC(track, o2::track::PID::Pion), trackCuts.getNsigmaTOF(track, o2::track::PID::Pion), trackCuts.getNsigmaTPC(track, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(track, o2::track::PID::Kaon))) { continue; } } // Close Pair Rejection - if (ConfCPRIsEnabled) { + if (confCPRIsEnabled) { if (pairCloseRejection.isClosePair(track, phicandidate, parts, magFieldTesla, femto_universe_container::EventType::same)) { continue; } @@ -556,7 +556,7 @@ struct FemtoUniversePairTaskTrackPhi { continue; } weight = effCorrection.getWeight(ParticleNo::ONE, phicandidate) * effCorrection.getWeight(ParticleNo::TWO, track); - sameEventCont.setPair(track, phicandidate, multCol, ConfUse3D, weight); + sameEventCont.setPair(track, phicandidate, multCol, confUse3D, weight); } // // Used for better fitting of invariant mass background. @@ -590,24 +590,24 @@ struct FemtoUniversePairTaskTrackPhi { void doMixedEvent(const PartitionType& groupPartsTrack, const PartitionType& groupPartsPhi, const PartType& parts, float magFieldTesla, int multCol, [[maybe_unused]] MCParticles mcParts = nullptr) { for (auto const& [track, phicandidate] : combinations(CombinationsFullIndexPolicy(groupPartsTrack, groupPartsPhi))) { - if (ConfTrackIsIdentified) { + if (confTrackIsIdentified) { if (!isParticleNSigmaAccepted(track.p(), trackCuts.getNsigmaTPC(track, o2::track::PID::Proton), trackCuts.getNsigmaTOF(track, o2::track::PID::Proton), trackCuts.getNsigmaTPC(track, o2::track::PID::Pion), trackCuts.getNsigmaTOF(track, o2::track::PID::Pion), trackCuts.getNsigmaTPC(track, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(track, o2::track::PID::Kaon))) { continue; } - if (ConfTrackIsRejected) { + if (confTrackIsRejected) { if (isParticleNSigmaRejected(track.p(), trackCuts.getNsigmaTPC(track, o2::track::PID::Proton), trackCuts.getNsigmaTOF(track, o2::track::PID::Proton), trackCuts.getNsigmaTPC(track, o2::track::PID::Pion), trackCuts.getNsigmaTOF(track, o2::track::PID::Pion), trackCuts.getNsigmaTPC(track, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(track, o2::track::PID::Kaon))) { continue; } } } - if (ConfCPRIsEnabled) { + if (confCPRIsEnabled) { if (pairCloseRejection.isClosePair(track, phicandidate, parts, magFieldTesla, femto_universe_container::EventType::mixed)) { continue; } } weight = effCorrection.getWeight(ParticleNo::ONE, phicandidate) * effCorrection.getWeight(ParticleNo::TWO, track); - mixedEventCont.setPair(track, phicandidate, multCol, ConfUse3D, weight); + mixedEventCont.setPair(track, phicandidate, multCol, confUse3D, weight); } } @@ -687,7 +687,7 @@ struct FemtoUniversePairTaskTrackPhi { continue; } - if (pdgCode == ConfTrackPDGCode) { + if (pdgCode == confTrackPDGCode) { effCorrection.fillTruthHist(part); } @@ -740,12 +740,12 @@ struct FemtoUniversePairTaskTrackPhi { continue; // no MC particle const auto& mcpart = mcparts.iteratorAt(mcPartId); - if (mcpart.pdgMCTruth() == ConfTrackPDGCode && (part.pt() > ConfTrackPtLow) && (part.pt() < ConfTrackPtHigh) && 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))) { + if (mcpart.pdgMCTruth() == confTrackPDGCode && (part.pt() > confTrackPtLow) && (part.pt() < confTrackPtHigh) && 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))) { registryMCpT.fill(HIST("MCReco/NC_p_pT"), part.pt()); float weightTrack = effCorrection.getWeight(ParticleNo::TWO, part); registryMCpT.fill(HIST("MCReco/C_p_pT"), part.pt(), weightTrack); } - if ((mcpart.pdgMCTruth() == o2::constants::physics::Pdg::kPhi) && (part.partType() == aod::femtouniverseparticle::ParticleType::kPhi) && (part.pt() > ConfPhiPtLow) && (part.pt() < ConfPhiPtHigh)) { + if ((mcpart.pdgMCTruth() == o2::constants::physics::Pdg::kPhi) && (part.partType() == aod::femtouniverseparticle::ParticleType::kPhi) && (part.pt() > confPhiPtLow) && (part.pt() < confPhiPtHigh)) { registryMCpT.fill(HIST("MCReco/NC_phi_pT"), part.pt()); float weightPhi = effCorrection.getWeight(ParticleNo::ONE, part); registryMCpT.fill(HIST("MCReco/C_phi_pT"), part.pt(), weightPhi);