From cd7ff960b06d5f6c0263bd33c4e336929de295ab Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de> Date: Wed, 4 Jan 2023 15:08:28 +0100 Subject: [PATCH] camel case -> ZFrameVector --- Base/Vector/Direction.cpp | 4 ++-- Base/Vector/Direction.h | 2 +- Device/Detector/RectangularDetector.cpp | 2 +- Tests/Unit/Device/RectangularConverterTest.cpp | 2 +- Tests/Unit/Device/SphericalConverterTest.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Base/Vector/Direction.cpp b/Base/Vector/Direction.cpp index 6d644c5b652..5cfdde85b33 100644 --- a/Base/Vector/Direction.cpp +++ b/Base/Vector/Direction.cpp @@ -18,10 +18,10 @@ R3 vecOfLambdaAlphaPhi(double _lambda, double _alpha, double _phi) { - return Direction(_alpha, -_phi).zframe_vector(M_TWOPI / _lambda); + return Direction(_alpha, -_phi).ZFrameVector(M_TWOPI / _lambda); } -R3 Direction::zframe_vector(double length) const +R3 Direction::ZFrameVector(double length) const { return {length * std::cos(m_alpha) * std::cos(m_phi), length * std::cos(m_alpha) * std::sin(m_phi), length * std::sin(m_alpha)}; diff --git a/Base/Vector/Direction.h b/Base/Vector/Direction.h index bf42f95cc21..4f0054fe50c 100644 --- a/Base/Vector/Direction.h +++ b/Base/Vector/Direction.h @@ -36,7 +36,7 @@ public: double phi() const { return m_phi; } //! Returns Cartesian 3D vector, in a frame where alpha=0 is on the +z axis. - R3 zframe_vector(double length) const; + R3 ZFrameVector(double length) const; Direction zReflected() const { return {-m_alpha, m_phi}; } diff --git a/Device/Detector/RectangularDetector.cpp b/Device/Detector/RectangularDetector.cpp index 0b20090f8bd..c066001f65e 100644 --- a/Device/Detector/RectangularDetector.cpp +++ b/Device/Detector/RectangularDetector.cpp @@ -49,7 +49,7 @@ RectangularDetector* RectangularDetector::clone() const void RectangularDetector::setDetectorNormal(const Direction& direction) { - initNormalVector(direction.zframe_vector(1)); + initNormalVector(direction.ZFrameVector(1)); initUandV(-direction.alpha()); } diff --git a/Tests/Unit/Device/RectangularConverterTest.cpp b/Tests/Unit/Device/RectangularConverterTest.cpp index 64fb69aa777..335356902ce 100644 --- a/Tests/Unit/Device/RectangularConverterTest.cpp +++ b/Tests/Unit/Device/RectangularConverterTest.cpp @@ -37,7 +37,7 @@ RectangularConverterTest::RectangularConverterTest() m_detector.setDetectorNormal(m_beam.direction().zReflected()); m_phi = std::atan2(det_width / 2.0, det_distance); m_alpha = std::atan2(det_height, det_distance / std::cos(m_phi)); - const auto k_i = m_beam.direction().zframe_vector(M_TWOPI / m_beam.wavelength()); + const auto k_i = m_beam.direction().ZFrameVector(M_TWOPI / m_beam.wavelength()); m_kiz = -k_i.z(); double K = 2.0 * M_PI / m_beam.wavelength(); m_kfy = K * std::sin(m_phi); diff --git a/Tests/Unit/Device/SphericalConverterTest.cpp b/Tests/Unit/Device/SphericalConverterTest.cpp index 5fdef798bce..95320d47b97 100644 --- a/Tests/Unit/Device/SphericalConverterTest.cpp +++ b/Tests/Unit/Device/SphericalConverterTest.cpp @@ -20,7 +20,7 @@ SphericalConverterTest::SphericalConverterTest() : m_detector(100, 0.0, 5.0 * Units::deg, 70, -2.0 * Units::deg, 1.5) , m_beam(UnitBeam(1.0, 1 * Units::deg)) { - const auto k_i = m_beam.direction().zframe_vector(M_TWOPI / m_beam.wavelength()); + const auto k_i = m_beam.direction().ZFrameVector(M_TWOPI / m_beam.wavelength()); m_kiz = -k_i.z(); const double K = 2.0 * M_PI / m_beam.wavelength(); m_kfy = K * std::sin(5.0 * Units::deg); -- GitLab