Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: avoid division by zero in neutron identification when no Hcal cl…
…uster (#1548) ### Briefly, what does this PR introduce? When there is no Hcal cluster found, then the position is still initialized to zero. Setting the momentum components based on a normalized position fails with a division by zero, see e.g. https://github.com/eic/EICrecon/actions/runs/10237639088/job/28321546895#step:8:6883. This PR requires a cluster in the Hcal for there to be a neutron identification with a momentum direction given by that cluster. This PR also modifies some of the calls to use a vector type, which is semantically cleaner as it reduces the number of independent variables. ### What kind of change does this PR introduce? - [x] Bug fix (issue: division by zero) - [ ] New feature (issue #__) - [ ] Documentation update - [ ] Other: __ ### Please check if this PR fulfills the following: - [ ] Tests for the changes have been added - [ ] Documentation has been added / updated - [x] Changes have been communicated to collaborators: @sebouh137 @ruse-traveler ### Does this PR introduce breaking changes? What changes might users need to make to their code? No. ### Does this PR change default behavior? No.
- Loading branch information