-
Notifications
You must be signed in to change notification settings - Fork 628
Common: RecoDecay: Consider only particles coming from decay process when matching #5407
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
Conversation
Please consider the following formatting changes to AliceO2Group#5407
Please consider the following formatting changes to AliceO2Group#5407
|
Error while checking build/O2Physics/o2 for 196b336 at 2024-03-28 20:22: Full log here. |
|
Error while checking build/O2Physics/o2 for 8311b7e at 2024-03-28 21:22: Full log here. |
|
Hi @ZFederica , please give more details about your suggested changes and why they are needed. This is a core header so we should be very careful what we add and change. For example, we should not need the analysis data model header. |
Hi @vkucera, about the reason for this development (not the technical implementation that I still did not check indeed), is that because of interactions with materials, we have in the Monte Carlo electrons and nuclei that are "daughters" of strange particles, like Xi and Omegas (this is because these particles are decayed by GEANT, that simulates correctly also the interaction with the material). If not added the check of the process that generated these particles, they are counted as decay daughters, and true signals get rejected (while they should not be). |
vkucera
left a comment
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.
- The correct place for checking
getProcessis insidegetDaughters. That is the purpose of that function. It should not be needed to check it anywhere else. - The check should be done
if (checkProcess)which should befalseby default. - You should not remove any existing checks. You can skip the check on too many direct daughters
if (checkProcess).
|
Moving the check inside getDaughters did not work, the build did not fail but I also ended up with 0 candidates matched. If that function is not modified, it also does not make sense to leave the checks on the number of daughters (because I would count "daughters" not coming from the decay and there would be a mismatch in the numbers) |
|
I would try this inside // If the particle is neither the original particle nor coming from a decay, we do nothing and exit.
if (checkProcess && stage != 0 && particle.getProcess() != TMCProcess::kPDecay) {
return;
} |
|
I tried to add these exact lines just before |
|
Please consider the following formatting changes to AliceO2Group#5407
vkucera
left a comment
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.
Thanks @ZFederica , the current version looks very good.
Please see my suggestions.
Co-authored-by: Vít Kučera <vit.kucera@cern.ch>
Please consider the following formatting changes to AliceO2Group#5407
vkucera
left a comment
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.
Thanks @ZFederica , it looks good to me now.
|
Perfect, thanks @vkucera |
|
@ddobrigk This is ready for merging. |
…when matching (AliceO2Group#5407) * Consider only particles coming from decay process when matching * Please consider the following formatting changes * Move a check * Please consider the following formatting changes * Fix a process check * Remove comment * Add template keyword * Fix namespace * Add missing include * Remove header * Remove hard-coded table * Re-arrange * Remove comment * Please consider the following formatting changes * Change cast * Implement requested changes * Remove TMCProcess * Change implementation * Clean * Final changes * Please consider the following formatting changes * Clean * Requested changes * Latest implementation * Please consider the following formatting changes * Update Common/Core/RecoDecay.h Co-authored-by: Vít Kučera <vit.kucera@cern.ch> * Implement requested changes * Please consider the following formatting changes * Change doc order --------- Co-authored-by: ALICE Action Bot <alibuild@cern.ch> Co-authored-by: Vít Kučera <vit.kucera@cern.ch>
…when matching (AliceO2Group#5407) * Consider only particles coming from decay process when matching * Please consider the following formatting changes * Move a check * Please consider the following formatting changes * Fix a process check * Remove comment * Add template keyword * Fix namespace * Add missing include * Remove header * Remove hard-coded table * Re-arrange * Remove comment * Please consider the following formatting changes * Change cast * Implement requested changes * Remove TMCProcess * Change implementation * Clean * Final changes * Please consider the following formatting changes * Clean * Requested changes * Latest implementation * Please consider the following formatting changes * Update Common/Core/RecoDecay.h Co-authored-by: Vít Kučera <vit.kucera@cern.ch> * Implement requested changes * Please consider the following formatting changes * Change doc order --------- Co-authored-by: ALICE Action Bot <alibuild@cern.ch> Co-authored-by: Vít Kučera <vit.kucera@cern.ch>
Check the production process of particles when doing the MC matching (both rec and gen) so that only particles coming from the decay are taken into account. This is optional and can be controlled using the parameter checkProcess, which is by default false (so the default behaviour is not changed wrt the current version of O2Physics).
In particular the check on the process is done using the function
getProcess(), that returnskPDecayfor particles produced in a decay this function. This check is implemented insidegetMatchedMcRecandisMatchedMcGen. Inside these functions the checks on the number of daughters have been removed because they do not allow to properly take into account only the desiderd daughters.