[PWGLF] fixed all O2 linter warnings and added eventcorrection histograms - #17498
Merged
Conversation
bhattdurgesh921-sys
requested review from
alibuild,
dmallick2,
mpuccio,
omvazque,
prottayCMT,
skundu692 and
smaff92
as code owners
August 18, 2026 12:54
|
O2 linter results: ❌ 0 errors, |
mpuccio
approved these changes
Aug 18, 2026
mpuccio
enabled auto-merge (squash)
August 18, 2026 13:03
vkucera
reviewed
Aug 18, 2026
vkucera
left a comment
Collaborator
There was a problem hiding this comment.
Hi @bhattdurgesh921-sys , thanks a lot for the fixes. Please see my suggestions.
Comment on lines
-63
to
+65
| constexpr float massProton = o2::constants::physics::MassProton; | ||
| constexpr float massPion = o2::constants::physics::MassPionCharged; | ||
| constexpr float minAbsCharge = 1e-3f; | ||
| constexpr float MassProton = o2::constants::physics::MassProton; | ||
| constexpr float MassPion = o2::constants::physics::MassPionCharged; | ||
| constexpr float MinAbsCharge = 1e-3f; |
Collaborator
There was a problem hiding this comment.
The constants defined here are not needed. You can use the existing ones directly.
| constexpr float MassProton = o2::constants::physics::MassProton; | ||
| constexpr float MassPion = o2::constants::physics::MassPionCharged; | ||
| constexpr float MinAbsCharge = 1e-3f; | ||
| const std::array<float, 2> kProtonPionMasses{MassProton, MassPion}; |
Collaborator
There was a problem hiding this comment.
The k prefix is used only in ROOT, not in O2.
Suggested change
| const std::array<float, 2> kProtonPionMasses{MassProton, MassPion}; | |
| const std::array<float, 2> protonPionMasses{MassProton, MassPion}; |
Comment on lines
-1639
to
+1650
| const bool hasAcceptedReco = acceptedMcCollisionIds.contains(mcCollision.globalIndex()); | ||
| const auto itCent = acceptedMcCollisionRecoCent.find(mcCollision.globalIndex()); | ||
| const bool hasAcceptedReco = (itCent != acceptedMcCollisionRecoCent.end()); |
Collaborator
There was a problem hiding this comment.
This looks like a regression. unordered_map does have contains.
Collaborator
|
Error while checking build/O2Physics/code-check for 93e65bb at 2026-08-18 18:37: Full log here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dear @vkucera @dmallick2 ,
n this PR, we have addressed and fixed all the O2 linter warnings. We have also added the histograms required for the event-loss calculation.
Thank you for your review and feedback.