Skip to content

Commit 47f306f

Browse files
committed
Add new process function for spin correlation
1 parent 973a393 commit 47f306f

File tree

1 file changed

+5
-24
lines changed

1 file changed

+5
-24
lines changed

PWGLF/Tasks/Strangeness/lambdaspincorrderived.cxx

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,30 +1242,11 @@ struct lambdaspincorrderived {
12421242
// 1) nominal φ-bin
12431243
collectFrom(phiB);
12441244

1245-
// scan pt±1, eta±1, phi±1 (wrapped)
1246-
for (int dpt = -1; dpt <= 1; ++dpt) {
1247-
const int ptUse = ptB + dpt;
1248-
if (ptUse < 0 || ptUse >= nPt) {
1249-
continue;
1250-
}
1251-
for (int deta = -1; deta <= 1; ++deta) {
1252-
const int etaUse = etaB + deta;
1253-
if (etaUse < 0 || etaUse >= nEta) {
1254-
continue;
1255-
}
1256-
for (int phiUse : phiBins) {
1257-
collectFrom(ptUse, etaUse, phiUse);
1258-
if (maxKeep > 0 && static_cast<int>(matches.size()) >= maxKeep) {
1259-
break;
1260-
}
1261-
}
1262-
if (maxKeep > 0 && static_cast<int>(matches.size()) >= maxKeep) {
1263-
break;
1264-
}
1265-
}
1266-
if (maxKeep > 0 && static_cast<int>(matches.size()) >= maxKeep) {
1267-
break;
1268-
}
1245+
// 2) wrap only at boundaries: 0 <-> nPhi-1
1246+
if (phiB == 0) {
1247+
collectFrom(nPhi - 1);
1248+
} else if (phiB == nPhi - 1) {
1249+
collectFrom(0);
12691250
}
12701251

12711252
if (matches.empty()) {

0 commit comments

Comments
 (0)