CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
TkRotation< T > Class Template Reference

#include <newTkRotation.h>

Public Types

typedef Basic3DVector< TBasicVector
 
typedef Vector3DBase< T,
GlobalTag
GlobalVector
 
typedef Vector3DBase< T,
GlobalTag
GlobalVector
 

Public Member Functions

Basic3DVector< TmultiplyInverse (const Basic3DVector< T > &v) const
 
template<class Scalar >
Basic3DVector< Scalar > multiplyInverse (const Basic3DVector< Scalar > &v) const
 
Basic3DVector< TmultiplyInverse (const Basic2DVector< T > &v) const
 
Basic3DVector< TmultiplyInverse (const Basic3DVector< T > &v) const
 
template<class Scalar >
Basic3DVector< Scalar > multiplyInverse (const Basic3DVector< Scalar > &v) const
 
TkRotation multiplyInverse (const TkRotation &b) const
 
Basic3DVector< TmultiplyInverse (const Basic2DVector< T > &v) const
 
TkRotation multiplyInverse (const TkRotation &b) const
 
Basic3DVector< Toperator* (const Basic3DVector< T > &v) const
 
Basic3DVector< Toperator* (const Basic2DVector< T > &v) const
 
Basic3DVector< Toperator* (const Basic3DVector< T > &v) const
 
TkRotation operator* (const TkRotation &b) const
 
Basic3DVector< Toperator* (const Basic2DVector< T > &v) const
 
TkRotation operator* (const TkRotation &b) const
 
TkRotationoperator*= (const TkRotation &b)
 
TkRotationoperator*= (const TkRotation &b)
 
Basic3DVector< Trotate (const Basic3DVector< T > &v) const
 
TkRotationrotateAxes (const Basic3DVector< T > &newX, const Basic3DVector< T > &newY, const Basic3DVector< T > &newZ)
 
TkRotationrotateAxes (const Basic3DVector< T > &newX, const Basic3DVector< T > &newY, const Basic3DVector< T > &newZ)
 
Basic3DVector< TrotateBack (const Basic3DVector< T > &v) const
 
 TkRotation ()
 
 TkRotation (T xx, T xy, T xz, T yx, T yy, T yz, T zx, T zy, T zz)
 
 TkRotation ()
 
 TkRotation (mathSSE::Rot3< T > const &irot)
 
 TkRotation (T xx, T xy, T xz, T yx, T yy, T yz, T zx, T zy, T zz)
 
 TkRotation (const T *p)
 
 TkRotation (const T *p)
 
 TkRotation (const GlobalVector &aX, const GlobalVector &aY)
 
 TkRotation (const GlobalVector &aX, const GlobalVector &aY)
 
 TkRotation (const BasicVector &aX, const BasicVector &aY)
 
 TkRotation (const GlobalVector &aX, const GlobalVector &aY, const GlobalVector &aZ)
 
 TkRotation (const GlobalVector &uX, const GlobalVector &uY, const GlobalVector &uZ)
 
 TkRotation (const Basic3DVector< T > &axis, T phi)
 
 TkRotation (const BasicVector &uX, const BasicVector &uY, const BasicVector &uZ)
 
 TkRotation (const Basic3DVector< T > &axis, T phi)
 
template<typename U >
 TkRotation (const TkRotation< U > &a)
 
template<typename U >
 TkRotation (const TkRotation< U > &a)
 
TkRotationtransform (const TkRotation &b)
 
TkRotationtransform (const TkRotation &b)
 
TkRotation transposed () const
 
TkRotation transposed () const
 
Basic3DVector< Tx () const
 
Basic3DVector< Tx () const
 
T const & xx () const
 
T xx () const
 
T const & xy () const
 
T xy () const
 
T const & xz () const
 
T xz () const
 
Basic3DVector< Ty () const
 
Basic3DVector< Ty () const
 
T const & yx () const
 
T yx () const
 
T const & yy () const
 
T yy () const
 
T const & yz () const
 
T yz () const
 
Basic3DVector< Tz () const
 
Basic3DVector< Tz () const
 
T const & zx () const
 
T zx () const
 
T const & zy () const
 
T zy () const
 
T const & zz () const
 
T zz () const
 

Private Attributes

T R11
 
T R12
 
T R13
 
T R21
 
T R22
 
T R23
 
T R31
 
T R32
 
T R33
 
mathSSE::Rot3< Trot
 

Detailed Description

template<class T>
class TkRotation< T >

Rotaion matrix used by Surface.

Definition at line 13 of file newTkRotation.h.

Member Typedef Documentation

template<class T>
typedef Basic3DVector<T> TkRotation< T >::BasicVector

Definition at line 36 of file newTkRotation.h.

template<class T>
typedef Vector3DBase< T, GlobalTag> TkRotation< T >::GlobalVector

Definition at line 31 of file oldTkRotation.h.

template<class T>
typedef Vector3DBase< T, GlobalTag> TkRotation< T >::GlobalVector

Definition at line 35 of file newTkRotation.h.

Constructor & Destructor Documentation

template<class T>
TkRotation< T >::TkRotation ( )
inline
template<class T>
TkRotation< T >::TkRotation ( mathSSE::Rot3< T > const &  irot)
inline

Definition at line 39 of file newTkRotation.h.

39 : rot(irot){}
mathSSE::Rot3< T > rot
template<class T>
TkRotation< T >::TkRotation ( T  xx,
T  xy,
T  xz,
T  yx,
T  yy,
T  yz,
T  zx,
T  zy,
T  zz 
)
inline

Definition at line 41 of file newTkRotation.h.

41  :
42  rot(xx,xy,xz, yx,yy,yz, zx, zy,zz){}
T xx() const
T yx() const
mathSSE::Rot3< T > rot
T zx() const
T xy() const
T zz() const
T zy() const
T yy() const
T xz() const
T yz() const
template<class T>
TkRotation< T >::TkRotation ( const T p)
inline

Definition at line 44 of file newTkRotation.h.

44  :
45  rot(p[0],p[1],p[2],
46  p[3],p[4],p[5],
47  p[6],p[7],p[8]) {}
mathSSE::Rot3< T > rot
template<class T>
TkRotation< T >::TkRotation ( const GlobalVector aX,
const GlobalVector aY 
)
inline

Definition at line 49 of file newTkRotation.h.

49  {
50 
51  GlobalVector uX = aX.unit();
52  GlobalVector uY = aY.unit();
53  GlobalVector uZ(uX.cross(uY));
54 
55  rot.axis[0]= uX.basicVector().v;
56  rot.axis[1]= uY.basicVector().v;
57  rot.axis[2]= uZ.basicVector().v;
58 
59  }
mathSSE::Rot3< T > rot
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:119
mathSSE::Vec4< T > v
Vector3DBase unit() const
Definition: Vector3DBase.h:57
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
template<class T>
TkRotation< T >::TkRotation ( const BasicVector aX,
const BasicVector aY 
)
inline

Definition at line 61 of file newTkRotation.h.

61  {
62 
63  BasicVector uX = aX.unit();
64  BasicVector uY = aY.unit();
65  BasicVector uZ(uX.cross(uY));
66 
67  rot.axis[0]= uX.v;
68  rot.axis[1]= uY.v;
69  rot.axis[2]= uZ.v;
70 
71  }
Basic3DVector< T > BasicVector
Definition: newTkRotation.h:36
mathSSE::Rot3< T > rot
template<class T>
TkRotation< T >::TkRotation ( const GlobalVector uX,
const GlobalVector uY,
const GlobalVector uZ 
)
inline

Construct from global vectors of the x, y and z axes. The axes are assumed to be unit vectors forming a right-handed orthonormal basis. No checks are performed!

Definition at line 78 of file newTkRotation.h.

79  {
80  rot.axis[0]= uX.basicVector().v;
81  rot.axis[1]= uY.basicVector().v;
82  rot.axis[2]= uZ.basicVector().v;
83  }
mathSSE::Rot3< T > rot
mathSSE::Vec4< T > v
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
template<class T>
TkRotation< T >::TkRotation ( const BasicVector uX,
const BasicVector uY,
const BasicVector uZ 
)
inline

Definition at line 85 of file newTkRotation.h.

86  {
87  rot.axis[0]= uX.v;
88  rot.axis[1]= uY.v;
89  rot.axis[2]= uZ.v;
90  }
mathSSE::Rot3< T > rot
template<class T>
TkRotation< T >::TkRotation ( const Basic3DVector< T > &  axis,
T  phi 
)
inline

rotation around abritrary axis by the amount of phi: its constructed by O^-1(z<->axis) rot_z(phi) O(z<->axis) the frame is rotated such that the z-asis corresponds to the rotation axis desired. THen it's rotated round the "new" z-axis, and then the initial transformation is "taken back" again. unfortuately I'm too stupid to describe such thing directly by 3 Euler angles.. hence I have to construckt it this way...by brute force

Definition at line 101 of file newTkRotation.h.

101  :
102  rot( cos(phi), sin(phi), 0,
103  -sin(phi), cos(phi), 0,
104  0, 0, 1) {
105 
106  //rotation around the z-axis by phi
107  TkRotation tmpRotz ( cos(axis.phi()), sin(axis.phi()), 0.,
108  -sin(axis.phi()), cos(axis.phi()), 0.,
109  0., 0., 1. );
110  //rotation around y-axis by theta
111  TkRotation tmpRoty ( cos(axis.theta()), 0.,-sin(axis.theta()),
112  0., 1., 0.,
113  sin(axis.theta()), 0., cos(axis.theta()) );
114  (*this)*=tmpRoty;
115  (*this)*=tmpRotz; // = this * tmpRoty * tmpRotz
116 
117  // (tmpRoty * tmpRotz)^-1 * this * tmpRoty * tmpRotz
118 
119  *this = (tmpRoty*tmpRotz).multiplyInverse(*this);
120 
121  }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
Geom::Phi< T > phi() const
mathSSE::Rot3< T > rot
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Basic3DVector< T > multiplyInverse(const Basic3DVector< T > &v) const
Definition: DDAxes.h:10
template<class T>
template<typename U >
TkRotation< T >::TkRotation ( const TkRotation< U > &  a)
inline

Definition at line 156 of file newTkRotation.h.

156  :
157  rot (a.xx(), a.xy(), a.xz(),
158  a.yx(), a.yy(), a.yz(),
159  a.zx(), a.zy(), a.zz()) {}
T xx() const
T yx() const
mathSSE::Rot3< T > rot
T zx() const
T xy() const
T zz() const
T zy() const
T yy() const
T xz() const
T yz() const
template<class T>
TkRotation< T >::TkRotation ( )
inline

Definition at line 33 of file oldTkRotation.h.

33  :
34  R11( 1), R12( 0), R13( 0),
35  R21( 0), R22( 1), R23( 0),
36  R31( 0), R32( 0), R33( 1) {}
template<class T>
TkRotation< T >::TkRotation ( T  xx,
T  xy,
T  xz,
T  yx,
T  yy,
T  yz,
T  zx,
T  zy,
T  zz 
)
inline

Definition at line 38 of file oldTkRotation.h.

38  :
39  R11(xx), R12(xy), R13(xz),
40  R21(yx), R22(yy), R23(yz),
41  R31(zx), R32(zy), R33(zz) {}
T xx() const
T yx() const
T zx() const
T xy() const
T zz() const
T zy() const
T yy() const
T xz() const
T yz() const
template<class T>
TkRotation< T >::TkRotation ( const T p)
inline

Definition at line 43 of file oldTkRotation.h.

43  :
44  R11(p[0]), R12(p[1]), R13(p[2]),
45  R21(p[3]), R22(p[4]), R23(p[5]),
46  R31(p[6]), R32(p[7]), R33(p[8]) {}
template<class T>
TkRotation< T >::TkRotation ( const GlobalVector aX,
const GlobalVector aY 
)
inline

Definition at line 48 of file oldTkRotation.h.

48  {
49 
50  GlobalVector uX = aX.unit();
51  GlobalVector uY = aY.unit();
52  GlobalVector uZ(uX.cross(uY));
53 
54  R11 = uX.x(); R12 = uX.y(); R13 = uX.z();
55  R21 = uY.x(); R22 = uY.y(); R23 = uY.z();
56  R31 = uZ.x(); R32 = uZ.y(); R33 = uZ.z();
57 
58  }
T y() const
Definition: PV3DBase.h:62
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:119
T z() const
Definition: PV3DBase.h:63
Vector3DBase unit() const
Definition: Vector3DBase.h:57
T x() const
Definition: PV3DBase.h:61
template<class T>
TkRotation< T >::TkRotation ( const GlobalVector aX,
const GlobalVector aY,
const GlobalVector aZ 
)
inline

Construct from global vectors of the x, y and z axes. The axes are assumed to be unit vectors forming a right-handed orthonormal basis. No checks are performed!

Definition at line 64 of file oldTkRotation.h.

65  :
66  R11( aX.x()), R12( aX.y()), R13( aX.z()),
67  R21( aY.x()), R22( aY.y()), R23( aY.z()),
68  R31( aZ.x()), R32( aZ.y()), R33( aZ.z()) {}
T y() const
Definition: PV3DBase.h:62
T z() const
Definition: PV3DBase.h:63
T x() const
Definition: PV3DBase.h:61
template<class T>
TkRotation< T >::TkRotation ( const Basic3DVector< T > &  axis,
T  phi 
)
inline

rotation around abritrary axis by the amount of phi: its constructed by O^-1(z<->axis) rot_z(phi) O(z<->axis) the frame is rotated such that the z-asis corresponds to the rotation axis desired. THen it's rotated round the "new" z-axis, and then the initial transformation is "taken back" again. unfortuately I'm too stupid to describe such thing directly by 3 Euler angles.. hence I have to construckt it this way...by brute force

Definition at line 79 of file oldTkRotation.h.

79  :
80  R11( cos(phi) ), R12( sin(phi)), R13( 0),
81  R21( -sin(phi)), R22( cos(phi)), R23( 0),
82  R31( 0), R32( 0), R33( 1) {
83 
84  //rotation around the z-axis by phi
85  TkRotation tmpRotz ( cos(axis.phi()), sin(axis.phi()), 0.,
86  -sin(axis.phi()), cos(axis.phi()), 0.,
87  0., 0., 1. );
88  //rotation around y-axis by theta
89  TkRotation tmpRoty ( cos(axis.theta()), 0.,-sin(axis.theta()),
90  0., 1., 0.,
91  sin(axis.theta()), 0., cos(axis.theta()) );
92  (*this)*=tmpRoty;
93  (*this)*=tmpRotz; // = this * tmpRoty * tmpRotz
94 
95  // (tmpRoty * tmpRotz)^-1 * this * tmpRoty * tmpRotz
96 
97  *this = (tmpRoty*tmpRotz).multiplyInverse(*this);
98 
99  }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
Geom::Phi< T > phi() const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Basic3DVector< T > multiplyInverse(const Basic3DVector< T > &v) const
Definition: DDAxes.h:10
template<class T>
template<typename U >
TkRotation< T >::TkRotation ( const TkRotation< U > &  a)
inline

Definition at line 134 of file oldTkRotation.h.

134  :
135  R11(a.xx()), R12(a.xy()), R13(a.xz()),
136  R21(a.yx()), R22(a.yy()), R23(a.yz()),
137  R31(a.zx()), R32(a.zy()), R33(a.zz()) {}
T xx() const
T yx() const
T zx() const
T xy() const
T zz() const
T zy() const
T yy() const
T xz() const
T yz() const

Member Function Documentation

template<class T>
Basic3DVector<T> TkRotation< T >::multiplyInverse ( const Basic3DVector< T > &  v) const
inline

Definition at line 151 of file oldTkRotation.h.

151  {
152  return Basic3DVector<T>( R11*v.x() + R21*v.y() + R31*v.z(),
153  R12*v.x() + R22*v.y() + R32*v.z(),
154  R13*v.x() + R23*v.y() + R33*v.z());
155  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
template<class T>
template<class Scalar >
Basic3DVector<Scalar> TkRotation< T >::multiplyInverse ( const Basic3DVector< Scalar > &  v) const
inline

Definition at line 159 of file oldTkRotation.h.

159  {
160  return Basic3DVector<Scalar>( R11*v.x() + R21*v.y() + R31*v.z(),
161  R12*v.x() + R22*v.y() + R32*v.z(),
162  R13*v.x() + R23*v.y() + R33*v.z());
163  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
template<class T>
Basic3DVector<T> TkRotation< T >::multiplyInverse ( const Basic2DVector< T > &  v) const
inline

Definition at line 171 of file oldTkRotation.h.

171  {
172  return Basic3DVector<T>( R11*v.x() + R21*v.y(),
173  R12*v.x() + R22*v.y(),
174  R13*v.x() + R23*v.y());
175  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
template<class T>
Basic3DVector<T> TkRotation< T >::multiplyInverse ( const Basic3DVector< T > &  v) const
inline
template<class T>
template<class Scalar >
Basic3DVector<Scalar> TkRotation< T >::multiplyInverse ( const Basic3DVector< Scalar > &  v) const
inline

Definition at line 183 of file newTkRotation.h.

183  {
184  return Basic3DVector<Scalar>( xx()*v.x() + yx()*v.y() + zx()*v.z(),
185  xy()*v.x() + yy()*v.y() + zy()*v.z(),
186  xz()*v.x() + yz()*v.y() + zz()*v.z());
187  }
T xx() const
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T yx() const
T zx() const
T xy() const
T zz() const
T z() const
Cartesian z coordinate.
T zy() const
T yy() const
T xz() const
T yz() const
template<class T>
TkRotation TkRotation< T >::multiplyInverse ( const TkRotation< T > &  b) const
inline

Definition at line 191 of file oldTkRotation.h.

191  {
192  return TkRotation(R11*b.R11 + R21*b.R21 + R31*b.R31,
193  R11*b.R12 + R21*b.R22 + R31*b.R32,
194  R11*b.R13 + R21*b.R23 + R31*b.R33,
195  R12*b.R11 + R22*b.R21 + R32*b.R31,
196  R12*b.R12 + R22*b.R22 + R32*b.R32,
197  R12*b.R13 + R22*b.R23 + R32*b.R33,
198  R13*b.R11 + R23*b.R21 + R33*b.R31,
199  R13*b.R12 + R23*b.R22 + R33*b.R32,
200  R13*b.R13 + R23*b.R23 + R33*b.R33);
201  }
template<class T>
Basic3DVector<T> TkRotation< T >::multiplyInverse ( const Basic2DVector< T > &  v) const
inline

Definition at line 194 of file newTkRotation.h.

194  {
195  return Basic3DVector<T>( xx()*v.x() + yx()*v.y(),
196  xy()*v.x() + yy()*v.y(),
197  xz()*v.x() + yz()*v.y());
198  }
T xx() const
T yx() const
T xy() const
T yy() const
T y() const
Cartesian y coordinate.
T xz() const
T yz() const
T x() const
Cartesian x coordinate.
template<class T>
TkRotation TkRotation< T >::multiplyInverse ( const TkRotation< T > &  b) const
inline

Definition at line 205 of file newTkRotation.h.

205  {
206  return rot.transpose()*b.rot;
207  }
mathSSE::Rot3< T > rot
template<class T>
Basic3DVector<T> TkRotation< T >::operator* ( const Basic3DVector< T > &  v) const
inline

Definition at line 145 of file oldTkRotation.h.

145  {
146  return Basic3DVector<T>( R11*v.x() + R12*v.y() + R13*v.z(),
147  R21*v.x() + R22*v.y() + R23*v.z(),
148  R31*v.x() + R32*v.y() + R33*v.z());
149  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T z() const
Cartesian z coordinate.
template<class T>
Basic3DVector<T> TkRotation< T >::operator* ( const Basic2DVector< T > &  v) const
inline

Definition at line 166 of file oldTkRotation.h.

166  {
167  return Basic3DVector<T>( R11*v.x() + R12*v.y(),
168  R21*v.x() + R22*v.y(),
169  R31*v.x() + R32*v.y());
170  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
template<class T>
Basic3DVector<T> TkRotation< T >::operator* ( const Basic3DVector< T > &  v) const
inline

Definition at line 174 of file newTkRotation.h.

Referenced by TkRotation< align::Scalar >::operator*=().

174  {
175  return rot.rotate(v.v);
176  }
mathSSE::Rot3< T > rot
mathSSE::Vec4< T > v
template<class T>
TkRotation TkRotation< T >::operator* ( const TkRotation< T > &  b) const
inline

Definition at line 179 of file oldTkRotation.h.

179  {
180  return TkRotation(R11*b.R11 + R12*b.R21 + R13*b.R31,
181  R11*b.R12 + R12*b.R22 + R13*b.R32,
182  R11*b.R13 + R12*b.R23 + R13*b.R33,
183  R21*b.R11 + R22*b.R21 + R23*b.R31,
184  R21*b.R12 + R22*b.R22 + R23*b.R32,
185  R21*b.R13 + R22*b.R23 + R23*b.R33,
186  R31*b.R11 + R32*b.R21 + R33*b.R31,
187  R31*b.R12 + R32*b.R22 + R33*b.R32,
188  R31*b.R13 + R32*b.R23 + R33*b.R33);
189  }
template<class T>
Basic3DVector<T> TkRotation< T >::operator* ( const Basic2DVector< T > &  v) const
inline

Definition at line 189 of file newTkRotation.h.

189  {
190  return Basic3DVector<T>( xx()*v.x() + xy()*v.y(),
191  yx()*v.x() + yy()*v.y(),
192  zx()*v.x() + zy()*v.y());
193  }
T xx() const
T yx() const
T zx() const
T xy() const
T zy() const
T yy() const
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
template<class T>
TkRotation TkRotation< T >::operator* ( const TkRotation< T > &  b) const
inline

Definition at line 202 of file newTkRotation.h.

202  {
203  return rot*b.rot;
204  }
mathSSE::Rot3< T > rot
template<class T>
TkRotation& TkRotation< T >::operator*= ( const TkRotation< T > &  b)
inline

Definition at line 203 of file oldTkRotation.h.

203  {
204  return *this = operator * (b);
205  }
Basic3DVector< T > operator*(const Basic3DVector< T > &v) const
template<class T>
TkRotation& TkRotation< T >::operator*= ( const TkRotation< T > &  b)
inline

Definition at line 209 of file newTkRotation.h.

209  {
210  return *this = operator * (b);
211  }
Basic3DVector< T > operator*(const Basic3DVector< T > &v) const
template<class T>
Basic3DVector<T> TkRotation< T >::rotate ( const Basic3DVector< T > &  v) const
inline

Definition at line 165 of file newTkRotation.h.

165  {
166  return rot.rotate(v.v);
167  }
mathSSE::Rot3< T > rot
mathSSE::Vec4< T > v
template<class T>
TkRotation& TkRotation< T >::rotateAxes ( const Basic3DVector< T > &  newX,
const Basic3DVector< T > &  newY,
const Basic3DVector< T > &  newZ 
)
inline

Definition at line 212 of file oldTkRotation.h.

214  {
215  T del = 0.001;
216 
217  if (
218 
219  // the check for right-handedness is not needed since
220  // we want to change the handedness when it's left in cmsim
221  //
222  // fabs(newZ.x()-w.x()) > del ||
223  // fabs(newZ.y()-w.y()) > del ||
224  // fabs(newZ.z()-w.z()) > del ||
225  fabs(newX.mag2()-1.) > del ||
226  fabs(newY.mag2()-1.) > del ||
227  fabs(newZ.mag2()-1.) > del ||
228  fabs(newX.dot(newY)) > del ||
229  fabs(newY.dot(newZ)) > del ||
230  fabs(newZ.dot(newX)) > del) {
232  return *this;
233  } else {
234  return transform(TkRotation(newX.x(), newY.x(), newZ.x(),
235  newX.y(), newY.y(), newZ.y(),
236  newX.z(), newY.z(), newZ.z()));
237  }
238  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
TkRotation & transform(const TkRotation &b)
T z() const
Cartesian z coordinate.
void TkRotationErr2()
Definition: TkRotation.cc:32
long double T
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
T dot(const Basic3DVector &rh) const
Scalar product, or &quot;dot&quot; product, with a vector of same type.
template<class T>
TkRotation& TkRotation< T >::rotateAxes ( const Basic3DVector< T > &  newX,
const Basic3DVector< T > &  newY,
const Basic3DVector< T > &  newZ 
)
inline

Definition at line 218 of file newTkRotation.h.

Referenced by RPCGeometryBuilderFromCondDB::build(), CSCGeometryBuilder::buildChamber(), and RPCGeometryBuilderFromDDD::buildGeometry().

220  {
221  T del = 0.001;
222 
223  if (
224 
225  // the check for right-handedness is not needed since
226  // we want to change the handedness when it's left in cmsim
227  //
228  // fabs(newZ.x()-w.x()) > del ||
229  // fabs(newZ.y()-w.y()) > del ||
230  // fabs(newZ.z()-w.z()) > del ||
231  fabs(newX.mag2()-1.) > del ||
232  fabs(newY.mag2()-1.) > del ||
233  fabs(newZ.mag2()-1.) > del ||
234  fabs(newX.dot(newY)) > del ||
235  fabs(newY.dot(newZ)) > del ||
236  fabs(newZ.dot(newX)) > del) {
238  return *this;
239  } else {
240  return transform(TkRotation(newX.x(), newY.x(), newZ.x(),
241  newX.y(), newY.y(), newZ.y(),
242  newX.z(), newY.z(), newZ.z()));
243  }
244  }
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
TkRotation & transform(const TkRotation &b)
T z() const
Cartesian z coordinate.
void TkRotationErr2()
Definition: TkRotation.cc:32
long double T
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
T dot(const Basic3DVector &rh) const
Scalar product, or &quot;dot&quot; product, with a vector of same type.
template<class T>
Basic3DVector<T> TkRotation< T >::rotateBack ( const Basic3DVector< T > &  v) const
inline

Definition at line 169 of file newTkRotation.h.

169  {
170  return rot.rotateBack(v.v);
171  }
mathSSE::Rot3< T > rot
mathSSE::Vec4< T > v
template<class T>
TkRotation& TkRotation< T >::transform ( const TkRotation< T > &  b)
inline

Definition at line 208 of file oldTkRotation.h.

Referenced by Vispa.Views.LineDecayView.DecayLine::boundingRect(), Vispa.Views.LineDecayView.DecayLine::containsPoint(), and Vispa.Views.LineDecayView.DecayLine::paint().

208  {
209  return *this = b.operator * (*this);
210  }
template<class T>
TkRotation& TkRotation< T >::transform ( const TkRotation< T > &  b)
inline
template<class T>
TkRotation TkRotation< T >::transposed ( ) const
inline

Definition at line 139 of file oldTkRotation.h.

template<class T>
TkRotation TkRotation< T >::transposed ( ) const
inline
template<class T>
Basic3DVector<T> TkRotation< T >::x ( ) const
inline
template<class T>
Basic3DVector<T> TkRotation< T >::x ( ) const
inline
template<class T>
T const& TkRotation< T >::xx ( ) const
inline

Definition at line 245 of file oldTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

245 { return R11;}
template<class T>
T TkRotation< T >::xx ( ) const
inline
template<class T>
T const& TkRotation< T >::xy ( ) const
inline

Definition at line 246 of file oldTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

246 { return R12;}
template<class T>
T TkRotation< T >::xy ( ) const
inline
template<class T>
T const& TkRotation< T >::xz ( ) const
inline

Definition at line 247 of file oldTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

247 { return R13;}
template<class T>
T TkRotation< T >::xz ( ) const
inline
template<class T>
Basic3DVector<T> TkRotation< T >::y ( ) const
inline
template<class T>
Basic3DVector<T> TkRotation< T >::y ( ) const
inline
template<class T>
T const& TkRotation< T >::yx ( ) const
inline

Definition at line 248 of file oldTkRotation.h.

248 { return R21;}
template<class T>
T TkRotation< T >::yx ( ) const
inline
template<class T>
T const& TkRotation< T >::yy ( ) const
inline

Definition at line 249 of file oldTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

249 { return R22;}
template<class T>
T TkRotation< T >::yy ( ) const
inline
template<class T>
T const& TkRotation< T >::yz ( ) const
inline

Definition at line 250 of file oldTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

250 { return R23;}
template<class T>
T TkRotation< T >::yz ( ) const
inline
template<class T>
Basic3DVector<T> TkRotation< T >::z ( ) const
inline

Definition at line 242 of file oldTkRotation.h.

Referenced by geometryXMLparser.Alignable::pos().

242 { return Basic3DVector<T>(zx(),zy(),zz());}
T zx() const
T zz() const
T zy() const
template<class T>
Basic3DVector<T> TkRotation< T >::z ( ) const
inline

Definition at line 249 of file newTkRotation.h.

Referenced by JacobianCurvilinearToLocal::compute(), and geometryXMLparser.Alignable::pos().

249 { return rot.axis[2];}
mathSSE::Rot3< T > rot
template<class T>
T const& TkRotation< T >::zx ( ) const
inline

Definition at line 251 of file oldTkRotation.h.

251 { return R31;}
template<class T>
T TkRotation< T >::zx ( ) const
inline
template<class T>
T const& TkRotation< T >::zy ( ) const
inline

Definition at line 252 of file oldTkRotation.h.

252 { return R32;}
template<class T>
T TkRotation< T >::zy ( ) const
inline
template<class T>
T const& TkRotation< T >::zz ( ) const
inline

Definition at line 253 of file oldTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

253 { return R33;}
template<class T>
T TkRotation< T >::zz ( ) const
inline

Member Data Documentation

template<class T>
T TkRotation< T >::R11
private
template<class T>
T TkRotation< T >::R12
private
template<class T>
T TkRotation< T >::R13
private
template<class T>
T TkRotation< T >::R21
private
template<class T>
T TkRotation< T >::R22
private
template<class T>
T TkRotation< T >::R23
private
template<class T>
T TkRotation< T >::R31
private
template<class T>
T TkRotation< T >::R32
private
template<class T>
T TkRotation< T >::R33
private
template<class T>
mathSSE::Rot3<T> TkRotation< T >::rot
private