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 <extTkRotation.h>

Public Types

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

Public Member Functions

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

Detailed Description

template<class T>
class TkRotation< T >

Rotaion matrix used by Surface.

Definition at line 13 of file extTkRotation.h.

Member Typedef Documentation

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

Definition at line 36 of file extTkRotation.h.

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

Definition at line 36 of file newTkRotation.h.

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

Definition at line 36 of file sseTkRotation.h.

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

Definition at line 34 of file oldTkRotation.h.

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

Definition at line 35 of file extTkRotation.h.

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

Definition at line 35 of file sseTkRotation.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 ( Rot3< T > const &  irot)
inline

Definition at line 39 of file extTkRotation.h.

39 : rot(irot){}
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 extTkRotation.h.

41  :
42  rot(xx,xy,xz, yx,yy,yz, zx, zy,zz){}
T xx() const
T yx() const
T zx() const
T xy() const
T zz() const
Rot3< T > rot
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 extTkRotation.h.

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

Definition at line 49 of file extTkRotation.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  }
Rot3< T > rot
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:119
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 extTkRotation.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: extTkRotation.h:36
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 extTkRotation.h.

79  {
80  rot.axis[0]= uX.basicVector().v;
81  rot.axis[1]= uY.basicVector().v;
82  rot.axis[2]= uZ.basicVector().v;
83  }
Rot3< T > rot
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 extTkRotation.h.

86  {
87  rot.axis[0]= uX.v;
88  rot.axis[1]= uY.v;
89  rot.axis[2]= uZ.v;
90  }
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 extTkRotation.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
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 extTkRotation.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
T zx() const
T xy() const
T zz() const
Rot3< T > rot
T zy() const
T yy() const
T xz() const
T yz() const
template<class T>
TkRotation< T >::TkRotation ( )
inline

Definition at line 38 of file newTkRotation.h.

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

Definition at line 39 of file newTkRotation.h.

39 : rot(irot){}
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
T zx() const
T xy() const
T zz() const
Rot3< T > rot
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]) {}
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  }
Rot3< T > rot
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:119
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: extTkRotation.h:36
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  }
Rot3< T > rot
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  }
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
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
T zx() const
T xy() const
T zz() const
Rot3< T > rot
T zy() const
T yy() const
T xz() const
T yz() const
template<class T>
TkRotation< T >::TkRotation ( )
inline

Definition at line 36 of file oldTkRotation.h.

36  :
37  R11( 1), R12( 0), R13( 0),
38  R21( 0), R22( 1), R23( 0),
39  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 41 of file oldTkRotation.h.

41  :
42  R11(xx), R12(xy), R13(xz),
43  R21(yx), R22(yy), R23(yz),
44  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 46 of file oldTkRotation.h.

46  :
47  R11(p[0]), R12(p[1]), R13(p[2]),
48  R21(p[3]), R22(p[4]), R23(p[5]),
49  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 51 of file oldTkRotation.h.

51  {
52 
53  GlobalVector uX = aX.unit();
54  GlobalVector uY = aY.unit();
55  GlobalVector uZ(uX.cross(uY));
56 
57  R11 = uX.x(); R12 = uX.y(); R13 = uX.z();
58  R21 = uY.x(); R22 = uY.y(); R23 = uY.z();
59  R31 = uZ.x(); R32 = uZ.y(); R33 = uZ.z();
60 
61  }
T y() const
Definition: PV3DBase.h:63
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:119
T z() const
Definition: PV3DBase.h:64
Vector3DBase unit() const
Definition: Vector3DBase.h:57
T x() const
Definition: PV3DBase.h:62
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 67 of file oldTkRotation.h.

68  :
69  R11( aX.x()), R12( aX.y()), R13( aX.z()),
70  R21( aY.x()), R22( aY.y()), R23( aY.z()),
71  R31( aZ.x()), R32( aZ.y()), R33( aZ.z()) {}
T y() const
Definition: PV3DBase.h:63
T z() const
Definition: PV3DBase.h:64
T x() const
Definition: PV3DBase.h:62
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 82 of file oldTkRotation.h.

82  :
83  R11( cos(phi) ), R12( sin(phi)), R13( 0),
84  R21( -sin(phi)), R22( cos(phi)), R23( 0),
85  R31( 0), R32( 0), R33( 1) {
86 
87  //rotation around the z-axis by phi
88  TkRotation tmpRotz ( cos(axis.phi()), sin(axis.phi()), 0.,
89  -sin(axis.phi()), cos(axis.phi()), 0.,
90  0., 0., 1. );
91  //rotation around y-axis by theta
92  TkRotation tmpRoty ( cos(axis.theta()), 0.,-sin(axis.theta()),
93  0., 1., 0.,
94  sin(axis.theta()), 0., cos(axis.theta()) );
95  (*this)*=tmpRoty;
96  (*this)*=tmpRotz; // = this * tmpRoty * tmpRotz
97 
98  // (tmpRoty * tmpRotz)^-1 * this * tmpRoty * tmpRotz
99 
100  *this = (tmpRoty*tmpRotz).multiplyInverse(*this);
101 
102  }
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 137 of file oldTkRotation.h.

137  :
138  R11(a.xx()), R12(a.xy()), R13(a.xz()),
139  R21(a.yx()), R22(a.yy()), R23(a.yz()),
140  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
template<class T>
TkRotation< T >::TkRotation ( )
inline

Definition at line 38 of file sseTkRotation.h.

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

Definition at line 39 of file sseTkRotation.h.

39 : rot(irot){}
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 sseTkRotation.h.

41  :
42  rot(xx,xy,xz, yx,yy,yz, zx, zy,zz){}
T xx() const
T yx() const
T zx() const
T xy() const
T zz() const
Rot3< T > rot
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 sseTkRotation.h.

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

Definition at line 49 of file sseTkRotation.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  }
Rot3< T > rot
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:119
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 sseTkRotation.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: extTkRotation.h:36
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 sseTkRotation.h.

79  {
80  rot.axis[0]= uX.basicVector().v;
81  rot.axis[1]= uY.basicVector().v;
82  rot.axis[2]= uZ.basicVector().v;
83  }
Rot3< T > rot
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 sseTkRotation.h.

86  {
87  rot.axis[0]= uX.v;
88  rot.axis[1]= uY.v;
89  rot.axis[2]= uZ.v;
90  }
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 sseTkRotation.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
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 sseTkRotation.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
T zx() const
T xy() const
T zz() const
Rot3< T > rot
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 158 of file oldTkRotation.h.

158  {
159  return rotateBack(v);
160  }
Basic3DVector< T > rotateBack(const Basic3DVector< T > &v) const
template<class T>
Basic3DVector<T> TkRotation< T >::multiplyInverse ( const Basic2DVector< T > &  v) const
inline

Definition at line 174 of file oldTkRotation.h.

174  {
175  return Basic3DVector<T>( R11*v.x() + R21*v.y(),
176  R12*v.x() + R22*v.y(),
177  R13*v.x() + R23*v.y());
178  }
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

Definition at line 178 of file sseTkRotation.h.

178  {
179  return rot.rotateBack(v.v);
180  }
Rot3< T > rot
template<class T>
Basic3DVector<T> TkRotation< T >::multiplyInverse ( const Basic3DVector< T > &  v) const
inline

Definition at line 178 of file newTkRotation.h.

178  {
179  return rot.rotateBack(v.v);
180  }
Rot3< T > rot
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 sseTkRotation.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>
template<class Scalar >
Basic3DVector<Scalar> TkRotation< T >::multiplyInverse ( const Basic3DVector< Scalar > &  v) const
inline

Definition at line 183 of file extTkRotation.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>
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>
Basic3DVector<T> TkRotation< T >::multiplyInverse ( const Basic2DVector< T > &  v) const
inline

Definition at line 194 of file extTkRotation.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>
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>
Basic3DVector<T> TkRotation< T >::multiplyInverse ( const Basic2DVector< T > &  v) const
inline

Definition at line 194 of file sseTkRotation.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 194 of file oldTkRotation.h.

194  {
195  return TkRotation(R11*b.R11 + R21*b.R21 + R31*b.R31,
196  R11*b.R12 + R21*b.R22 + R31*b.R32,
197  R11*b.R13 + R21*b.R23 + R31*b.R33,
198  R12*b.R11 + R22*b.R21 + R32*b.R31,
199  R12*b.R12 + R22*b.R22 + R32*b.R32,
200  R12*b.R13 + R22*b.R23 + R32*b.R33,
201  R13*b.R11 + R23*b.R21 + R33*b.R31,
202  R13*b.R12 + R23*b.R22 + R33*b.R32,
203  R13*b.R13 + R23*b.R23 + R33*b.R33);
204  }
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  }
Rot3< T > rot
template<class T>
TkRotation TkRotation< T >::multiplyInverse ( const TkRotation< T > &  b) const
inline

Definition at line 205 of file extTkRotation.h.

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

Definition at line 205 of file sseTkRotation.h.

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

Definition at line 148 of file oldTkRotation.h.

148  {
149  return rotate(v);
150  }
Basic3DVector< T > rotate(const Basic3DVector< T > &v) const
template<class T>
Basic3DVector<T> TkRotation< T >::operator* ( const Basic2DVector< T > &  v) const
inline

Definition at line 169 of file oldTkRotation.h.

169  {
170  return Basic3DVector<T>( R11*v.x() + R12*v.y(),
171  R21*v.x() + R22*v.y(),
172  R31*v.x() + R32*v.y());
173  }
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 extTkRotation.h.

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

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

Definition at line 174 of file sseTkRotation.h.

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

Definition at line 174 of file newTkRotation.h.

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

Definition at line 182 of file oldTkRotation.h.

182  {
183  return TkRotation(R11*b.R11 + R12*b.R21 + R13*b.R31,
184  R11*b.R12 + R12*b.R22 + R13*b.R32,
185  R11*b.R13 + R12*b.R23 + R13*b.R33,
186  R21*b.R11 + R22*b.R21 + R23*b.R31,
187  R21*b.R12 + R22*b.R22 + R23*b.R32,
188  R21*b.R13 + R22*b.R23 + R23*b.R33,
189  R31*b.R11 + R32*b.R21 + R33*b.R31,
190  R31*b.R12 + R32*b.R22 + R33*b.R32,
191  R31*b.R13 + R32*b.R23 + R33*b.R33);
192  }
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>
Basic3DVector<T> TkRotation< T >::operator* ( const Basic2DVector< T > &  v) const
inline

Definition at line 189 of file sseTkRotation.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>
Basic3DVector<T> TkRotation< T >::operator* ( const Basic2DVector< T > &  v) const
inline

Definition at line 189 of file extTkRotation.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  }
Rot3< T > rot
template<class T>
TkRotation TkRotation< T >::operator* ( const TkRotation< T > &  b) const
inline

Definition at line 202 of file extTkRotation.h.

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

Definition at line 202 of file sseTkRotation.h.

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

Definition at line 206 of file oldTkRotation.h.

206  {
207  return *this = operator * (b);
208  }
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>
TkRotation& TkRotation< T >::operator*= ( const TkRotation< T > &  b)
inline

Definition at line 209 of file sseTkRotation.h.

209  {
210  return *this = operator * (b);
211  }
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 extTkRotation.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 152 of file oldTkRotation.h.

152  {
153  return Basic3DVector<T>( R11*v.x() + R12*v.y() + R13*v.z(),
154  R21*v.x() + R22*v.y() + R23*v.z(),
155  R31*v.x() + R32*v.y() + R33*v.z());
156  }
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 >::rotate ( const Basic3DVector< T > &  v) const
inline

Definition at line 165 of file sseTkRotation.h.

165  {
166  return rot.rotate(v.v);
167  }
Rot3< T > rot
template<class T>
Basic3DVector<T> TkRotation< T >::rotate ( const Basic3DVector< T > &  v) const
inline

Definition at line 165 of file extTkRotation.h.

Referenced by JacobianCurvilinearToLocal::compute(), and TkRotation< align::Scalar >::operator*().

165  {
166  return rot.rotate(v.v);
167  }
Rot3< T > rot
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  }
Rot3< T > rot
template<class T>
TkRotation& TkRotation< T >::rotateAxes ( const Basic3DVector< T > &  newX,
const Basic3DVector< T > &  newY,
const Basic3DVector< T > &  newZ 
)
inline

Definition at line 215 of file oldTkRotation.h.

217  {
218  T del = 0.001;
219 
220  if (
221 
222  // the check for right-handedness is not needed since
223  // we want to change the handedness when it's left in cmsim
224  //
225  // fabs(newZ.x()-w.x()) > del ||
226  // fabs(newZ.y()-w.y()) > del ||
227  // fabs(newZ.z()-w.z()) > del ||
228  fabs(newX.mag2()-1.) > del ||
229  fabs(newY.mag2()-1.) > del ||
230  fabs(newZ.mag2()-1.) > del ||
231  fabs(newX.dot(newY)) > del ||
232  fabs(newY.dot(newZ)) > del ||
233  fabs(newZ.dot(newX)) > del) {
235  return *this;
236  } else {
237  return transform(TkRotation(newX.x(), newY.x(), newZ.x(),
238  newX.y(), newY.y(), newZ.y(),
239  newX.z(), newY.z(), newZ.z()));
240  }
241  }
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.

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>
TkRotation& TkRotation< T >::rotateAxes ( const Basic3DVector< T > &  newX,
const Basic3DVector< T > &  newY,
const Basic3DVector< T > &  newZ 
)
inline

Definition at line 218 of file sseTkRotation.h.

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>
TkRotation& TkRotation< T >::rotateAxes ( const Basic3DVector< T > &  newX,
const Basic3DVector< T > &  newY,
const Basic3DVector< T > &  newZ 
)
inline

Definition at line 218 of file extTkRotation.h.

Referenced by GEMGeometryBuilderFromCondDB::build(), RPCGeometryBuilderFromCondDB::build(), CSCGeometryBuilder::buildChamber(), GEMGeometryBuilderFromDDD::buildGeometry(), 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 162 of file oldTkRotation.h.

162  {
163  return Basic3DVector<T>( R11*v.x() + R21*v.y() + R31*v.z(),
164  R12*v.x() + R22*v.y() + R32*v.z(),
165  R13*v.x() + R23*v.y() + R33*v.z());
166  }
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 >::rotateBack ( const Basic3DVector< T > &  v) const
inline

Definition at line 169 of file extTkRotation.h.

Referenced by TkRotation< align::Scalar >::multiplyInverse().

169  {
170  return rot.rotateBack(v.v);
171  }
Rot3< T > rot
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  }
Rot3< T > rot
template<class T>
Basic3DVector<T> TkRotation< T >::rotateBack ( const Basic3DVector< T > &  v) const
inline

Definition at line 169 of file sseTkRotation.h.

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

Definition at line 211 of file oldTkRotation.h.

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

211  {
212  return *this = b.operator * (*this);
213  }
template<class T>
TkRotation& TkRotation< T >::transform ( const TkRotation< T > &  b)
inline

Definition at line 214 of file newTkRotation.h.

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

214  {
215  return *this = b.operator * (*this);
216  }
template<class T>
TkRotation& TkRotation< T >::transform ( const TkRotation< T > &  b)
inline

Definition at line 214 of file sseTkRotation.h.

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

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

Definition at line 142 of file oldTkRotation.h.

template<class T>
TkRotation TkRotation< T >::transposed ( ) const
inline
template<class T>
TkRotation TkRotation< T >::transposed ( ) const
inline

Definition at line 161 of file sseTkRotation.h.

161  {
162  return rot.transpose();
163  }
Rot3< T > rot
template<class T>
TkRotation TkRotation< T >::transposed ( ) const
inline

Definition at line 161 of file newTkRotation.h.

161  {
162  return rot.transpose();
163  }
Rot3< T > rot
template<class T>
Basic3DVector<T> TkRotation< T >::x ( ) 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>
Basic3DVector<T> TkRotation< T >::x ( ) const
inline
template<class T>
T const& TkRotation< T >::xx ( ) const
inline

Definition at line 248 of file oldTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

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

Definition at line 251 of file newTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

251 { return rot.axis[0].arr[0];}
Rot3< T > rot
template<class T>
T TkRotation< T >::xx ( ) const
inline

Definition at line 251 of file sseTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

251 { return rot.axis[0].arr[0];}
Rot3< T > rot
template<class T>
T const& TkRotation< T >::xy ( ) const
inline

Definition at line 249 of file oldTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

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

Definition at line 252 of file newTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

252 { return rot.axis[0].arr[1];}
Rot3< T > rot
template<class T>
T TkRotation< T >::xy ( ) const
inline

Definition at line 252 of file sseTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

252 { return rot.axis[0].arr[1];}
Rot3< T > rot
template<class T>
T const& TkRotation< T >::xz ( ) const
inline

Definition at line 250 of file oldTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

250 { return R13;}
template<class T>
T TkRotation< T >::xz ( ) const
inline
template<class T>
T TkRotation< T >::xz ( ) const
inline

Definition at line 253 of file newTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

253 { return rot.axis[0].arr[2];}
Rot3< T > rot
template<class T>
T TkRotation< T >::xz ( ) const
inline

Definition at line 253 of file sseTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

253 { return rot.axis[0].arr[2];}
Rot3< T > rot
template<class T>
Basic3DVector<T> TkRotation< T >::y ( ) 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>
Basic3DVector<T> TkRotation< T >::y ( ) const
inline
template<class T>
T const& TkRotation< T >::yx ( ) const
inline

Definition at line 251 of file oldTkRotation.h.

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

Definition at line 254 of file sseTkRotation.h.

254 { return rot.axis[1].arr[0];}
Rot3< T > rot
template<class T>
T TkRotation< T >::yx ( ) const
inline
template<class T>
T TkRotation< T >::yx ( ) const
inline

Definition at line 254 of file newTkRotation.h.

254 { return rot.axis[1].arr[0];}
Rot3< T > rot
template<class T>
T const& TkRotation< T >::yy ( ) const
inline

Definition at line 252 of file oldTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

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

Definition at line 255 of file sseTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

255 { return rot.axis[1].arr[1];}
Rot3< T > rot
template<class T>
T TkRotation< T >::yy ( ) const
inline
template<class T>
T TkRotation< T >::yy ( ) const
inline

Definition at line 255 of file newTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

255 { return rot.axis[1].arr[1];}
Rot3< T > rot
template<class T>
T const& TkRotation< T >::yz ( ) const
inline

Definition at line 253 of file oldTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

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

Definition at line 256 of file sseTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

256 { return rot.axis[1].arr[2];}
Rot3< T > rot
template<class T>
T TkRotation< T >::yz ( ) const
inline

Definition at line 256 of file newTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

256 { return rot.axis[1].arr[2];}
Rot3< T > rot
template<class T>
Basic3DVector<T> TkRotation< T >::z ( ) const
inline

Definition at line 245 of file oldTkRotation.h.

Referenced by geometryXMLparser.Alignable::pos().

245 { 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 geometryXMLparser.Alignable::pos().

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

Definition at line 249 of file extTkRotation.h.

Referenced by geometryXMLparser.Alignable::pos().

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

Definition at line 249 of file sseTkRotation.h.

Referenced by geometryXMLparser.Alignable::pos().

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

Definition at line 254 of file oldTkRotation.h.

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

Definition at line 257 of file newTkRotation.h.

257 { return rot.axis[2].arr[0];}
Rot3< T > rot
template<class T>
T TkRotation< T >::zx ( ) const
inline

Definition at line 257 of file sseTkRotation.h.

257 { return rot.axis[2].arr[0];}
Rot3< T > rot
template<class T>
T const& TkRotation< T >::zy ( ) const
inline

Definition at line 255 of file oldTkRotation.h.

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

Definition at line 258 of file newTkRotation.h.

258 { return rot.axis[2].arr[1];}
Rot3< T > rot
template<class T>
T TkRotation< T >::zy ( ) const
inline

Definition at line 258 of file sseTkRotation.h.

258 { return rot.axis[2].arr[1];}
Rot3< T > rot
template<class T>
T const& TkRotation< T >::zz ( ) const
inline

Definition at line 256 of file oldTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

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

Definition at line 259 of file sseTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

259 { return rot.axis[2].arr[2];}
Rot3< T > rot
template<class T>
T TkRotation< T >::zz ( ) const
inline
template<class T>
T TkRotation< T >::zz ( ) const
inline

Definition at line 259 of file newTkRotation.h.

Referenced by geometryXMLparser.Alignable::covariance().

259 { return rot.axis[2].arr[2];}
Rot3< T > rot

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

Definition at line 263 of file newTkRotation.h.

template<class T>
mathSSE::Rot3< T > TkRotation< T >::rot
private