Skip to content

Commit f92acf0

Browse files
committed
Add new MC process function for mixing
1 parent c897387 commit f92acf0

File tree

1 file changed

+4
-22
lines changed

1 file changed

+4
-22
lines changed

PWGLF/Tasks/Strangeness/lambdaspincorrderived.cxx

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,44 +1132,26 @@ struct lambdaspincorrderived {
11321132
if (ptB < 0 || etaB < 0 || phiB < 0 || mB < 0)
11331133
continue;
11341134

1135+
// Collect partners from nominal key, plus wrapped neighbor only for φ-edge bins
11351136
std::vector<MatchRef> matches;
1136-
const int maxKeep = maxMatchesPerPair.value; // default 25
1137-
matches.reserve(std::max(64, maxKeep > 0 ? maxKeep : 64));
1138-
1137+
matches.reserve(128); // or keep binVec.size() if you prefer
11391138
const int64_t curColIdx = static_cast<int64_t>(collision1.index());
1140-
std::unordered_set<int64_t> seenRow;
1141-
seenRow.reserve(static_cast<size_t>(std::max(256, 4 * (maxKeep > 0 ? maxKeep : 64))));
1142-
1143-
auto collectFrom = [&](int ptUse, int etaUse, int phiUse) {
1144-
if (maxKeep > 0 && static_cast<int>(matches.size()) >= maxKeep) {
1145-
return; // early stop
1146-
}
11471139

1148-
const size_t keyUse = linearKey(colBin, status, ptUse, etaUse, phiUse, mB,
1140+
auto collectFrom = [&](int phiBinUse) {
1141+
const size_t keyUse = linearKey(colBin, status, ptB, etaB, phiBinUse, mB,
11491142
nStat, nPt, nEta, nPhi, nM);
11501143
auto const& vec = buffer[keyUse];
1151-
11521144
for (const auto& bc : vec) {
1153-
if (maxKeep > 0 && static_cast<int>(matches.size()) >= maxKeep) {
1154-
break;
1155-
}
11561145
if (bc.collisionIdx == curColIdx) {
11571146
continue; // must be from different event
11581147
}
1159-
1160-
// dedupe first
1161-
if (!seenRow.insert(bc.rowIndex).second) {
1162-
continue;
1163-
}
1164-
11651148
auto tX = V0s.iteratorAt(static_cast<uint64_t>(bc.rowIndex));
11661149
if (!selectionV0(tX)) {
11671150
continue;
11681151
}
11691152
if (!checkKinematics(t1, tX)) {
11701153
continue;
11711154
}
1172-
11731155
matches.push_back(MatchRef{bc.collisionIdx, bc.rowIndex});
11741156
}
11751157
};

0 commit comments

Comments
 (0)