Skip to content

[PWGDQ] Implement variables for multiplicity studies - #18954

Open
axti98 wants to merge 5 commits into
AliceO2Group:masterfrom
axti98:UpdateMultAnalysis
Open

axti98 wants to merge 5 commits into
AliceO2Group:masterfrom
axti98:UpdateMultAnalysis

Conversation

@axti98

@axti98 axti98 commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions github-actions Bot added the pwgdq label Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

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

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 8dbe58d at 2026-11-27 19:40:

## 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 1 errors and 43 warnings.'
Found 1 errors and 43 warnings.
++ [[ 1 -gt 0 ]]
++ cat /sw/BUILD/ff77b2835908f98f0f101105853ff33c76d02e7b/O2Physics-code-check/errors.txt
PWGDQ/Tasks/tableReader_withAssoc.h:356:86: error: no header providing "o2::constants::lhc::LHCRevFreq" is directly included [misc-include-cleaner,-warnings-as-errors]
++ [[ 43 -gt 0 ]]
++ cat /sw/BUILD/ff77b2835908f98f0f101105853ff33c76d02e7b/O2Physics-code-check/warnings.txt
PWGDQ/Core/CutsLibrary.cxx:7893:33: warning: use 'contains' to check for membership [readability-container-contains]
PWGDQ/Core/CutsLibrary.cxx:7923:35: warning: use 'contains' to check for membership [readability-container-contains]
PWGDQ/Core/CutsLibrary.cxx:7930:35: warning: use 'contains' to check for membership [readability-container-contains]
PWGDQ/Core/CutsLibrary.cxx:7941:35: warning: use 'contains' to check for membership [readability-container-contains]
PWGDQ/Core/CutsLibrary.cxx:8294:21: warning: redundant string initialization [readability-redundant-string-init]
PWGDQ/Core/CutsLibrary.cxx:8370:10: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list]
PWGDQ/Core/CutsLibrary.h:123:23: warning: function 'o2::aod::dqcuts::parseJSONAnalysisCompositeCut' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
PWGDQ/Core/CutsLibrary.h:153:37: warning: function 'o2::aod::dqmlcuts::makeLabeledCutsMl' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
PWGDQ/Core/VarManager.cxx:57:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGDQ/Core/VarManager.cxx:58:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGDQ/Core/VarManager.cxx:60:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGDQ/Core/VarManager.cxx:72:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGDQ/Core/VarManager.cxx:98:28: warning: initializer for base class 'TObject' is redundant [readability-redundant-member-init]
PWGDQ/Core/VarManager.cxx:156:14: warning: 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]
PWGDQ/Core/VarManager.cxx:318:5: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGDQ/Core/VarManager.cxx:425:14: warning: 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]
PWGDQ/Core/VarManager.cxx:492:5: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGDQ/Core/VarManager.cxx:3156:14: warning: 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]
PWGDQ/Core/VarManager.cxx:3166:9: warning: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto]
PWGDQ/Core/VarManager.cxx:3167:9: warning: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto]
PWGDQ/Core/VarManager.h:1310:10: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGDQ/Core/VarManager.h:1311:10: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGDQ/Core/VarManager.h:1698:15: warning: function 'VarManager::SetPhiMap' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
PWGDQ/Core/VarManager.h:1729:10: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGDQ/Core/VarManager.h:1733:10: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGDQ/Core/VarManager.h:3611:11: warning: variable 'dcaX' is not initialized [cppcoreguidelines-init-variables]
PWGDQ/Core/VarManager.h:3612:11: warning: variable 'dcaY' is not initialized [cppcoreguidelines-init-variables]
PWGDQ/Core/VarManager.h:4904:14: warning: 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]
PWGDQ/Core/VarManager.h:5646:7: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGDQ/Core/VarManager.h:5649:33: warning: 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]
PWGDQ/Core/VarManager.h:5650:33: warning: 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]
PWGDQ/Core/VarManager.h:7453:9: warning: variable 'pairPhiV' is not initialized [cppcoreguidelines-init-variables]
PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx:3295:8: warning: constructor does not initialize these fields: fCCDB [cppcoreguidelines-pro-type-member-init]
[0 more errors; see full log]

Full log here.

@vkucera

vkucera commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

@axti98 Please fix the error.

Comment thread PWGDQ/Core/VarManager.h
Comment on lines +2786 to +2798
if constexpr (requires { event.multNTracksPV(); event.multNtrkGlobal(); }) {
auto correlationFunc = [](double Ntrk, double Npv) -> double {
// TODO: Find meaningful parameterization for that correlation
// Parameters obtained from fit to data LHC 25 MB
double sigmaNpv = 1.247 + 0.11 * std::pow(Npv, 0.789);
double meanNpv = 0.042 + 0.745 * Npv;

return (Ntrk - meanNpv) / sigmaNpv;
};

values[kMultCorrelationSigma] = correlationFunc(values[kMultNtrkGlobal], values[kVtxNcontribReal]);
}

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.

not an expert on this, but does it make sense to define a lambda function if you use it just once?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good point, no it doesnt

Comment thread PWGDQ/Core/VarManager.h
Comment on lines +2802 to +2803
template <typename T1, typename T2>
void VarManager::FillEventMCMatch(T1 const& collision, T2 const& mcCollision, float* values)

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.

Not sure if this function is needed. I think that calling in sequence the Fill function for the collision and the mccollision one can achieve the same thing. It may require an assumed ordering of the call of FillEvent() and FillMCEvent() which can be dangerous... but also, adding this function opens up the posibility for similar things to be done in different Fill functions which can lead to some confusion. So not sure, I leave it to you.

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