File tree Expand file tree Collapse file tree 1 file changed +5
-24
lines changed
Expand file tree Collapse file tree 1 file changed +5
-24
lines changed Original file line number Diff line number Diff 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 ()) {
You can’t perform that action at this time.
0 commit comments