Skip to content

[PWGUD] Add collision-associated FIT bit mapping - #18221

Open
sandor-lokos wants to merge 5 commits into
AliceO2Group:masterfrom
sandor-lokos:FITbit_implementation
Open

sandor-lokos wants to merge 5 commits into
AliceO2Group:masterfrom
sandor-lokos:FITbit_implementation

Conversation

@sandor-lokos

Copy link
Copy Markdown
Contributor

Summary

This PR extends the PWGUD FIT-bit feature by explicitly associating the FIT-bit table with UDCollisions.

The main changes are:

  • keep the original table definition as UDCollisionFITBits_000;
  • introduce UDCollisionFITBits_001 with an explicit UDCollisionId;
  • alias UDCollisionFITBits to the new version;
  • update SGCandProducer accordingly;
  • construct the packed words using the actual FT0 and FV0 channel indices instead of positions in the amplitude arrays;
  • correct the documented packed-channel ranges;
  • add a converter from UDCollisionFITBits_000 to UDCollisionFITBits_001;
  • extend upcTestFitBitMapping.cxx to demonstrate the collision association, threshold selection, detector occupancies, fired-channel multiplicities, and FT0 geometry mapping;
  • resolve cppcheck findings in the touched UD helper code and duplicate conditions in sgFITAnalyzer.

The converter between UDCollisionFITBits_000 and UDCollisionFITBits_001 is provided as:

o2-analysis-ud-collision-fit-bits-converter

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

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

@alibuild

alibuild commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for deab52f at 2026-10-08 20:11:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 1 errors and 164 warnings.'
Found 1 errors and 164 warnings.
++ [[ 1 -gt 0 ]]
++ cat /sw/BUILD/521c5b5b684300d78ff858c6894175c8cba4eb55/O2Physics-code-check/errors.txt
PWGUD/TableProducer/Converters/UDCollisionFITBitsConverter.cxx:36:3: error: no header providing "o2::framework::Produces" is directly included [misc-include-cleaner,-warnings-as-errors]
++ [[ 164 -gt 0 ]]
++ cat /sw/BUILD/521c5b5b684300d78ff858c6894175c8cba4eb55/O2Physics-code-check/warnings.txt
PWGUD/Core/UDHelpers.h:207:3: warning: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto]
PWGUD/Core/UDHelpers.h:346:5: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGUD/Core/UDHelpers.h:359:5: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGUD/Core/UDHelpers.h:372:5: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGUD/Core/UDHelpers.h:385:5: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGUD/Core/UDHelpers.h:398:5: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGUD/Core/UDHelpers.h:544:20: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGUD/Core/UDHelpers.h:556:30: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGUD/Core/UDHelpers.h:556:48: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGUD/Core/UDHelpers.h:637:10: warning: implicit conversion 'unsigned long long' -> 'bool' [readability-implicit-bool-conversion]
PWGUD/Core/UDHelpers.h:821:29: warning: statement should be inside braces [readability-braces-around-statements]
PWGUD/Core/UDHelpers.h:824:53: warning: statement should be inside braces [readability-braces-around-statements]
PWGUD/Core/UDHelpers.h:826:53: warning: statement should be inside braces [readability-braces-around-statements]
PWGUD/Core/UDHelpers.h:828:52: warning: statement should be inside braces [readability-braces-around-statements]
PWGUD/Core/UDHelpers.h:830:52: warning: statement should be inside braces [readability-braces-around-statements]
PWGUD/Core/UDHelpers.h:832:53: warning: statement should be inside braces [readability-braces-around-statements]
PWGUD/Core/UDHelpers.h:834:52: warning: statement should be inside braces [readability-braces-around-statements]
PWGUD/Core/UDHelpers.h:836:53: warning: statement should be inside braces [readability-braces-around-statements]
PWGUD/Core/UDHelpers.h:838:53: warning: statement should be inside braces [readability-braces-around-statements]
PWGUD/Core/UDHelpers.h:840:52: warning: statement should be inside braces [readability-braces-around-statements]
PWGUD/Core/UDHelpers.h:842:52: warning: statement should be inside braces [readability-braces-around-statements]
PWGUD/Core/UDHelpers.h:954:5: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGUD/Core/UDHelpers.h:955:51: warning: statement should be inside braces [readability-braces-around-statements]
PWGUD/Core/UDHelpers.h:957:57: warning: statement should be inside braces [readability-braces-around-statements]
PWGUD/Core/UDHelpers.h:959:77: warning: statement should be inside braces [readability-braces-around-statements]
PWGUD/Core/UDHelpers.h:973:5: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGUD/Core/UDHelpers.h:976:48: warning: statement should be inside braces [readability-braces-around-statements]
PWGUD/Core/UDHelpers.h:978:48: warning: statement should be inside braces [readability-braces-around-statements]
PWGUD/Core/UDHelpers.h:998:5: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGUD/Core/UDHelpers.h:999:49: warning: statement should be inside braces [readability-braces-around-statements]
PWGUD/Core/UDHelpers.h:1001:49: warning: statement should be inside braces [readability-braces-around-statements]
PWGUD/Core/UDHelpers.h:1003:49: warning: statement should be inside braces [readability-braces-around-statements]
PWGUD/Core/UDHelpers.h:1005:49: warning: statement should be inside braces [readability-braces-around-statements]
PWGUD/TableProducer/SGCandProducer.cxx:67:9: warning: function-like macro 'getHist' used; consider a 'constexpr' template function [cppcoreguidelines-macro-usage]
PWGUD/TableProducer/SGCandProducer.cxx:67:54: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses]
PWGUD/TableProducer/SGCandProducer.cxx:69:8: warning: constructor does not initialize these fields: ccdb [cppcoreguidelines-pro-type-member-init]
PWGUD/TableProducer/SGCandProducer.cxx:88:29: warning: initializer for member 'sameCuts' is redundant [readability-redundant-member-init]
PWGUD/TableProducer/SGCandProducer.cxx:90:29: warning: initializer for member 'fitCuts' is redundant [readability-redundant-member-init]
PWGUD/TableProducer/SGCandProducer.cxx:231:21: warning: statement should be inside braces [readability-braces-around-statements]
[0 more errors; see full log]

Full log here.

@sandor-lokos
sandor-lokos force-pushed the FITbit_implementation branch from deab52f to 0c1614c Compare October 8, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants