Skip to content

Commit

Permalink
hypot as well
Browse files Browse the repository at this point in the history
  • Loading branch information
cvarni committed Oct 6, 2024
1 parent a228d7c commit b9577c3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Core/include/Acts/EventData/SpacePointContainer.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ void SpacePointContainer<container_t, holder_t>::initialize() {
m_data.setX(i, external_container.x_impl(i) - m_options.beamPos[0]);
m_data.setY(i, external_container.y_impl(i) - m_options.beamPos[1]);
m_data.setZ(i, external_container.z_impl(i));
m_data.setRadius(
i, std::sqrt(m_data.x(i) * m_data.x(i) + m_data.y(i) * m_data.y(i)));
m_data.setRadius(i, std::hypot(m_data.x(i), m_data.y(i)));
m_data.setPhi(i, std::atan2(m_data.y(i), m_data.x(i)));
m_data.setVarianceR(i, external_container.varianceR_impl(i));
m_data.setVarianceZ(i, external_container.varianceZ_impl(i));
Expand Down

0 comments on commit b9577c3

Please sign in to comment.