From 2aa9af6437a2d38c7cfef93a8c9aabff93c3b5cf Mon Sep 17 00:00:00 2001 From: LuZhiyong <71517277+Luzhiyongg@users.noreply.github.com> Date: Thu, 19 Jun 2025 23:29:38 +0800 Subject: [PATCH 1/2] add bool for pT ordering cut --- .../Tasks/diHadronCor.cxx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx b/PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx index 13c8b352d9f..2a550a69704 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx @@ -94,7 +94,8 @@ struct DiHadronCor { O2_DEFINE_CONFIGURABLE(cfgLocalEfficiency, bool, false, "Use local efficiency object") O2_DEFINE_CONFIGURABLE(cfgVerbosity, bool, false, "Verbose output") O2_DEFINE_CONFIGURABLE(cfgUseEventWeights, bool, false, "Use event weights for mixed event") - O2_DEFINE_CONFIGURABLE(cfgUsePtDiff, bool, false, "To enable pt differential vn, one needs to set this to true and set the pt bins accordingly") + O2_DEFINE_CONFIGURABLE(cfgUsePtOrder, bool, true, "enable trigger pT < associated pT cut") + O2_DEFINE_CONFIGURABLE(cfgUsePtOrderInMixEvent, bool, true, "enable trigger pT < associated pT cut in mixed event") SliceCache cache; @@ -473,11 +474,13 @@ struct DiHadronCor { associatedWeight = efficiencyAssociatedCache[track2.filteredIndex()]; } - if (cfgUsePtDiff && track1.globalIndex() == track2.globalIndex()) + if (!cfgUsePtOrder && track1.globalIndex() == track2.globalIndex()) continue; // For pt-differential correlations, skip if the trigger and associate are the same track - if (!cfgUsePtDiff && track1.pt() <= track2.pt()) + if (cfgUsePtOrder && system == SameEvent && track1.pt() <= track2.pt()) continue; // Without pt-differential correlations, skip if the trigger pt is less than the associate pt - + if (cfgUsePtOrder && system == MixedEvent && cfgUsePtOrderInMixEvent && track1.pt() <= track2.pt()) + continue; // For pt-differential correlations in mixed events, skip if the trigger pt is less than the associate pt + float deltaPhi = RecoDecay::constrainAngle(track1.phi() - track2.phi(), -PIHalf); float deltaEta = track1.eta() - track2.eta(); @@ -540,10 +543,12 @@ struct DiHadronCor { if (doprocessOntheflyMixed && !genTrackSelected(track2)) continue; - if (cfgUsePtDiff && track1.globalIndex() == track2.globalIndex()) + if (!cfgUsePtOrder && track1.globalIndex() == track2.globalIndex()) continue; // For pt-differential correlations, skip if the trigger and associate are the same track - if (!cfgUsePtDiff && track1.pt() <= track2.pt()) + if (cfgUsePtOrder && system == SameEvent && track1.pt() <= track2.pt()) continue; // Without pt-differential correlations, skip if the trigger pt is less than the associate pt + if (cfgUsePtOrder && system == MixedEvent && cfgUsePtOrderInMixEvent && track1.pt() <= track2.pt()) + continue; // For pt-differential correlations in mixed events, skip if the trigger pt is less than the associate pt float deltaPhi = RecoDecay::constrainAngle(track1.phi() - track2.phi(), -PIHalf); float deltaEta = track1.eta() - track2.eta(); From 39e2dbb24235eead4552460e632b47b2e778b3c5 Mon Sep 17 00:00:00 2001 From: LuZhiyong <71517277+Luzhiyongg@users.noreply.github.com> Date: Thu, 19 Jun 2025 23:32:13 +0800 Subject: [PATCH 2/2] clang format --- PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx b/PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx index 2a550a69704..ef2c29e4f21 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx @@ -480,7 +480,7 @@ struct DiHadronCor { continue; // Without pt-differential correlations, skip if the trigger pt is less than the associate pt if (cfgUsePtOrder && system == MixedEvent && cfgUsePtOrderInMixEvent && track1.pt() <= track2.pt()) continue; // For pt-differential correlations in mixed events, skip if the trigger pt is less than the associate pt - + float deltaPhi = RecoDecay::constrainAngle(track1.phi() - track2.phi(), -PIHalf); float deltaEta = track1.eta() - track2.eta();