Skip to content

Commit 8f1de05

Browse files
committed
consider all global muon tracks
1 parent 53540e2 commit 8f1de05

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

PWGUD/Tasks/upcFwdJpsiRl.cxx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -540,14 +540,11 @@ struct UpcFwdJpsiRL {
540540
std::unordered_map<int32_t, ZDCinfo> zdcPerCand;
541541
collectCandZDCInfo(zdcPerCand, ZDCs);
542542

543-
// loop over the candidates
543+
// loop over the candidates and all track pairs
544544
for (const auto& item : tracksPerCand) {
545-
int32_t trId1 = item.second[0];
546-
int32_t trId2 = item.second[1];
545+
const auto& trkIds = item.second;
547546
int32_t candID = item.first;
548547
auto cand = eventCandidates.iteratorAt(candID);
549-
auto tr1 = fwdTracks.iteratorAt(trId1);
550-
auto tr2 = fwdTracks.iteratorAt(trId2);
551548

552549
ZDCinfo zdc;
553550
if (zdcPerCand.count(candID) != 0) {
@@ -559,7 +556,13 @@ struct UpcFwdJpsiRL {
559556
zdc.enC = -999;
560557
}
561558

562-
processCand(cand, tr1, tr2, zdc);
559+
for (size_t i = 0; i < trkIds.size(); ++i) {
560+
for (size_t j = i + 1; j < trkIds.size(); ++j) {
561+
auto tr1 = fwdTracks.iteratorAt(trkIds[i]);
562+
auto tr2 = fwdTracks.iteratorAt(trkIds[j]);
563+
processCand(cand, tr1, tr2, zdc);
564+
}
565+
}
563566
}
564567
}
565568

0 commit comments

Comments
 (0)