Skip to content

Commit 1f25a5a

Browse files
authored
[PWGCF] add pT-diff correlations (#11617)
1 parent d80d8bb commit 1f25a5a

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ 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")
9798

9899
SliceCache cache;
99100

@@ -472,8 +473,10 @@ struct DiHadronCor {
472473
associatedWeight = efficiencyAssociatedCache[track2.filteredIndex()];
473474
}
474475

475-
if (track1.pt() <= track2.pt())
476-
continue; // skip if the trigger pt is less than the associate pt
476+
if (cfgUsePtDiff && track1.globalIndex() == track2.globalIndex())
477+
continue; // For pt-differential correlations, skip if the trigger and associate are the same track
478+
if (!cfgUsePtDiff && track1.pt() <= track2.pt())
479+
continue; // Without pt-differential correlations, skip if the trigger pt is less than the associate pt
477480

478481
float deltaPhi = RecoDecay::constrainAngle(track1.phi() - track2.phi(), -PIHalf);
479482
float deltaEta = track1.eta() - track2.eta();
@@ -537,8 +540,10 @@ struct DiHadronCor {
537540
if (doprocessOntheflyMixed && !genTrackSelected(track2))
538541
continue;
539542

540-
if (track1.pt() <= track2.pt())
541-
continue; // skip if the trigger pt is less than the associate pt
543+
if (cfgUsePtDiff && track1.globalIndex() == track2.globalIndex())
544+
continue; // For pt-differential correlations, skip if the trigger and associate are the same track
545+
if (!cfgUsePtDiff && track1.pt() <= track2.pt())
546+
continue; // Without pt-differential correlations, skip if the trigger pt is less than the associate pt
542547

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

0 commit comments

Comments
 (0)