File indexing completed on 2025-01-18 10:13:55
0001
0002
0003
0004
0005
0006 #ifndef VECGEOM_BASE_SPECIALIZEDTRANSFORMATION3D_H_
0007 #define VECGEOM_BASE_SPECIALIZEDTRANSFORMATION3D_H_
0008
0009 #include "VecGeom/base/Transformation3D.h"
0010
0011 namespace vecgeom {
0012 inline namespace VECGEOM_IMPL_NAMESPACE {
0013
0014
0015
0016
0017
0018 template <TranslationCode trans_code, RotationCode rot_code>
0019 class SpecializedTransformation3D : public Transformation3D {
0020
0021 public:
0022 virtual int MemorySize() const { return sizeof(*this); }
0023
0024
0025
0026
0027
0028 template <typename InputType>
0029 VECGEOM_FORCE_INLINE
0030 VECCORE_ATT_HOST_DEVICE
0031 void Transform(Vector3D<InputType> const &master, Vector3D<InputType> *const local) const
0032 {
0033 this->Transform<trans_code, rot_code, InputType>(master, local);
0034 }
0035
0036
0037
0038
0039 template <TranslationCode, RotationCode code, typename InputType>
0040 VECGEOM_FORCE_INLINE
0041 VECCORE_ATT_HOST_DEVICE
0042 Vector3D<InputType> Transform(Vector3D<InputType> const &master) const
0043 {
0044 return this->Transform<trans_code, rot_code, InputType>(master);
0045 }
0046
0047
0048
0049
0050
0051 template <RotationCode code, typename InputType>
0052 VECGEOM_FORCE_INLINE
0053 VECCORE_ATT_HOST_DEVICE
0054 void TransformDirection(Vector3D<InputType> const &master, Vector3D<InputType> *const local) const
0055 {
0056 this->TransformDirection<code, InputType>(master, local);
0057 }
0058
0059
0060
0061
0062 template <RotationCode code, typename InputType>
0063 VECGEOM_FORCE_INLINE
0064 VECCORE_ATT_HOST_DEVICE
0065 Vector3D<InputType> TransformDirection(Vector3D<InputType> const &master) const
0066 {
0067 return this->TransformDirection<code, InputType>(master);
0068 }
0069 };
0070 }
0071 }
0072
0073 #endif