Skip to content

Commit 79a2540

Browse files
authored
Refactor selectionCollision logic for clarity
1 parent b4f1801 commit 79a2540

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

PWGHF/HFC/TableProducer/correlatorXicHadrons.cxx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ struct HfCorrelatorXicHadronsSelection {
154154
template <bool IsXicPlus, typename CollType, typename CandType>
155155
void selectionCollision(CollType const& collision, CandType const& candidates)
156156
{
157+
bool isSelColl = true;
157158
bool isCandFound = false;
158159
bool isSel8 = true;
159160
bool isNosameBunchPileUp = true;
@@ -187,9 +188,10 @@ struct HfCorrelatorXicHadronsSelection {
187188
if (selNoSameBunchPileUpColl) {
188189
isNosameBunchPileUp = static_cast<bool>(collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup));
189190
}
190-
if (isCandFound && isSel8 && isNosameBunchPileUp) {
191-
candSel(true);
192-
}
191+
192+
isSelColl = isCandFound && isSel8 && isNosameBunchPileUp;
193+
194+
candSel(isSelColl);
193195
}
194196

195197
template <typename CandType>

0 commit comments

Comments
 (0)