Skip to content

[PWGDQ] Add UPC mode filter for QA matching AO2D output - #18886

Open
nivram-phy wants to merge 7 commits into
AliceO2Group:masterfrom
nivram-phy:add-upc-mode-aod-filter
Open

nivram-phy wants to merge 7 commits into
AliceO2Group:masterfrom
nivram-phy:add-upc-mode-aod-filter

Conversation

@nivram-phy

@nivram-phy nivram-phy commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds cfgUPCMode to control which collision UPC modes are written to QA matching AO2D output.

  • -1 (default): write all collisions
  • 0: write only collisions with qamatching::UPCMode == 0
  • 1: write only collisions with qamatching::UPCMode == 1
  • Any other value logs a warning and behaves as -1

The filter is applied consistently to the event, MCH-track, and candidate output tables. QA histograms and matching processing remain unchanged.

Configuration example

{
  "o2-analysis-qa-matching": {
    "cfgUPCMode": 1
  }
}

@github-actions github-actions Bot added the pwgdq label Nov 24, 2026
@github-actions github-actions Bot changed the title Add UPC mode filter for QA matching AO2D output [PWGDQ] Add UPC mode filter for QA matching AO2D output Nov 24, 2026
@github-actions

Copy link
Copy Markdown

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

@nivram-phy
nivram-phy marked this pull request as draft November 24, 2026 12:04
@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for c4ebf74 at 2026-11-24 13:31:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/qaMatching.cxx:3648:20: error: no match for 'operator!=' (operand types are 'const o2::framework::Configurable<int>' and 'int')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/qaMatching.cxx:3648:39: error: no match for 'operator!=' (operand types are 'const o2::framework::Configurable<int>' and 'int')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/qaMatching.cxx:3653:38: error: no match for 'operator==' (operand types are 'int' and 'const o2::framework::Configurable<int>')
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for c4ebf74 at 2026-11-24 13:32:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/qaMatching.cxx:3648:20: error: no match for 'operator!=' (operand types are 'const o2::framework::Configurable<int>' and 'int')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/qaMatching.cxx:3648:39: error: no match for 'operator!=' (operand types are 'const o2::framework::Configurable<int>' and 'int')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/qaMatching.cxx:3653:38: error: no match for 'operator==' (operand types are 'int' and 'const o2::framework::Configurable<int>')
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for a554a8c at 2026-11-24 13:42:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/qaMatching.cxx:3648:31: error: invalid 'static_cast' from type 'const o2::framework::Configurable<int>' to type 'int'
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for a554a8c at 2026-11-24 13:43:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/qaMatching.cxx:3648:31: error: invalid 'static_cast' from type 'const o2::framework::Configurable<int>' to type 'int'
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for a953d3f at 2026-11-24 13:54:

## 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 67 warnings.'
Found 8 errors and 67 warnings.
++ [[ 8 -gt 0 ]]
++ cat /sw/BUILD/9482a7d0099dbc88c448d3f8aa4c51120006b55b/O2Physics-code-check/errors.txt
PWGDQ/Tasks/qaMatching.cxx:506:18: error: no header providing "o2::vertexing::FwdDCAFitterN" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGDQ/Tasks/qaMatching.cxx:621:58: error: the parameter 'hn' 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]
PWGDQ/Tasks/qaMatching.cxx:727:67: error: the parameter 'hn' 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]
PWGDQ/Tasks/qaMatching.cxx:809:67: error: the parameter 'hn' 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]
PWGDQ/Tasks/qaMatching.cxx:1130:65: error: the parameter 'hn' 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]
PWGDQ/Tasks/qaMatching.cxx:1140:62: error: the parameter 'hn' 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]
PWGDQ/Tasks/qaMatching.cxx:1145:62: error: the parameter 'hn' 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]
PWGDQ/Tasks/qaMatching.cxx:2181:17: error: no header providing "ROOT::Math::XYZVector" is directly included [misc-include-cleaner,-warnings-as-errors]
++ [[ 67 -gt 0 ]]
++ cat /sw/BUILD/9482a7d0099dbc88c448d3f8aa4c51120006b55b/O2Physics-code-check/warnings.txt
PWGDQ/Tasks/qaMatching.cxx:1349:11: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty]
PWGDQ/Tasks/qaMatching.cxx:1349:26: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty]
PWGDQ/Tasks/qaMatching.cxx:1349:41: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1377:11: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty]
PWGDQ/Tasks/qaMatching.cxx:1377:26: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty]
PWGDQ/Tasks/qaMatching.cxx:1377:70: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty]
PWGDQ/Tasks/qaMatching.cxx:1377:86: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1445:14: warning: redundant boolean literal in conditional return statement [readability-simplify-boolean-expr]
PWGDQ/Tasks/qaMatching.cxx:1461:35: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1512:35: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1516:45: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1531:68: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1535:49: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1548:50: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1562:29: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1571:36: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1841:33: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1896:38: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1939:38: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1973:36: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1975:36: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1981:68: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1984:57: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1995:71: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:2011:50: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:2052:38: warning: statement should be inside braces [readability-braces-around-statements]
[0 more errors; see full log]

Full log here.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for c4ebf74 at 2026-11-24 13:58:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/qaMatching.cxx:3648:20: error: no match for 'operator!=' (operand types are 'const o2::framework::Configurable<int>' and 'int')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/qaMatching.cxx:3648:39: error: no match for 'operator!=' (operand types are 'const o2::framework::Configurable<int>' and 'int')
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/qaMatching.cxx:3653:38: error: no match for 'operator==' (operand types are 'int' and 'const o2::framework::Configurable<int>')
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 8097849 at 2026-11-24 14: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 2 errors and 67 warnings.'
Found 2 errors and 67 warnings.
++ [[ 2 -gt 0 ]]
++ cat /sw/BUILD/cf894683822ec5932abe21a3f05064b337b45c77/O2Physics-code-check/errors.txt
PWGDQ/Tasks/qaMatching.cxx:64:1: error: included header Vector3D.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGDQ/Tasks/qaMatching.cxx:2183:17: error: no header providing "ROOT::Math::XYZVector" is directly included [misc-include-cleaner,-warnings-as-errors]
++ [[ 67 -gt 0 ]]
++ cat /sw/BUILD/cf894683822ec5932abe21a3f05064b337b45c77/O2Physics-code-check/warnings.txt
PWGDQ/Tasks/qaMatching.cxx:1351:11: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty]
PWGDQ/Tasks/qaMatching.cxx:1351:26: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty]
PWGDQ/Tasks/qaMatching.cxx:1351:41: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1379:11: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty]
PWGDQ/Tasks/qaMatching.cxx:1379:26: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty]
PWGDQ/Tasks/qaMatching.cxx:1379:70: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty]
PWGDQ/Tasks/qaMatching.cxx:1379:86: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1447:14: warning: redundant boolean literal in conditional return statement [readability-simplify-boolean-expr]
PWGDQ/Tasks/qaMatching.cxx:1463:35: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1514:35: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1518:45: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1533:68: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1537:49: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1550:50: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1564:29: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1573:36: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1843:33: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1898:38: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1941:38: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1975:36: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1977:36: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1983:68: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1986:57: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:1997:71: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:2013:50: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:2054:38: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:2056:80: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:2078:111: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:2084:107: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:2103:36: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:2117:36: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/qaMatching.cxx:2284:30: warning: statement should be inside braces [readability-braces-around-statements]
[0 more errors; see full log]

Full log here.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for a554a8c at 2026-11-24 14:15:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/qaMatching.cxx:3648:31: error: invalid 'static_cast' from type 'const o2::framework::Configurable<int>' to type 'int'
ninja: build stopped: subcommand failed.

Full log here.

@aferrero2707

Copy link
Copy Markdown
Contributor

@nivram-phy looks ok for me.

@mguilbau mguilbau 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 @nivram-phy,
In this PR you include DCAFitter. It is not clear to me where and why you need it
Cheers
Maxime

@nivram-phy

Copy link
Copy Markdown
Contributor Author

Hi @mguilbau

The fitter is already used in getMuMuDecayLength() to reconstruct the secondary vertex from the two muon tracks.

I didn’t introduce this usage. I added the direct header include because the CI code checker reported that no header providing o2::vertexing::FwdDCAFitterN was directly included.

Thanks

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.

4 participants