Skip to content

[ALICE3] Adapt input file handling to new ACTS input format - #17370

Open
lhusova wants to merge 3 commits into
AliceO2Group:masterfrom
lhusova:alice3Dev
Open

[ALICE3] Adapt input file handling to new ACTS input format#17370
lhusova wants to merge 3 commits into
AliceO2Group:masterfrom
lhusova:alice3Dev

Conversation

@lhusova

@lhusova lhusova commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

update of the translator to be consistent with the new ACTS output structure

@github-actions github-actions Bot changed the title Adapt input file handling to new ACTS input format [ALICE3] Adapt input file handling to new ACTS input format Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

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

@njacazio
njacazio marked this pull request as ready for review August 18, 2026 10:36
@alibuild

alibuild commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for c7268d8 at 2026-08-20 04:23:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/ALICE3/TableProducer/alice3TrackingTranslator.cxx:573:19: error: unused variable 'm' [-Werror=unused-variable]
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

alibuild commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for c7268d8 at 2026-08-20 20:20:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 24 errors and 34 warnings.'
Found 24 errors and 34 warnings.
++ [[ 24 -gt 0 ]]
++ cat /sw/BUILD/0d8c3b48ca8c982b8046d4a18460218b390354f0/O2Physics-code-check/errors.txt
ALICE3/TableProducer/alice3TrackingTranslator.cxx:49:1: error: included header algorithm is not used directly [misc-include-cleaner,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:59:9: error: variable 'inputPath' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:110:9: error: function-like macro 'SETADDRESS' used; consider a 'constexpr' template function [cppcoreguidelines-macro-usage,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:111:44: error: macro argument should be enclosed in parentheses [bugprone-macro-parentheses,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:112:58: error: macro argument should be enclosed in parentheses [bugprone-macro-parentheses,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:116:5: error: constructor does not initialize these fields: mTree [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:116:28: error: the parameter 'filename' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:116:50: error: the parameter 'treename' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:140:77: error: parameter 'filename' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:140:87: error: parameter 'treename' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:183:75: error: parameter 'filename' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:183:85: error: parameter 'treename' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:217:74: error: parameter 'filename' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:217:84: error: parameter 'treename' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:291:73: error: parameter 'filename' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:291:83: error: parameter 'treename' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:331:20: error: variable 'file' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:332: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]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:573:19: error: Value stored to 'm' during its initialization is never read [clang-analyzer-deadcode.DeadStores,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:573:19: error: unused variable 'm' [clang-diagnostic-unused-variable,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:587:29: error: no header providing "M_PI" is directly included [misc-include-cleaner,-warnings-as-errors]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:593:42: error: no header providing "o2::constants::math::Almost1" is directly included [misc-include-cleaner,-warnings-as-errors]
ALICE3/Tasks/alice3Strangeness.cxx:60:8: error: constructor does not initialize these fields: appliedSelectionCheckMask, selectionCheck, selectionCheckPos [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
ALICE3/Tasks/alice3Strangeness.cxx:172:13: error: member 'posDaugDCAselIDx' of type 'const int' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]
++ [[ 34 -gt 0 ]]
++ cat /sw/BUILD/0d8c3b48ca8c982b8046d4a18460218b390354f0/O2Physics-code-check/warnings.txt
ALICE3/TableProducer/alice3TrackingTranslator.cxx:300:5: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:301:5: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:475:34: warning: use 'contains' to check for membership [readability-container-contains]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:480:37: warning: use 'contains' to check for membership [readability-container-contains]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:482:15: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:706:31: warning: statement should be inside braces [readability-braces-around-statements]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:708:13: warning: statement should be inside braces [readability-braces-around-statements]
ALICE3/TableProducer/alice3TrackingTranslator.cxx:943:5: warning: use auto when initializing with a template cast to avoid duplicating the type name [modernize-use-auto]
ALICE3/Tasks/alice3Strangeness.cxx:173:20: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
ALICE3/Tasks/alice3Strangeness.cxx:217:11: warning: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto]
ALICE3/Tasks/alice3Strangeness.cxx:443:91: warning: statement should be inside braces [readability-braces-around-statements]
ALICE3/Tasks/alice3Strangeness.cxx:446:91: warning: statement should be inside braces [readability-braces-around-statements]
ALICE3/Tasks/alice3Strangeness.cxx:449:78: warning: statement should be inside braces [readability-braces-around-statements]
ALICE3/Tasks/alice3Strangeness.cxx:452:69: warning: statement should be inside braces [readability-braces-around-statements]
ALICE3/Tasks/alice3Strangeness.cxx:455:158: warning: statement should be inside braces [readability-braces-around-statements]
ALICE3/Tasks/alice3Strangeness.cxx:489:78: warning: statement should be inside braces [readability-braces-around-statements]
[0 more errors; see full log]

Full log here.

@jesgum jesgum left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lhusova I just have some minor suggestions :-)

Comment thread ALICE3/TableProducer/alice3TrackingTranslator.cxx Outdated

histos.fill(HIST("hV0Building"), 3.0);

// TODO: not all ACTS tracks have MC association, so this check is not possible for all candidates, fix is needed

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is maybe beyond the scope of this PR but would it not be possible to wrap this block into

if (posTrack.has_mcParticle() && negTrack.has_mcParticle()) {
 // de-reference mcparticle
}

From what I remember, all ACTS tracks would not necessarily have an associated MC particle, but if that's the case, the index in aod::McTrackLabels could be set to -1 (maybe it is already). Because what has_mcParticle() checks if the index is greater than zero, so we would never enter this block if there is no associated mcParticle

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for c7268d8 at 2026-08-18 17:53:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/ALICE3/TableProducer/alice3TrackingTranslator.cxx:573:19: error: unused variable 'm' [-Werror=unused-variable]
ninja: build stopped: subcommand failed.

Full log here.

njacazio and others added 2 commits August 21, 2026 10:51
Comment out the mass calculation in tracking translator.
Co-authored-by: Jesper Karlsson Gumprecht <113693781+jesgum@users.noreply.github.com>
@njacazio
njacazio enabled auto-merge (squash) August 21, 2026 08:53
@njacazio

Copy link
Copy Markdown
Collaborator

Based on the xp on the LUT maker, I think the best would be to move this to the ACTSO2, the problem would be the table creation, since actsO2 does not depend on O2, but we might find a workaround

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.

4 participants