Skip to content

[PWGLF] Fix primary particle selection for predictions#17189

Open
njacazio wants to merge 2 commits into
masterfrom
njacazio-patch-4
Open

[PWGLF] Fix primary particle selection for predictions#17189
njacazio wants to merge 2 commits into
masterfrom
njacazio-patch-4

Conversation

@njacazio

Copy link
Copy Markdown
Collaborator

Removed checks for particle charge and validity, retaining only the physical primary check.

Removed checks for particle charge and validity, retaining only the physical primary check.
@github-actions github-actions Bot added the pwglf label Jul 24, 2026
@github-actions github-actions Bot changed the title Simplify particle validation logic [PWGLF] Simplify particle validation logic Jul 24, 2026
@github-actions

Copy link
Copy Markdown

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

@njacazio njacazio changed the title [PWGLF] Simplify particle validation logic [PWGLF] Fix primary particle selection for predictions Jul 25, 2026
@njacazio
njacazio marked this pull request as ready for review July 25, 2026 13:23
@github-actions github-actions Bot changed the title [PWGLF] Fix primary particle selection for predictions [PWGLF] Fix primary particle selection for predictions Jul 25, 2026
@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 4515c81 at 2026-07-25 15:40:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 31 errors and 0 warnings.'
Found 31 errors and 0 warnings.
++ [[ 31 -gt 0 ]]
++ cat /sw/BUILD/891b010223bdbfd7077bb720c11342e6bfef9a09/O2Physics-code-check/errors.txt
PWGLF/Tasks/QC/mcParticlePrediction.cxx:60:14: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:61:1: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:61:6: error: variable 'enabledParticlesArray' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:88:26: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:120:1: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:120:6: error: variable 'enabledEstimatorsArray' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:121:14: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:143:59: error: variable 'hestimators' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:144:59: error: variable 'hestimatorsVsITS' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:145:59: error: variable 'hestimatorsVsETA05' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:146:59: error: variable 'hestimatorsVsETA08' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:147:59: error: variable 'hestimatorsVsImpactParameter' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:148:59: error: variable 'hestimatorsRecoEvGenVsReco' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:149:59: error: variable 'hestimatorsRecoEvGenVsReco_BCMC' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:150:59: error: variable 'hestimatorsRecoEvGenVsRecoITS' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:151:59: error: variable 'hestimatorsRecoEvRecoVsITS' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:152:59: error: variable 'hestimatorsRecoEvRecoVsRecoITS' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:153:59: error: variable 'hestimatorsRecoEvRecoVsRecoITS_BCMC' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:154:59: error: variable 'hestimatorsRecoEvRecoVsFT0A' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:155:59: error: variable 'hestimatorsRecoEvRecoVsBCId' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:156:59: error: variable 'hestimatorsRecoEvVsBCId' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:157:59: error: variable 'hvertexPosZ' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:158:93: error: variable 'hpt' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:159:93: error: variable 'hyield' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:161:8: error: constructor does not initialize these fields: pdgDB [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:176:51: error: 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,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:179:54: error: 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,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:391:5: error: uninitialized record type: 'nMult' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:663:5: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGLF/Tasks/QC/mcParticlePrediction.cxx:675:5: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGLF/Utils/inelGt.h:117:11: error: using integer absolute value function 'abs' when argument is of floating point type [clang-diagnostic-absolute-value,-warnings-as-errors]
++ [[ 0 -gt 0 ]]
++ [[ 31 -gt 0 ]]
++ exit 1
--

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.

3 participants