Skip to content

Commit a63d925

Browse files
committed
Add new process function for spin correlation
1 parent 3842cb6 commit a63d925

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
@@ -1219,30 +1219,11 @@ struct lambdaspincorrderived {
12191219
// 1) nominal φ-bin
12201220
collectFrom(phiB);
12211221

1222-
// scan pt±1, eta±1, phi±1 (wrapped)
1223-
for (int dpt = -1; dpt <= 1; ++dpt) {
1224-
const int ptUse = ptB + dpt;
1225-
if (ptUse < 0 || ptUse >= nPt) {
1226-
continue;
1227-
}
1228-
for (int deta = -1; deta <= 1; ++deta) {
1229-
const int etaUse = etaB + deta;
1230-
if (etaUse < 0 || etaUse >= nEta) {
1231-
continue;
1232-
}
1233-
for (int phiUse : phiBins) {
1234-
collectFrom(ptUse, etaUse, phiUse);
1235-
if (maxKeep > 0 && static_cast<int>(matches.size()) >= maxKeep) {
1236-
break;
1237-
}
1238-
}
1239-
if (maxKeep > 0 && static_cast<int>(matches.size()) >= maxKeep) {
1240-
break;
1241-
}
1242-
}
1243-
if (maxKeep > 0 && static_cast<int>(matches.size()) >= maxKeep) {
1244-
break;
1245-
}
1222+
// 2) wrap only at boundaries: 0 <-> nPhi-1
1223+
if (phiB == 0) {
1224+
collectFrom(nPhi - 1);
1225+
} else if (phiB == nPhi - 1) {
1226+
collectFrom(0);
12461227
}
12471228

12481229
if (matches.empty()) {

0 commit comments

Comments
 (0)