Skip to content

Commit 490435d

Browse files
authored
[PWGCF] add bool for pT ordering cut (#11690)
1 parent ecd2f9f commit 490435d

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ struct DiHadronCor {
9494
O2_DEFINE_CONFIGURABLE(cfgLocalEfficiency, bool, false, "Use local efficiency object")
9595
O2_DEFINE_CONFIGURABLE(cfgVerbosity, bool, false, "Verbose output")
9696
O2_DEFINE_CONFIGURABLE(cfgUseEventWeights, bool, false, "Use event weights for mixed event")
97-
O2_DEFINE_CONFIGURABLE(cfgUsePtDiff, bool, false, "To enable pt differential vn, one needs to set this to true and set the pt bins accordingly")
97+
O2_DEFINE_CONFIGURABLE(cfgUsePtOrder, bool, true, "enable trigger pT < associated pT cut")
98+
O2_DEFINE_CONFIGURABLE(cfgUsePtOrderInMixEvent, bool, true, "enable trigger pT < associated pT cut in mixed event")
9899

99100
SliceCache cache;
100101

@@ -473,10 +474,12 @@ struct DiHadronCor {
473474
associatedWeight = efficiencyAssociatedCache[track2.filteredIndex()];
474475
}
475476

476-
if (cfgUsePtDiff && track1.globalIndex() == track2.globalIndex())
477+
if (!cfgUsePtOrder && track1.globalIndex() == track2.globalIndex())
477478
continue; // For pt-differential correlations, skip if the trigger and associate are the same track
478-
if (!cfgUsePtDiff && track1.pt() <= track2.pt())
479+
if (cfgUsePtOrder && system == SameEvent && track1.pt() <= track2.pt())
479480
continue; // Without pt-differential correlations, skip if the trigger pt is less than the associate pt
481+
if (cfgUsePtOrder && system == MixedEvent && cfgUsePtOrderInMixEvent && track1.pt() <= track2.pt())
482+
continue; // For pt-differential correlations in mixed events, skip if the trigger pt is less than the associate pt
480483

481484
float deltaPhi = RecoDecay::constrainAngle(track1.phi() - track2.phi(), -PIHalf);
482485
float deltaEta = track1.eta() - track2.eta();
@@ -540,10 +543,12 @@ struct DiHadronCor {
540543
if (doprocessOntheflyMixed && !genTrackSelected(track2))
541544
continue;
542545

543-
if (cfgUsePtDiff && track1.globalIndex() == track2.globalIndex())
546+
if (!cfgUsePtOrder && track1.globalIndex() == track2.globalIndex())
544547
continue; // For pt-differential correlations, skip if the trigger and associate are the same track
545-
if (!cfgUsePtDiff && track1.pt() <= track2.pt())
548+
if (cfgUsePtOrder && system == SameEvent && track1.pt() <= track2.pt())
546549
continue; // Without pt-differential correlations, skip if the trigger pt is less than the associate pt
550+
if (cfgUsePtOrder && system == MixedEvent && cfgUsePtOrderInMixEvent && track1.pt() <= track2.pt())
551+
continue; // For pt-differential correlations in mixed events, skip if the trigger pt is less than the associate pt
547552

548553
float deltaPhi = RecoDecay::constrainAngle(track1.phi() - track2.phi(), -PIHalf);
549554
float deltaEta = track1.eta() - track2.eta();

0 commit comments

Comments
 (0)