Skip to content

DPL Analysis: binning policies always drop out-of-range values - #15896

Open
ktf wants to merge 1 commit into
AliceO2Group:devfrom
ktf:pr15896
Open

ktf wants to merge 1 commit into
AliceO2Group:devfrom
ktf:pr15896

Conversation

@ktf

@ktf ktf commented Oct 5, 2026

Copy link
Copy Markdown
Member

BinningPolicyBase took an ignoreOverflows flag. With it false, values outside
the outermost edges of an axis got bins of their own instead of being mapped
to -1 and dropped by groupTable().

Nothing used it. Across O2 and O2Physics the only callers passing false were
five sites in test_ASoAHelpers.cxx, i.e. the test of the feature itself; no
analysis ever selected it. For event mixing it is the wrong behaviour anyway,
since it pairs collisions that the vertex or centrality cut excluded on
purpose. The path was also subtly inconsistent: once one axis overflowed, the
remaining axes restarted their edge search one index too high, so an underflow
on a later axis was binned as that axis's first real bin.

Drop the flag. getBin() keeps a single path, getOverflowShift() and
mIgnoreOverflows go away, and getBinsCount() is just the edge count minus the
dummy VARIABLE_WIDTH entry and the dropped out-of-range bin.

If per-axis overflow bins are ever genuinely wanted, a
BinningPolicyWithOverflow subclass is the way to add them back: a separate type
cannot be confused with this one at a call site, which a boolean could.

In the test, the two policies that differed only in the flag collapse into
one, and the expectations lose the rows that fall outside the axes (2, 3, 5, 8
and 9 of testA). The surviving categories [0, 4, 7] and [1, 6] are unchanged,
so the remaining tuples are exactly the old ones restricted to those rows. The
whole o2-test-framework-core suite passes, 258 cases.

@ktf
ktf requested a review from a team as a code owner October 5, 2026 12:32
@alibuild

alibuild commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2/fullCI_slc9 for 0fa617e at 2026-10-05 14:51:

## sw/BUILD/O2-latest/log
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Framework/Core/test/benchmark_EventMixing.cxx:52:54: error: no matching function for call to 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosX, o2::aod::collision::PosY>::ColumnBinningPolicy(<brace-enclosed initializer list>)'
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Framework/Core/test/benchmark_EventMixing.cxx:144:54: error: no matching function for call to 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosX, o2::aod::collision::PosY>::ColumnBinningPolicy(<brace-enclosed initializer list>)'
ninja: build stopped: subcommand failed.

Full log here.

BinningPolicyBase took an ignoreOverflows flag. With it false, values outside
the outermost edges of an axis got bins of their own instead of being mapped
to -1 and dropped by groupTable().

Nothing used it. Across O2 and O2Physics the only callers passing false were
five sites in test_ASoAHelpers.cxx, i.e. the test of the feature itself; no
analysis ever selected it. For event mixing it is the wrong behaviour anyway,
since it pairs collisions that the vertex or centrality cut excluded on
purpose. The path was also subtly inconsistent: once one axis overflowed, the
remaining axes restarted their edge search one index too high, so an underflow
on a later axis was binned as that axis's first real bin.

Drop the flag. getBin() keeps a single path, getOverflowShift() and
mIgnoreOverflows go away, and getBinsCount() is just the edge count minus the
dummy VARIABLE_WIDTH entry and the dropped out-of-range bin.

If per-axis overflow bins are ever genuinely wanted, a
BinningPolicyWithOverflow subclass is the way to add them back: a separate type
cannot be confused with this one at a call site, which a boolean could.

In the test, the two policies that differed only in the flag collapse into
one, and the expectations lose the rows that fall outside the axes (2, 3, 5, 8
and 9 of testA). The surviving categories [0, 4, 7] and [1, 6] are unchanged,
so the remaining tuples are exactly the old ones restricted to those rows. The
whole o2-test-framework-core suite passes, 258 cases.
@alibuild

alibuild commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Error while checking build/O2/fullCI_slc9 for 67e83a5 at 2026-10-06 07:55:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0Reso.cxx:254:61: error: no match for 'operator=' (operand types are 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosZ, o2::aod::femtodreamcollision::MultNtr>' and '<brace-enclosed initializer list>')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0Reso.cxx:255:81: error: no match for 'operator=' (operand types are 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosZ, o2::aod::femtodreamcollision::MultV0M>' and '<brace-enclosed initializer list>')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskV0Reso.cxx:256:101: error: no match for 'operator=' (operand types are 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosZ, o2::aod::femtodreamcollision::MultNtr, o2::aod::femtodreamcollision::MultV0M>' and '<brace-enclosed initializer list>')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoDream/Tasks/femtodreamPairCascadeCascade.cxx:219:61: error: no match for 'operator=' (operand types are 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosZ, o2::aod::femtodreamcollision::MultNtr>' and '<brace-enclosed initializer list>')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoDream/Tasks/femtodreamPairCascadeCascade.cxx:220:81: error: no match for 'operator=' (operand types are 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosZ, o2::aod::femtodreamcollision::MultV0M>' and '<brace-enclosed initializer list>')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoDream/Tasks/femtodreamPairCascadeCascade.cxx:221:101: error: no match for 'operator=' (operand types are 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosZ, o2::aod::femtodreamcollision::MultNtr, o2::aod::femtodreamcollision::MultV0M>' and '<brace-enclosed initializer list>')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackTrackPbPb.cxx:160:52: error: no match for 'operator=' (operand types are 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosZ, o2::aod::femtodreamcollision::MultNtr>' and '<brace-enclosed initializer list>')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackTrack.cxx:153:52: error: no match for 'operator=' (operand types are 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosZ, o2::aod::femtodreamcollision::MultNtr>' and '<brace-enclosed initializer list>')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackV0.cxx:243:61: error: no match for 'operator=' (operand types are 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosZ, o2::aod::femtodreamcollision::MultNtr>' and '<brace-enclosed initializer list>')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackV0.cxx:244:81: error: no match for 'operator=' (operand types are 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosZ, o2::aod::femtodreamcollision::MultV0M>' and '<brace-enclosed initializer list>')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackV0.cxx:245:101: error: no match for 'operator=' (operand types are 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosZ, o2::aod::femtodreamcollision::MultNtr, o2::aod::femtodreamcollision::MultV0M>' and '<brace-enclosed initializer list>')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackV0.cxx:203:52: error: no match for 'operator=' (operand types are 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosZ, o2::aod::femtodreamcollision::MultNtr>' and '<brace-enclosed initializer list>')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackCascade.cxx:230:61: error: no match for 'operator=' (operand types are 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosZ, o2::aod::femtodreamcollision::MultNtr>' and '<brace-enclosed initializer list>')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackCascade.cxx:231:81: error: no match for 'operator=' (operand types are 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosZ, o2::aod::femtodreamcollision::MultV0M>' and '<brace-enclosed initializer list>')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackCascade.cxx:232:101: error: no match for 'operator=' (operand types are 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosZ, o2::aod::femtodreamcollision::MultNtr, o2::aod::femtodreamcollision::MultV0M>' and '<brace-enclosed initializer list>')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackTrack.cxx:286:69: error: no match for 'operator=' (operand types are 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosZ, o2::aod::femtodreamcollision::MultNtr>' and '<brace-enclosed initializer list>')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackTrack.cxx:287:89: error: no match for 'operator=' (operand types are 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosZ, o2::aod::femtodreamcollision::MultV0M>' and '<brace-enclosed initializer list>')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackTrack.cxx:288:113: error: no match for 'operator=' (operand types are 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosZ, o2::aod::femtodreamcollision::MultNtr, o2::aod::femtodreamcollision::MultV0M>' and '<brace-enclosed initializer list>')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackTrack.cxx:289:109: error: no match for 'operator=' (operand types are 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosZ, o2::aod::femtodreamcollision::MultV0M, o2::aod::femtodreamcollision::QnVal>' and '<brace-enclosed initializer list>')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoDream/Tasks/femtoDreamPairTaskTrackTrack.cxx:290:109: error: no match for 'operator=' (operand types are 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosZ, o2::aod::femtodreamcollision::MultV0M, o2::aod::femtodreamcollision::EventPlane>' and '<brace-enclosed initializer list>')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGCF/FemtoDream/Tasks/femtoDreamTripletTaskTrackTrackV0PbPb.cxx:215:52: error: no match for 'operator=' (operand types are 'o2::framework::ColumnBinningPolicy<o2::aod::collision::PosZ, o2::aod::femtodreamcollision::MultNtr>' and '<brace-enclosed initializer list>')
ninja: build stopped: subcommand failed.


## sw/BUILD/o2checkcode-latest/log
--
========== List of errors found ==========
++ GRERR=0
++ grep -a -v clang-diagnostic-error error-log.txt
++ grep -a ' error:'
++ GRERR=1
++ [[ 1 == 0 ]]
++ mkdir -p /sw/INSTALLROOT/01157c95ae81d6d278eb2b25f602b8aa73382bd6/slc9_x86-64/o2checkcode/1.0-local10/etc/modulefiles
++ alibuild-generate-module
+ HAS_BIN=
+ HAS_LIB=
+ HAS_CMAKE=
+ HAS_ROOT=
+ '[' 0 '!=' 0 ']'
+ cat
+ printf 'if ![ is-loaded '\''BASE/1.0'\'' ] {\n module load BASE/1.0\n}'
+ echo 'BUILD_REQUIRES=CMake alibuild-recipe-tools defaults-release'
BUILD_REQUIRES=CMake alibuild-recipe-tools defaults-release
+ FULL_BUILD_REQUIRES='CMake alibuild-recipe-tools FairCMakeModules ninja-fortran defaults-release O2-customization json-c safe_int googlebenchmark UUID Alice-GRID-Utils Python-modules-list MPFR ninja bz2 pytorch_cpuinfo date double-conversion'
+ echo 'FULL_BUILD_REQUIRES=CMake alibuild-recipe-tools FairCMakeModules ninja-fortran defaults-release O2-customization json-c safe_int googlebenchmark UUID Alice-GRID-Utils Python-modules-list MPFR ninja bz2 pytorch_cpuinfo date double-conversion'
FULL_BUILD_REQUIRES=CMake alibuild-recipe-tools FairCMakeModules ninja-fortran defaults-release O2-customization json-c safe_int googlebenchmark UUID Alice-GRID-Utils Python-modules-list MPFR ninja bz2 pytorch_cpuinfo date double-conversion
++ env
++ cut -f1 -d=
[0 more errors; see full log]

Full log here.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants