Skip to content

Commit 350a8db

Browse files
committed
Autocorrelation check
1 parent 56fdf05 commit 350a8db

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

PWGDQ/Tasks/taskJPsiMu.cxx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,13 @@ struct DqJPsiMuonCorrelations {
147147
if (!assoc.isMuonSelected_bit(0)) {
148148
continue;
149149
}
150-
auto track = assoc.template reducedmuon_as<TMuonTracks>();
151150

152-
// TODO: Check if the associated track is part of the dilepton candidate, if so skip it to avoid auto-correlations
151+
// Skip associated muons that are part of the dilepton candidate
152+
if (dilepton.index0Id() == assoc.reducedmuonId() || dilepton.index1Id() == assoc.reducedmuonId()) {
153+
continue;
154+
}
155+
156+
auto track = assoc.template reducedmuon_as<TMuonTracks>();
153157

154158
float deltaEta = track.eta() - dilepton.eta();
155159
float deltaPhi = track.phi() - dilepton.phi();

0 commit comments

Comments
 (0)