Fix underflow/overflow in EcalVeto's closest cell calc #1410
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.
I am updating ldmx-sw, here are the details.
What are the issues that this addresses?
Part of the #1166
As for the source of the issue, the
recoilPos
is already outside the ECAL, and that's calculated at the SP. However the SP is bigger then the ECAL, so we can have hits that are on the ECAL SP, but are not on the real ECAL. This PR deals with those hits, in a reasonable way with the X position. But to be extra sure we dont reach the underflow and overflow in themapsx
/mapsy
, I also edited thewhile
loopCheck List
Compiling with ASAN build
the problem is gone.