diff --git a/PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx b/PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx index 13c8b352d9f..ef2c29e4f21 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,10 +474,12 @@ 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();