-
Notifications
You must be signed in to change notification settings - Fork 549
[PWGHF] Add KFParticle Quality Assurance #10972
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
O2 linter results: ❌ 9 errors, |
Hi @Rrantu , such a huge PR deserves some comments.
|
Hi @vkucera , I'm trying to check the resolution of the particles reconstructed using the KFParticle method. For this, I need the information saved in runXic0Omegac0Creator function, Therefore, I’ve added a new tree within the runXic0Omegac0Creator function to store these variables. |
hi @Rrantu, Thanks for the implementation! I have a few comments. See the review |
Hi @Rrantu, Thanks! Please fix the O2 linter issues next time! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Rrantu, thanks for the development! I have however a few comments (some of them follow the doubts raised by @vkucera). You can always retrieve the info about the matching from the "default" table and, if you want to add more flags for matching for intermediate states, you can do it in the MC process function as well without duplicating
Error while checking build/O2Physics/o2 for 3268c45 at 2025-04-25 16:23:
Full log here. |
registry.add("hV0DauPosXPullVsPt", "x_{PULL} vs. p_{T}", HistType::kTH2D, {{20, 0., 20.}, {4000, -20., 20.}}); | ||
registry.add("hV0DauPosYPullVsPt", "y_{PULL} vs. p_{T}", HistType::kTH2D, {{20, 0., 20.}, {4000, -20., 20.}}); | ||
registry.add("hV0DauPosZPullVsPt", "z_{PULL} vs. p_{T}", HistType::kTH2D, {{20, 0., 20.}, {4000, -20., 20.}}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a lot of bins. Please evaluate the extra RAM consumption when running.
@@ -2386,6 +2525,261 @@ struct HfCandidateCreatorXic0Omegac0Mc { | |||
} // close loop on MCCollisions | |||
} // close process | |||
|
|||
template <o2::hf_centrality::CentralityEstimator centEstimator, int decayChannel, typename TMyRecoCand> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
template <o2::hf_centrality::CentralityEstimator centEstimator, int decayChannel, typename TMyRecoCand> | |
template <o2::hf_centrality::CentralityEstimator centEstimator, aod::hf_cand_xic0_omegac0::DecayType decayChannel, typename TMyRecoCand> |
Please fix this elsewhere too.
if constexpr (decayChannel != aod::hf_cand_xic0_omegac0::DecayType::XiczeroToXiPi) { | ||
LOGF(info, "ERROR: Quality validation is restricted to Xic0 → Xi Pi decay processes at this stage"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you want to throw a LOGF(fatal,
here?
if (debug == McMatchFlag::CascUnmatched || debug == McMatchFlag::V0Unmatched) { | ||
LOGF(info, "WARNING: Xic0ToXiPi decays in the expected final state but the condition on the intermediate states are not fulfilled"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use logging and severity properly. Do not write WARNING
, use the correct logging level.
What do you want to do when his happens?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also what is the purpose of the debug
variable? Usually, it's a flag for logging level which is not the case here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @vkucera , thanks for your feedback. I’ve updated the code accordingly, and the debug variable wasn’t needed, so I removed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's still there.
Co-authored-by: Vít Kučera <[email protected]>
…hannel template paramete
if constexpr (decayChannel != aod::hf_cand_xic0_omegac0::DecayType::XiczeroToXiPi) { | ||
LOGF(fatal, "ERROR: Quality validation is restricted to Xic0 → Xi Pi decay processes at this stage"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if constexpr (decayChannel != aod::hf_cand_xic0_omegac0::DecayType::XiczeroToXiPi) { | |
LOGF(fatal, "ERROR: Quality validation is restricted to Xic0 → Xi Pi decay processes at this stage"); | |
} | |
if constexpr (decayChannel != aod::hf_cand_xic0_omegac0::DecayType::XiczeroToXiPi) { | |
LOGF(fatal, "Quality validation is restricted to Xic0 → Xi Pi decay processes at this stage"); | |
} |
- The severity level is already defined with
fatal
. Adding a text "ERROR" is not only redundant but also misleading becauseerror
is a different severity level. - Any sanity check should be done asap before any unrelated calculations.
- The result of this check is known at compile time. Making it fail at run time is too late.
- What is the point of making
decayChannel
a parameter when only one value is valid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the suggestion. The decayChannel selection was already applied before the match, so I have removed the check accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is OK for me, once the comments of @vkucera are also resolved it can be merged
Evaluate the resolution of the particles reconstructed using the KFParticle method.