Skip to content

Commit ccd6b57

Browse files
Diana KrupovaDiana Krupova
authored andcommitted
changes requested in the review
1 parent be52273 commit ccd6b57

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

PWGUD/TableProducer/UPCCandidateProducer.cxx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1605,9 +1605,7 @@ struct UpcCandProducer {
16051605
for (auto& pair : bcsMatchedTrIdsGlobal) {
16061606
auto globalBC = static_cast<int64_t>(pair.first);
16071607
const auto& fwdTrackIDs = pair.second; // Forward tracks (Global with MFT)
1608-
uint32_t nMFTs = fwdTrackIDs.size();
1609-
// ensure we have two MFT tracks
1610-
if (nMFTs != 2) {
1608+
if (fwdTrackIDs.size() != 2) { // ensure we have two MFT tracks
16111609
continue;
16121610
}
16131611

@@ -1628,15 +1626,13 @@ struct UpcCandProducer {
16281626
// retrieve global track eta and apply the logic
16291627
bool firstInAcceptance = false, secondInAcceptance = false;
16301628

1631-
auto trk1 = fwdTracks.iteratorAt(fwdTrackIDs[0]);
1632-
auto trk2 = fwdTracks.iteratorAt(fwdTrackIDs[1]);
1633-
double eta1 = trk1.eta();
1634-
double eta2 = trk2.eta();
1629+
const auto& trk1 = fwdTracks.iteratorAt(fwdTrackIDs[0]);
1630+
const auto& trk2 = fwdTracks.iteratorAt(fwdTrackIDs[1]);
16351631

1636-
if (eta1 > fMinEtaMFT && eta1 < fMaxEtaMFT) {
1632+
if (trk1.eta() > fMinEtaMFT && trk1.eta() < fMaxEtaMFT) {
16371633
firstInAcceptance = true;
16381634
}
1639-
if (eta2 > fMinEtaMFT && eta2 < fMaxEtaMFT) {
1635+
if (trk2.eta() > fMinEtaMFT && trk2.eta() < fMaxEtaMFT) {
16401636
secondInAcceptance = true;
16411637
}
16421638

0 commit comments

Comments
 (0)