Skip to content

[PWGJE] Adding a new, comprehensive prompt photon QA task - #18725

Open
smaff92 wants to merge 4 commits into
AliceO2Group:masterfrom
smaff92:master
Open

smaff92 wants to merge 4 commits into
AliceO2Group:masterfrom
smaff92:master

Conversation

@smaff92

@smaff92 smaff92 commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

New prompt photon QA task to check against both clusters and particles, especially to test against new photon-tagged MC productions

@github-actions github-actions Bot added the pwgje label Nov 13, 2026
@github-actions github-actions Bot changed the title Adding a new, comprehensive prompt photon QA task [PWGJE] Adding a new, comprehensive prompt photon QA task Nov 13, 2026
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

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

smaff92 added a commit to smaff92/O2Physics that referenced this pull request Nov 13, 2026
[PWGJE] Please consider the following formatting changes to AliceO2Group#18725
@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 9e099df at 2026-11-13 08:29:

## 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 191 warnings.'
Found 8 errors and 191 warnings.
++ [[ 8 -gt 0 ]]
++ cat /sw/BUILD/0ab1e629c47709721ff0beb6b9af4f6606810317/O2Physics-code-check/errors.txt
PWGJE/Tasks/promptphotonQA.cxx:18:1: error: included header Jet.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/promptphotonQA.cxx:39:1: error: included header sstream is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/promptphotonQA.cxx:61:3: error: no header providing "o2::framework::Service" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/promptphotonQA.cxx:311:12: error: no header providing "std::size_t" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/promptphotonQA.cxx:340:87: error: the parameter 'x' 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]
PWGJE/Tasks/promptphotonQA.cxx:340:99: error: the parameter 'y' 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]
PWGJE/Tasks/promptphotonQA.cxx:774:29: error: redundant explicit casting to the same type 'int64_t' (aka 'long') as the sub-expression, remove this casting [readability-redundant-casting,-warnings-as-errors]
PWGJE/Tasks/promptphotonQA.cxx:1026:29: error: redundant explicit casting to the same type 'int64_t' (aka 'long') as the sub-expression, remove this casting [readability-redundant-casting,-warnings-as-errors]
++ [[ 191 -gt 0 ]]
++ cat /sw/BUILD/0ab1e629c47709721ff0beb6b9af4f6606810317/O2Physics-code-check/warnings.txt
PWGJE/Tasks/promptphotonQA.cxx:55:8: warning: constructor does not initialize these fields: pdg [cppcoreguidelines-pro-type-member-init]
PWGJE/Tasks/promptphotonQA.cxx:172:22: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:176:22: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:183:22: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:190:53: warning: member 'performanceStages' of type 'const std::array<std::string, nPerformanceStages>' (aka 'const array<basic_string<char>, nPerformanceStages>') is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members]
PWGJE/Tasks/promptphotonQA.cxx:198:49: warning: member 'clusterOrigins' of type 'const std::array<std::string, NClusterOrigins>' (aka 'const array<basic_string<char>, NClusterOrigins>') is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members]
PWGJE/Tasks/promptphotonQA.cxx:201:35: warning: member 'analysisEnergyStages' of type 'const std::array<std::string, 7>' (aka 'const array<basic_string<char>, 7>') is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members]
PWGJE/Tasks/promptphotonQA.cxx:311:19: warning: variable 'pos' is not initialized [cppcoreguidelines-init-variables]
PWGJE/Tasks/promptphotonQA.cxx:312:60: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:315:34: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:321:17: warning: use starts_with instead of rfind [modernize-use-starts-ends-with]
PWGJE/Tasks/promptphotonQA.cxx:321:44: warning: use starts_with instead of rfind [modernize-use-starts-ends-with]
PWGJE/Tasks/promptphotonQA.cxx:336:16: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:345:16: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:420:16: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:431:44: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:443:43: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:446:42: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:458:26: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:460:21: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:462:32: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:471:44: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:473:40: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:475:67: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:477:96: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:479:9: warning: boolean expression can be simplified by DeMorgan's theorem [readability-simplify-boolean-expr]
[0 more errors; see full log]

Full log here.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for 9e099df at 2026-11-13 08:29:

## sw/BUILD/O2-latest/log
2026-11-13T08:28:28.068+0100 [61721:140204100783744] [executioncontext.cpp:739] [ERROR] Failed to download output blob e5d511c38df4775d4f73fdda31ac5aa87d7b178a825fada5e12f7c1742efbce2: 13: Blob absent from sink after replication: Object not found
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 0cc2708 at 2026-11-13 08:33:

## 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 190 warnings.'
Found 8 errors and 190 warnings.
++ [[ 8 -gt 0 ]]
++ cat /sw/BUILD/dec8f1a592040b897be0e20770646fc364192c58/O2Physics-code-check/errors.txt
PWGJE/Tasks/promptphotonQA.cxx:18:1: error: included header Jet.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/promptphotonQA.cxx:39:1: error: included header sstream is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/promptphotonQA.cxx:61:3: error: no header providing "o2::framework::Service" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/promptphotonQA.cxx:311:12: error: no header providing "std::size_t" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/promptphotonQA.cxx:340:87: error: the parameter 'x' 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]
PWGJE/Tasks/promptphotonQA.cxx:340:99: error: the parameter 'y' 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]
PWGJE/Tasks/promptphotonQA.cxx:774:29: error: redundant explicit casting to the same type 'int64_t' (aka 'long') as the sub-expression, remove this casting [readability-redundant-casting,-warnings-as-errors]
PWGJE/Tasks/promptphotonQA.cxx:1026:29: error: redundant explicit casting to the same type 'int64_t' (aka 'long') as the sub-expression, remove this casting [readability-redundant-casting,-warnings-as-errors]
++ [[ 190 -gt 0 ]]
++ cat /sw/BUILD/dec8f1a592040b897be0e20770646fc364192c58/O2Physics-code-check/warnings.txt
PWGJE/Tasks/promptphotonQA.cxx:55:8: warning: constructor does not initialize these fields: pdg [cppcoreguidelines-pro-type-member-init]
PWGJE/Tasks/promptphotonQA.cxx:172:22: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:176:22: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:183:22: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:190:53: warning: member 'performanceStages' of type 'const std::array<std::string, nPerformanceStages>' (aka 'const array<basic_string<char>, nPerformanceStages>') is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members]
PWGJE/Tasks/promptphotonQA.cxx:198:49: warning: member 'clusterOrigins' of type 'const std::array<std::string, NClusterOrigins>' (aka 'const array<basic_string<char>, NClusterOrigins>') is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members]
PWGJE/Tasks/promptphotonQA.cxx:201:35: warning: member 'analysisEnergyStages' of type 'const std::array<std::string, 7>' (aka 'const array<basic_string<char>, 7>') is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members]
PWGJE/Tasks/promptphotonQA.cxx:311:19: warning: variable 'pos' is not initialized [cppcoreguidelines-init-variables]
PWGJE/Tasks/promptphotonQA.cxx:312:60: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:315:34: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:321:17: warning: use starts_with instead of rfind [modernize-use-starts-ends-with]
PWGJE/Tasks/promptphotonQA.cxx:321:44: warning: use starts_with instead of rfind [modernize-use-starts-ends-with]
PWGJE/Tasks/promptphotonQA.cxx:336:16: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:345:16: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:420:16: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:431:44: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:443:43: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:446:42: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:458:26: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:460:21: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:462:32: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:471:44: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:473:40: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:475:67: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:477:96: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:479:9: warning: boolean expression can be simplified by DeMorgan's theorem [readability-simplify-boolean-expr]
[0 more errors; see full log]

Full log here.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 3a233ee at 2026-11-13 08:42:

## 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 190 warnings.'
Found 8 errors and 190 warnings.
++ [[ 8 -gt 0 ]]
++ cat /sw/BUILD/a66dc50665448d5821411ed3c01e6b5d1da45daa/O2Physics-code-check/errors.txt
PWGJE/Tasks/promptphotonQA.cxx:18:1: error: included header Jet.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/promptphotonQA.cxx:43:1: error: included header sstream is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/promptphotonQA.cxx:66:3: error: no header providing "o2::framework::Service" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/promptphotonQA.cxx:341:12: error: no header providing "std::size_t" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGJE/Tasks/promptphotonQA.cxx:375:87: error: the parameter 'x' 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]
PWGJE/Tasks/promptphotonQA.cxx:375:99: error: the parameter 'y' 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]
PWGJE/Tasks/promptphotonQA.cxx:842:33: error: redundant explicit casting to the same type 'int64_t' (aka 'long') as the sub-expression, remove this casting [readability-redundant-casting,-warnings-as-errors]
PWGJE/Tasks/promptphotonQA.cxx:1147:33: error: redundant explicit casting to the same type 'int64_t' (aka 'long') as the sub-expression, remove this casting [readability-redundant-casting,-warnings-as-errors]
++ [[ 190 -gt 0 ]]
++ cat /sw/BUILD/a66dc50665448d5821411ed3c01e6b5d1da45daa/O2Physics-code-check/warnings.txt
PWGJE/Tasks/promptphotonQA.cxx:60:8: warning: constructor does not initialize these fields: pdg [cppcoreguidelines-pro-type-member-init]
PWGJE/Tasks/promptphotonQA.cxx:181:22: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:187:22: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:196:22: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:211:53: warning: member 'performanceStages' of type 'const std::array<std::string, nPerformanceStages>' (aka 'const array<basic_string<char>, nPerformanceStages>') is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members]
PWGJE/Tasks/promptphotonQA.cxx:226:50: warning: member 'clusterOrigins' of type 'const std::array<std::string, NClusterOrigins>' (aka 'const array<basic_string<char>, NClusterOrigins>') is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members]
PWGJE/Tasks/promptphotonQA.cxx:229:36: warning: member 'analysisEnergyStages' of type 'const std::array<std::string, 7>' (aka 'const array<basic_string<char>, 7>') is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members]
PWGJE/Tasks/promptphotonQA.cxx:341:19: warning: variable 'pos' is not initialized [cppcoreguidelines-init-variables]
PWGJE/Tasks/promptphotonQA.cxx:342:60: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:346:34: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:354:17: warning: use starts_with instead of rfind [modernize-use-starts-ends-with]
PWGJE/Tasks/promptphotonQA.cxx:354:47: warning: use starts_with instead of rfind [modernize-use-starts-ends-with]
PWGJE/Tasks/promptphotonQA.cxx:370:16: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:381:16: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:464:16: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:476:48: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:488:47: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:492:48: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:504:28: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:507:23: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:510:34: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:521:44: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:523:40: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:525:67: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:527:95: warning: statement should be inside braces [readability-braces-around-statements]
PWGJE/Tasks/promptphotonQA.cxx:529:9: warning: boolean expression can be simplified by DeMorgan's theorem [readability-simplify-boolean-expr]
[0 more errors; see full log]

Full log here.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for 3a233ee at 2026-11-13 08:49:

## sw/BUILD/O2-latest/log
2026-11-13T08:49:05.569+0100 [61521:139880429096576] [executioncontext.cpp:739] [ERROR] Failed to download output blob e5d511c38df4775d4f73fdda31ac5aa87d7b178a825fada5e12f7c1742efbce2: 13: Blob absent from sink after replication: Object not found
ninja: build stopped: subcommand failed.

Full log here.

@nzardosh nzardosh 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, Thanks for the PR. One question is when computing the pT in the isolation cone do you not need to remove the tracks matched to your cluster?

@smaff92

smaff92 commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

Hi @nzardosh,

I understand your point, I was viewing the isolation cone as a strictly more narrow cut than the E/P: I figured that having something that we think is neutral, while having tracks in the same cluster, would then reuse those tracks as a veto against classifying the object as neutral.

This also made me a bit curious of how often this happens, where you have have charged tracks entering the cluster, the cluster survives the E/P veto, the actual charged P from the cluster is above the isolation criteria, and not enough additional tracks in the cone there to cut on the isolation.

To test this, I have simply added added functionality to toggle whether or not to utilize the cluster tracks in the isolation cone to measure the impact of this.

The other issues with the build should now (hopefully) be taken care of.

Best Regards,
Adrian.N

smaff92 added a commit to smaff92/O2Physics that referenced this pull request Nov 13, 2026
[PWGJE] Please consider the following formatting changes to AliceO2Group#18725
[PWGJE] Please consider the following formatting changes to AliceO2Group#18725
@smaff92
smaff92 enabled auto-merge (squash) November 13, 2026 15:36
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