CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
SOAFrame< T > Class Template Reference

#include <SOARotation.h>

Public Member Functions

constexpr const SOARotation< T > & rotation () const
 
constexpr SOAFrame ()
 
constexpr SOAFrame (T ix, T iy, T iz, SOARotation< T > const &irot)
 
constexpr void toGlobal (T const vx, T const vy, T &ux, T &uy, T &uz) const
 
constexpr void toGlobal (T const vx, T const vy, T const vz, T &ux, T &uy, T &uz) const
 
constexpr void toGlobal (T cxx, T cxy, T cyy, T *gl) const
 
constexpr void toLocal (T const *ge, T &lxx, T &lxy, T &lyy) const
 
constexpr void toLocal (T const vx, T const vy, T const vz, T &ux, T &uy, T &uz) const
 
constexpr T x () const
 
constexpr T y () const
 
constexpr T z () const
 

Private Attributes

T px
 
T py
 
T pz
 
SOARotation< Trot
 

Detailed Description

template<class T>
class SOAFrame< T >

Definition at line 77 of file SOARotation.h.

Constructor & Destructor Documentation

◆ SOAFrame() [1/2]

template<class T>
constexpr SOAFrame< T >::SOAFrame ( )
inlineconstexpr

Definition at line 79 of file SOARotation.h.

79 {}

◆ SOAFrame() [2/2]

template<class T>
constexpr SOAFrame< T >::SOAFrame ( T  ix,
T  iy,
T  iz,
SOARotation< T > const &  irot 
)
inlineconstexpr

Definition at line 81 of file SOARotation.h.

81 : px(ix), py(iy), pz(iz), rot(irot) {}

Member Function Documentation

◆ rotation()

template<class T>
constexpr const SOARotation<T>& SOAFrame< T >::rotation ( void  ) const
inlineconstexpr

Definition at line 83 of file SOARotation.h.

83 { return rot; }

◆ toGlobal() [1/3]

template<class T>
constexpr void SOAFrame< T >::toGlobal ( T const  vx,
T const  vy,
T ux,
T uy,
T uz 
) const
inlineconstexpr

Definition at line 96 of file SOARotation.h.

96  {
97  rot.multiplyInverse(vx, vy, ux, uy, uz);
98  ux += px;
99  uy += py;
100  uz += pz;
101  }

◆ toGlobal() [2/3]

template<class T>
constexpr void SOAFrame< T >::toGlobal ( T const  vx,
T const  vy,
T const  vz,
T ux,
T uy,
T uz 
) const
inlineconstexpr

Definition at line 89 of file SOARotation.h.

89  {
90  rot.multiplyInverse(vx, vy, vz, ux, uy, uz);
91  ux += px;
92  uy += py;
93  uz += pz;
94  }

◆ toGlobal() [3/3]

template<class T>
constexpr void SOAFrame< T >::toGlobal ( T  cxx,
T  cxy,
T  cyy,
T gl 
) const
inlineconstexpr

Definition at line 103 of file SOARotation.h.

103  {
104  auto const &r = rot;
105  gl[0] = r.xx() * (r.xx() * cxx + r.yx() * cxy) + r.yx() * (r.xx() * cxy + r.yx() * cyy);
106  gl[1] = r.xx() * (r.xy() * cxx + r.yy() * cxy) + r.yx() * (r.xy() * cxy + r.yy() * cyy);
107  gl[2] = r.xy() * (r.xy() * cxx + r.yy() * cxy) + r.yy() * (r.xy() * cxy + r.yy() * cyy);
108  gl[3] = r.xx() * (r.xz() * cxx + r.yz() * cxy) + r.yx() * (r.xz() * cxy + r.yz() * cyy);
109  gl[4] = r.xy() * (r.xz() * cxx + r.yz() * cxy) + r.yy() * (r.xz() * cxy + r.yz() * cyy);
110  gl[5] = r.xz() * (r.xz() * cxx + r.yz() * cxy) + r.yz() * (r.xz() * cxy + r.yz() * cyy);
111  }

◆ toLocal() [1/2]

template<class T>
constexpr void SOAFrame< T >::toLocal ( T const *  ge,
T lxx,
T lxy,
T lyy 
) const
inlineconstexpr

Definition at line 113 of file SOARotation.h.

113  {
114  auto const &r = rot;
115 
116  T cxx = ge[0];
117  T cyx = ge[1];
118  T cyy = ge[2];
119  T czx = ge[3];
120  T czy = ge[4];
121  T czz = ge[5];
122 
123  lxx = r.xx() * (r.xx() * cxx + r.xy() * cyx + r.xz() * czx) +
124  r.xy() * (r.xx() * cyx + r.xy() * cyy + r.xz() * czy) + r.xz() * (r.xx() * czx + r.xy() * czy + r.xz() * czz);
125  lxy = r.yx() * (r.xx() * cxx + r.xy() * cyx + r.xz() * czx) +
126  r.yy() * (r.xx() * cyx + r.xy() * cyy + r.xz() * czy) + r.yz() * (r.xx() * czx + r.xy() * czy + r.xz() * czz);
127  lyy = r.yx() * (r.yx() * cxx + r.yy() * cyx + r.yz() * czx) +
128  r.yy() * (r.yx() * cyx + r.yy() * cyy + r.yz() * czy) + r.yz() * (r.yx() * czx + r.yy() * czy + r.yz() * czz);
129  }

◆ toLocal() [2/2]

template<class T>
constexpr void SOAFrame< T >::toLocal ( T const  vx,
T const  vy,
T const  vz,
T ux,
T uy,
T uz 
) const
inlineconstexpr

Definition at line 85 of file SOARotation.h.

85  {
86  rot.multiply(vx - px, vy - py, vz - pz, ux, uy, uz);
87  }

◆ x()

template<class T>
constexpr T SOAFrame< T >::x ( ) const
inlineconstexpr

◆ y()

template<class T>
constexpr T SOAFrame< T >::y ( ) const
inlineconstexpr

◆ z()

template<class T>
constexpr T SOAFrame< T >::z ( ) const
inlineconstexpr

Member Data Documentation

◆ px

template<class T>
T SOAFrame< T >::px
private

◆ py

template<class T>
T SOAFrame< T >::py
private

◆ pz

template<class T>
T SOAFrame< T >::pz
private

◆ rot

template<class T>
SOARotation<T> SOAFrame< T >::rot
private
SOAFrame::pz
T pz
Definition: SOARotation.h:136
SOAFrame::py
T py
Definition: SOARotation.h:136
alignCSCRings.r
r
Definition: alignCSCRings.py:93
T
long double T
Definition: Basic3DVectorLD.h:48
SOAFrame::rot
SOARotation< T > rot
Definition: SOARotation.h:137
SOAFrame::px
T px
Definition: SOARotation.h:136