From f57fb582031025d693a5c5ccb7e5b3c68914d334 Mon Sep 17 00:00:00 2001 From: wulbyu Date: Tue, 10 Mar 2026 15:14:50 +0100 Subject: [PATCH 1/2] replace eta selection with rapidity selection --- .../derivedDataCreatorCorrelationsReduced.cxx | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/PWGHF/HFC/TableProducer/derivedDataCreatorCorrelationsReduced.cxx b/PWGHF/HFC/TableProducer/derivedDataCreatorCorrelationsReduced.cxx index c8b4ea6c71a..35c9ffdefb4 100644 --- a/PWGHF/HFC/TableProducer/derivedDataCreatorCorrelationsReduced.cxx +++ b/PWGHF/HFC/TableProducer/derivedDataCreatorCorrelationsReduced.cxx @@ -88,7 +88,6 @@ struct HfDerivedDataCreatorCorrelationsReduced { Configurable ptCandMax{"ptCandMax", 24., "max. cand. pT"}; Configurable tpcNClsCrossedRowsMin{"tpcNClsCrossedRowsMin", 70, "min. TPC crossed rows for associated tracks"}; Configurable etaTrkMax{"etaTrkMax", 1., "max. track eta"}; - Configurable etaCandMax{"etaCandMax", 1., "max. trigger candidate eta"}; Configurable ptTrkMin{"ptTrkMin", 0.2, "min. track pT"}; Configurable ptTrkMax{"ptTrkMax", 3., "max. track pT"}; Configurable dcaXYTrkMax{"dcaXYTrkMax", 1., "max. track DCA XY"}; @@ -264,6 +263,25 @@ struct HfDerivedDataCreatorCorrelationsReduced { return outputMl; } + /// Cut on rapidity of the candidate + /// \param candidate is the charm hadron candidate + template + bool cutCandRapidity(const TCand& candidate) { + double y = 0.0; + if constexpr (CandType == CandidateType::DsToKKPi || CandType == CandidateType::DsToPiKK) { + y = HfHelper::yDs(candidate); + } else if constexpr (CandType == CandidateType::DplusToPiKPi) { + y = HfHelper::yDplus(candidate); + } else if constexpr (CandType == CandidateType::D0ToPiK || CandType == CandidateType::D0ToKPi) { + y = HfHelper::yD0(candidate); + } else if constexpr (CandType == CandidateType::LcToPKPi) { + y = HfHelper::yLc(candidate); + } else { + return true; + } + return std::fabs(y) < yCandMax; + } + /// Check event selections for collision and fill the collision table /// \param collision is the collision template @@ -336,7 +354,7 @@ struct HfDerivedDataCreatorCorrelationsReduced { const float collCentrality) { for (const auto& trigCand : trigCands) { - if (std::fabs(trigCand.eta()) >= etaCandMax) { + if (!cutCandRapidity(trigCand)) { continue; } double trigCandPt = trigCand.pt(); @@ -392,7 +410,7 @@ struct HfDerivedDataCreatorCorrelationsReduced { void fillCharmMixedEvent(TTrigCands const& trigCands) { for (const auto& trigCand : trigCands) { - if (std::fabs(trigCand.eta()) >= etaCandMax) { + if (!cutCandRapidity(trigCand)) { continue; } registry.fill(HIST("hPhiVsPtTrig"), RecoDecay::constrainAngle(trigCand.phi(), -o2::constants::math::PIHalf), trigCand.pt()); From 497726fe4dfe4d64dd1c0755aac0eb1394ecc826 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Tue, 10 Mar 2026 15:05:02 +0000 Subject: [PATCH 2/2] Please consider the following formatting changes --- .../derivedDataCreatorCorrelationsReduced.cxx | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/PWGHF/HFC/TableProducer/derivedDataCreatorCorrelationsReduced.cxx b/PWGHF/HFC/TableProducer/derivedDataCreatorCorrelationsReduced.cxx index 35c9ffdefb4..9ffe580fcf5 100644 --- a/PWGHF/HFC/TableProducer/derivedDataCreatorCorrelationsReduced.cxx +++ b/PWGHF/HFC/TableProducer/derivedDataCreatorCorrelationsReduced.cxx @@ -266,20 +266,21 @@ struct HfDerivedDataCreatorCorrelationsReduced { /// Cut on rapidity of the candidate /// \param candidate is the charm hadron candidate template - bool cutCandRapidity(const TCand& candidate) { - double y = 0.0; - if constexpr (CandType == CandidateType::DsToKKPi || CandType == CandidateType::DsToPiKK) { - y = HfHelper::yDs(candidate); - } else if constexpr (CandType == CandidateType::DplusToPiKPi) { - y = HfHelper::yDplus(candidate); - } else if constexpr (CandType == CandidateType::D0ToPiK || CandType == CandidateType::D0ToKPi) { - y = HfHelper::yD0(candidate); - } else if constexpr (CandType == CandidateType::LcToPKPi) { - y = HfHelper::yLc(candidate); - } else { - return true; - } - return std::fabs(y) < yCandMax; + bool cutCandRapidity(const TCand& candidate) + { + double y = 0.0; + if constexpr (CandType == CandidateType::DsToKKPi || CandType == CandidateType::DsToPiKK) { + y = HfHelper::yDs(candidate); + } else if constexpr (CandType == CandidateType::DplusToPiKPi) { + y = HfHelper::yDplus(candidate); + } else if constexpr (CandType == CandidateType::D0ToPiK || CandType == CandidateType::D0ToKPi) { + y = HfHelper::yD0(candidate); + } else if constexpr (CandType == CandidateType::LcToPKPi) { + y = HfHelper::yLc(candidate); + } else { + return true; + } + return std::fabs(y) < yCandMax; } /// Check event selections for collision and fill the collision table