-
Notifications
You must be signed in to change notification settings - Fork 483
Set default DCA in case of propagate call fail #14729
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
|
REQUEST FOR PRODUCTION RELEASES: This will add The following labels are available |
Please consider the following formatting changes to AliceO2Group#14729
|
@ddobrigk thanks, then, for completeness, one should also do the same here:
and here:
Will you add it to this PR or you want me to do this? |
|
Hi @shahor02 indeed you're right, thanks, I can add that shortly! |
Please consider the following formatting changes to AliceO2Group#14729
shahor02
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!
|
@shahor02 Thanks a lot to you for taking a look! I have prepared also a message to the analysers to tell them about this, as there are really many tasks that may be affected due to not checking the return code. I'll send the message once this is merged. |
* Set default DCA in case of propagate call fail * Please consider the following formatting changes * Add missing setter lines for propagateToDCAs * Please consider the following formatting changes --------- Co-authored-by: David Dobrigkeit Chinellato <david.dobrigkeit.chinellato.cern.ch> Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
@shahor02: I have realized that a large number of analysis tasks make use of
propagateToDCAcalls but don't check the maintrue/falsereturn value of the call. These tasks then proceed to use the DCA stored either via something like astd::arrayoro2::dataformats::dca, and in case of a propagation failure, the first option results in undefined behaviour (in case the user did not initialize the floats) and the second results in a fixed value of 0.0f (initialized inDCA.h).In principle, users should check the return code and always initialize their
std::arrays, but in practice, it may be best to protect against this behaviour by creating a default return value (e.g.o2::track::DefaultDCA) and, in case thepropagateToDCAcall fails and the user provided some DCA, set the DCA to this default value. Further, in conformity with the DCA behaviour at analysis, this default value when propagation fails should be large (and not zero): in the propagation task at analysis, we use999.f, so I'd propose to use that value directly as return value in case propagation fails.Notably, the largest impact of this change is for low-p photon conversions (in which deep secondary e+ or e- often fail propagation). The svertexer accepts V0s made using such tracks, but analysis might not, since DCAs could be either uninitialized or set to zero (leading to rejection). Currently, the strangeness builder is safe against this behaviour, but multiple other tasks are not.
Tagging people I discussed this with recently: @njacazio @alcaliva @romainschotter