Skip to content

[Common] Refactor vertex-Z equalization and centrality calculations - #18812

Open
romainschotter wants to merge 1 commit into
AliceO2Group:masterfrom
romainschotter:onthefly-centrality
Open

romainschotter wants to merge 1 commit into
AliceO2Group:masterfrom
romainschotter:onthefly-centrality

Conversation

@romainschotter

Copy link
Copy Markdown
Collaborator
  • refactor vertex-Z equalization and centrality functions from Lambda functions into standard C++ functions (opens the way to using MultModule.h to recalculate centralities in derived data, if the multiplicity values are available)

@github-actions github-actions Bot changed the title Refactor vertex-Z equalization and centrality calculations [Common] Refactor vertex-Z equalization and centrality calculations Nov 18, 2026
@github-actions

Copy link
Copy Markdown

O2 linter results: ❌ 0 errors, ⚠️ 33 warnings, 🔕 0 disabled

@romainschotter
romainschotter marked this pull request as ready for review November 18, 2026 22:02
@alibuild

alibuild commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 34ae697 at 2026-11-19 05:05:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'To reproduce the results below locally, run: '\''aliBuild build O2Physics-code-check -e ALIBUILD_BASE_HASH=upstream/master'\''.'
To reproduce the results below locally, run: 'aliBuild build O2Physics-code-check -e ALIBUILD_BASE_HASH=upstream/master'.
++ echo 'To apply all automatic fixes, add the '\''-e O2PHYSICS_CHECKER_FIX=1'\'' option.'
To apply all automatic fixes, add the '-e O2PHYSICS_CHECKER_FIX=1' option.
++ echo 'See the documentation for more details at: <https://aliceo2group.github.io/analysis-framework/docs/tools/#running-with-o2physics-code-check>.'
See the documentation for more details at: <https://aliceo2group.github.io/analysis-framework/docs/tools/#running-with-o2physics-code-check>.
++ echo 'Found 8 errors and 75 warnings.'
Found 8 errors and 75 warnings.
++ [[ 8 -gt 0 ]]
++ cat /sw/BUILD/88f5b8cbc3357da78014d2e2d4a98361e6c5de4d/O2Physics-code-check/errors.txt
Common/Tools/Multiplicity/MultModule.h:689:19: error: do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-static-cast-downcast,-warnings-as-errors]
Common/Tools/Multiplicity/MultModule.h:690:19: error: do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-static-cast-downcast,-warnings-as-errors]
Common/Tools/Multiplicity/MultModule.h:691:19: error: do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-static-cast-downcast,-warnings-as-errors]
Common/Tools/Multiplicity/MultModule.h:692:19: error: do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-static-cast-downcast,-warnings-as-errors]
Common/Tools/Multiplicity/MultModule.h:693:19: error: do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-static-cast-downcast,-warnings-as-errors]
Common/Tools/Multiplicity/MultModule.h:694:22: error: do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-static-cast-downcast,-warnings-as-errors]
Common/Tools/Multiplicity/MultModule.h:695:25: error: do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-static-cast-downcast,-warnings-as-errors]
Common/Tools/Multiplicity/MultModule.h:696:28: error: do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-static-cast-downcast,-warnings-as-errors]
++ [[ 75 -gt 0 ]]
++ cat /sw/BUILD/88f5b8cbc3357da78014d2e2d4a98361e6c5de4d/O2Physics-code-check/warnings.txt
Common/Tools/Multiplicity/MultModule.h:51:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces]
Common/Tools/Multiplicity/MultModule.h:109:14: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
Common/Tools/Multiplicity/MultModule.h:319:80: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay]
Common/Tools/Multiplicity/MultModule.h:359:5: warning: 'mRunNumber' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer]
Common/Tools/Multiplicity/MultModule.h:360:5: warning: 'mRunNumberCentrality' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer]
Common/Tools/Multiplicity/MultModule.h:361:5: warning: 'lCalibLoaded' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer]
Common/Tools/Multiplicity/MultModule.h:362:5: warning: 'lCalibObjects' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer]
Common/Tools/Multiplicity/MultModule.h:363:5: warning: 'hVtxZFV0A' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer]
Common/Tools/Multiplicity/MultModule.h:364:5: warning: 'hVtxZFT0A' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer]
Common/Tools/Multiplicity/MultModule.h:365:5: warning: 'hVtxZFT0C' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer]
Common/Tools/Multiplicity/MultModule.h:366:5: warning: 'hVtxZFDDA' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer]
Common/Tools/Multiplicity/MultModule.h:367:5: warning: 'hVtxZFDDC' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer]
Common/Tools/Multiplicity/MultModule.h:368:5: warning: 'hVtxZNTracks' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer]
Common/Tools/Multiplicity/MultModule.h:369:5: warning: 'hVtxZNMFTTracks' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer]
Common/Tools/Multiplicity/MultModule.h:370:5: warning: 'hVtxZNGlobalTracks' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer]
Common/Tools/Multiplicity/MultModule.h:396:5: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
Common/Tools/Multiplicity/MultModule.h:428:17: warning: redundant string initialization [readability-redundant-string-init]
Common/Tools/Multiplicity/MultModule.h:431:5: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
Common/Tools/Multiplicity/MultModule.h:435:9: warning: member initializer for 'mCalibrationStored' is redundant [modernize-use-default-member-init]
Common/Tools/Multiplicity/MultModule.h:436:9: warning: member initializer for 'mhMultSelCalib' is redundant [modernize-use-default-member-init]
Common/Tools/Multiplicity/MultModule.h:437:9: warning: member initializer for 'mMCScalePars' is redundant [modernize-use-default-member-init]
Common/Tools/Multiplicity/MultModule.h:438:9: warning: member initializer for 'mMCScale' is redundant [modernize-use-default-member-init]
Common/Tools/Multiplicity/MultModule.h:674:9: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty]
Common/Tools/Multiplicity/MultModule.h:753:13: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty]
Common/Tools/Multiplicity/MultModule.h:927:32: warning: statement should be inside braces [readability-braces-around-statements]
Common/Tools/Multiplicity/MultModule.h:1051:54: warning: statement should be inside braces [readability-braces-around-statements]
[0 more errors; see full log]

Full log here.

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

Labels

Development

Successfully merging this pull request may close these issues.

2 participants