Loading src/core/geometry/DetectorField.hpp +0 −13 Original line number Diff line number Diff line Loading @@ -75,19 +75,6 @@ namespace allpix { */ template <typename T> void flip_vector_components(T& field, bool x, bool y); /* * Vector field template specialization of helper function for field flipping */ template <> inline void flip_vector_components<ROOT::Math::XYZVector>(ROOT::Math::XYZVector& vec, bool x, bool y) { vec.SetXYZ((x ? -vec.x() : vec.x()), (y ? -vec.y() : vec.y()), vec.z()); } /* * Scalar field template specialization of helper function for field flipping * Here, no inversion of the field components is required */ template <> inline void flip_vector_components<double>(double&, bool, bool) {} /** * @brief Field instance of a detector * Loading src/core/geometry/DetectorField.tpp +22 −0 Original line number Diff line number Diff line Loading @@ -256,4 +256,26 @@ namespace allpix { function_ = std::move(function); type_ = type; } /* * Vector field template specialization of helper function for field flipping */ template <> inline void flip_vector_components<ROOT::Math::XYZVector>(ROOT::Math::XYZVector& vec, bool x, bool y) { vec.SetXYZ((x ? -vec.x() : vec.x()), (y ? -vec.y() : vec.y()), vec.z()); } /* * Map field template specialization of helper function for field flipping. * This swaps the entries of the 5x5 map depending on whether it is flipped in that coordinate */ template <> inline void flip_vector_components<std::array<double, 25>>(std::array<double, 25>&, bool, bool) { // FIXME need to flip map components here } /* * Scalar field template specialization of helper function for field flipping * Here, no inversion of the field components is required */ template <> inline void flip_vector_components<double>(double&, bool, bool) {} } // namespace allpix Loading
src/core/geometry/DetectorField.hpp +0 −13 Original line number Diff line number Diff line Loading @@ -75,19 +75,6 @@ namespace allpix { */ template <typename T> void flip_vector_components(T& field, bool x, bool y); /* * Vector field template specialization of helper function for field flipping */ template <> inline void flip_vector_components<ROOT::Math::XYZVector>(ROOT::Math::XYZVector& vec, bool x, bool y) { vec.SetXYZ((x ? -vec.x() : vec.x()), (y ? -vec.y() : vec.y()), vec.z()); } /* * Scalar field template specialization of helper function for field flipping * Here, no inversion of the field components is required */ template <> inline void flip_vector_components<double>(double&, bool, bool) {} /** * @brief Field instance of a detector * Loading
src/core/geometry/DetectorField.tpp +22 −0 Original line number Diff line number Diff line Loading @@ -256,4 +256,26 @@ namespace allpix { function_ = std::move(function); type_ = type; } /* * Vector field template specialization of helper function for field flipping */ template <> inline void flip_vector_components<ROOT::Math::XYZVector>(ROOT::Math::XYZVector& vec, bool x, bool y) { vec.SetXYZ((x ? -vec.x() : vec.x()), (y ? -vec.y() : vec.y()), vec.z()); } /* * Map field template specialization of helper function for field flipping. * This swaps the entries of the 5x5 map depending on whether it is flipped in that coordinate */ template <> inline void flip_vector_components<std::array<double, 25>>(std::array<double, 25>&, bool, bool) { // FIXME need to flip map components here } /* * Scalar field template specialization of helper function for field flipping * Here, no inversion of the field components is required */ template <> inline void flip_vector_components<double>(double&, bool, bool) {} } // namespace allpix