ROOT  6.06/09
Reference Guide
Public Types | Public Member Functions | Private Attributes | List of all members
ROOT::Math::LorentzRotation Class Reference

Lorentz transformation class with the (4D) transformation represented by a 4x4 orthosymplectic matrix.

See also Boost, BoostX, BoostY and BoostZ for classes representing specialized Lorentz transformations. Also, the 3-D rotation classes can be considered to be special Lorentz transformations which do not mix space and time components.

Definition at line 54 of file LorentzRotation.h.

Public Types

enum  ELorentzRotationMatrixIndex {
  kXX = 0, kXY = 1, kXZ = 2, kXT = 3,
  kYX = 4, kYY = 5, kYZ = 6, kYT = 7,
  kZX = 8, kZY = 9, kZZ = 10, kZT = 11,
  kTX = 12, kTY = 13, kTZ = 14, kTT = 15
}
 
typedef double Scalar
 

Public Member Functions

 LorentzRotation ()
 Default constructor (identity transformation) More...
 
template<class IT >
 LorentzRotation (IT begin, IT end)
 Construct given a pair of pointers or iterators defining the beginning and end of an array of sixteen Scalars. More...
 
 LorentzRotation (LorentzRotation const &r)
 Copy constructor. More...
 
 LorentzRotation (Boost const &b)
 Construct from a pure boost. More...
 
 LorentzRotation (BoostX const &bx)
 
 LorentzRotation (BoostY const &by)
 
 LorentzRotation (BoostZ const &bz)
 
 LorentzRotation (Rotation3D const &r)
 Construct from a 3-D rotation (no space-time mixing) More...
 
 LorentzRotation (AxisAngle const &a)
 
 LorentzRotation (EulerAngles const &e)
 
 LorentzRotation (Quaternion const &q)
 
 LorentzRotation (RotationX const &r)
 
 LorentzRotation (RotationY const &r)
 
 LorentzRotation (RotationZ const &r)
 
template<class ForeignMatrix >
 LorentzRotation (const ForeignMatrix &m)
 Construct from a linear algebra matrix of size at least 4x4, which must support operator()(i,j) to obtain elements (0,3) thru (3,3). More...
 
template<class Foreign4Vector >
 LorentzRotation (const Foreign4Vector &v1, const Foreign4Vector &v2, const Foreign4Vector &v3, const Foreign4Vector &v4)
 Construct from four orthosymplectic vectors (which must have methods x(), y(), z() and t()) which will be used as the columns of the Lorentz rotation matrix. More...
 
 LorentzRotation (Scalar xx, Scalar xy, Scalar xz, Scalar xt, Scalar yx, Scalar yy, Scalar yz, Scalar yt, Scalar zx, Scalar zy, Scalar zz, Scalar zt, Scalar tx, Scalar ty, Scalar tz, Scalar tt)
 Raw constructor from sixteen Scalar components (without any checking) More...
 
LorentzRotationoperator= (LorentzRotation const &rhs)
 Assign from another LorentzRotation. More...
 
LorentzRotationoperator= (Boost const &b)
 Assign from a pure boost. More...
 
LorentzRotationoperator= (BoostX const &b)
 
LorentzRotationoperator= (BoostY const &b)
 
LorentzRotationoperator= (BoostZ const &b)
 
LorentzRotationoperator= (Rotation3D const &r)
 Assign from a 3-D rotation. More...
 
LorentzRotationoperator= (AxisAngle const &a)
 
LorentzRotationoperator= (EulerAngles const &e)
 
LorentzRotationoperator= (Quaternion const &q)
 
LorentzRotationoperator= (RotationZ const &r)
 
LorentzRotationoperator= (RotationY const &r)
 
LorentzRotationoperator= (RotationX const &r)
 
template<class ForeignMatrix >
LorentzRotationoperator= (const ForeignMatrix &m)
 Assign from a linear algebra matrix of size at least 4x4, which must support operator()(i,j) to obtain elements (0,3) thru (3,3). More...
 
void Rectify ()
 Re-adjust components to eliminate small deviations from a perfect orthosyplectic matrix. More...
 
template<class Foreign4Vector >
void SetComponents (const Foreign4Vector &v1, const Foreign4Vector &v2, const Foreign4Vector &v3, const Foreign4Vector &v4)
 Set components from four orthosymplectic vectors (which must have methods x(), y(), z(), and t()) which will be used as the columns of the Lorentz rotation matrix. More...
 
template<class Foreign4Vector >
void GetComponents (Foreign4Vector &v1, Foreign4Vector &v2, Foreign4Vector &v3, Foreign4Vector &v4) const
 Get components into four 4-vectors which will be the (orthosymplectic) columns of the rotation matrix. More...
 
template<class IT >
void SetComponents (IT begin, IT end)
 Set the 16 matrix components given an iterator to the start of the desired data, and another to the end (16 past start). More...
 
template<class IT >
void GetComponents (IT begin, IT end) const
 Get the 16 matrix components into data specified by an iterator begin and another to the end of the desired data (16 past start). More...
 
template<class IT >
void GetComponents (IT begin) const
 Get the 16 matrix components into data specified by an iterator begin. More...
 
template<class ForeignMatrix >
void SetRotationMatrix (const ForeignMatrix &m)
 Set components from a linear algebra matrix of size at least 4x4, which must support operator()(i,j) to obtain elements (0,0) thru (3,3). More...
 
template<class ForeignMatrix >
void GetRotationMatrix (ForeignMatrix &m) const
 Get components into a linear algebra matrix of size at least 4x4, which must support operator()(i,j) for write access to elements (0,0) thru (3,3). More...
 
void SetComponents (Scalar xx, Scalar xy, Scalar xz, Scalar xt, Scalar yx, Scalar yy, Scalar yz, Scalar yt, Scalar zx, Scalar zy, Scalar zz, Scalar zt, Scalar tx, Scalar ty, Scalar tz, Scalar tt)
 Set the components from sixteen scalars – UNCHECKED for orthosymplectic. More...
 
void GetComponents (Scalar &xx, Scalar &xy, Scalar &xz, Scalar &xt, Scalar &yx, Scalar &yy, Scalar &yz, Scalar &yt, Scalar &zx, Scalar &zy, Scalar &zz, Scalar &zt, Scalar &tx, Scalar &ty, Scalar &tz, Scalar &tt) const
 Get the sixteen components into sixteen scalars. More...
 
LorentzVector< ROOT::Math::PxPyPzE4D< double > > operator() (const LorentzVector< ROOT::Math::PxPyPzE4D< double > > &v) const
 Lorentz transformation operation on a Minkowski ('Cartesian') LorentzVector. More...
 
template<class CoordSystem >
LorentzVector< CoordSystem > operator() (const LorentzVector< CoordSystem > &v) const
 Lorentz transformation operation on a LorentzVector in any coordinate system. More...
 
template<class Foreign4Vector >
Foreign4Vector operator() (const Foreign4Vector &v) const
 Lorentz transformation operation on an arbitrary 4-vector v. More...
 
template<class A4Vector >
A4Vector operator* (const A4Vector &v) const
 Overload operator * for rotation on a vector. More...
 
void Invert ()
 Invert a Lorentz rotation in place. More...
 
LorentzRotation Inverse () const
 Return inverse of a rotation. More...
 
LorentzRotation operator* (const LorentzRotation &r) const
 Multiply (combine) this Lorentz rotation by another LorentzRotation. More...
 
LorentzRotation operator* (const Boost &b) const
 Multiply (combine) this Lorentz rotation by a pure Lorentz boost. More...
 
LorentzRotation operator* (const BoostX &b) const
 
LorentzRotation operator* (const BoostY &b) const
 
LorentzRotation operator* (const BoostZ &b) const
 
LorentzRotation operator* (const Rotation3D &r) const
 Multiply (combine) this Lorentz rotation by a 3-D Rotation. More...
 
LorentzRotation operator* (const AxisAngle &a) const
 
LorentzRotation operator* (const EulerAngles &e) const
 
LorentzRotation operator* (const Quaternion &q) const
 
LorentzRotation operator* (const RotationX &rx) const
 
LorentzRotation operator* (const RotationY &ry) const
 
LorentzRotation operator* (const RotationZ &rz) const
 
template<class R >
LorentzRotationoperator*= (const R &r)
 Post-Multiply (on right) by another LorentzRotation, Boost, or rotation : T = T*R. More...
 
bool operator== (const LorentzRotation &rhs) const
 Equality/inequality operators. More...
 
bool operator!= (const LorentzRotation &rhs) const
 

Private Attributes

Scalar fM [16]
 

#include <Math/GenVector/LorentzRotation.h>

Member Typedef Documentation

Definition at line 58 of file LorentzRotation.h.

Constructor & Destructor Documentation

ROOT::Math::LorentzRotation::LorentzRotation ( )

Default constructor (identity transformation)

Definition at line 36 of file LorentzRotation.cxx.

Referenced by Inverse(), operator*(), and operator=().

template<class IT >
ROOT::Math::LorentzRotation::LorentzRotation ( IT  begin,
IT  end 
)
inline

Construct given a pair of pointers or iterators defining the beginning and end of an array of sixteen Scalars.

Definition at line 79 of file LorentzRotation.h.

ROOT::Math::LorentzRotation::LorentzRotation ( LorentzRotation const &  r)
inline

Copy constructor.

Definition at line 87 of file LorentzRotation.h.

ROOT::Math::LorentzRotation::LorentzRotation ( Boost const &  b)
inlineexplicit

Construct from a pure boost.

Definition at line 94 of file LorentzRotation.h.

ROOT::Math::LorentzRotation::LorentzRotation ( BoostX const &  bx)
inlineexplicit

Definition at line 95 of file LorentzRotation.h.

ROOT::Math::LorentzRotation::LorentzRotation ( BoostY const &  by)
inlineexplicit

Definition at line 96 of file LorentzRotation.h.

ROOT::Math::LorentzRotation::LorentzRotation ( BoostZ const &  bz)
inlineexplicit

Definition at line 97 of file LorentzRotation.h.

ROOT::Math::LorentzRotation::LorentzRotation ( Rotation3D const &  r)
explicit

Construct from a 3-D rotation (no space-time mixing)

Definition at line 44 of file LorentzRotation.cxx.

ROOT::Math::LorentzRotation::LorentzRotation ( AxisAngle const &  a)
explicit

Definition at line 55 of file LorentzRotation.cxx.

ROOT::Math::LorentzRotation::LorentzRotation ( EulerAngles const &  e)
explicit

Definition at line 67 of file LorentzRotation.cxx.

ROOT::Math::LorentzRotation::LorentzRotation ( Quaternion const &  q)
explicit

Definition at line 79 of file LorentzRotation.cxx.

ROOT::Math::LorentzRotation::LorentzRotation ( RotationX const &  r)
explicit

Definition at line 91 of file LorentzRotation.cxx.

ROOT::Math::LorentzRotation::LorentzRotation ( RotationY const &  r)
explicit

Definition at line 101 of file LorentzRotation.cxx.

ROOT::Math::LorentzRotation::LorentzRotation ( RotationZ const &  r)
explicit

Definition at line 111 of file LorentzRotation.cxx.

template<class ForeignMatrix >
ROOT::Math::LorentzRotation::LorentzRotation ( const ForeignMatrix &  m)
inlineexplicit

Construct from a linear algebra matrix of size at least 4x4, which must support operator()(i,j) to obtain elements (0,3) thru (3,3).

Precondition: The matrix is assumed to be orthosymplectic. NO checking or re-adjusting is performed. Note: (0,0) refers to the XX component; (3,3) refers to the TT component.

Definition at line 118 of file LorentzRotation.h.

template<class Foreign4Vector >
ROOT::Math::LorentzRotation::LorentzRotation ( const Foreign4Vector &  v1,
const Foreign4Vector &  v2,
const Foreign4Vector &  v3,
const Foreign4Vector &  v4 
)
inline

Construct from four orthosymplectic vectors (which must have methods x(), y(), z() and t()) which will be used as the columns of the Lorentz rotation matrix.

The orthosymplectic conditions will be checked, and values adjusted so that the result will always be a good Lorentz rotation matrix.

Definition at line 128 of file LorentzRotation.h.

ROOT::Math::LorentzRotation::LorentzRotation ( Scalar  xx,
Scalar  xy,
Scalar  xz,
Scalar  xt,
Scalar  yx,
Scalar  yy,
Scalar  yz,
Scalar  yt,
Scalar  zx,
Scalar  zy,
Scalar  zz,
Scalar  zt,
Scalar  tx,
Scalar  ty,
Scalar  tz,
Scalar  tt 
)
inline

Raw constructor from sixteen Scalar components (without any checking)

Definition at line 137 of file LorentzRotation.h.

Member Function Documentation

template<class Foreign4Vector >
void ROOT::Math::LorentzRotation::GetComponents ( Foreign4Vector &  v1,
Foreign4Vector &  v2,
Foreign4Vector &  v3,
Foreign4Vector &  v4 
) const
inline

Get components into four 4-vectors which will be the (orthosymplectic) columns of the rotation matrix.

(The 4-vector class must have a constructor from 4 Scalars used as x, y, z, t)

Definition at line 240 of file LorentzRotation.h.

Referenced by GetComponents(), ROOT::Math::operator<<(), and testListIter().

template<class IT >
void ROOT::Math::LorentzRotation::GetComponents ( IT  begin,
IT  end 
) const
inline

Get the 16 matrix components into data specified by an iterator begin and another to the end of the desired data (16 past start).

Definition at line 273 of file LorentzRotation.h.

template<class IT >
void ROOT::Math::LorentzRotation::GetComponents ( IT  begin) const
inline

Get the 16 matrix components into data specified by an iterator begin.

Definition at line 288 of file LorentzRotation.h.

void ROOT::Math::LorentzRotation::GetComponents ( Scalar xx,
Scalar xy,
Scalar xz,
Scalar xt,
Scalar yx,
Scalar yy,
Scalar yz,
Scalar yt,
Scalar zx,
Scalar zy,
Scalar zz,
Scalar zt,
Scalar tx,
Scalar ty,
Scalar tz,
Scalar tt 
) const
inline

Get the sixteen components into sixteen scalars.

Definition at line 339 of file LorentzRotation.h.

template<class ForeignMatrix >
void ROOT::Math::LorentzRotation::GetRotationMatrix ( ForeignMatrix &  m) const
inline

Get components into a linear algebra matrix of size at least 4x4, which must support operator()(i,j) for write access to elements (0,0) thru (3,3).

Definition at line 314 of file LorentzRotation.h.

Referenced by testTransform3D().

LorentzRotation ROOT::Math::LorentzRotation::Inverse ( ) const

Return inverse of a rotation.

Definition at line 186 of file LorentzRotation.cxx.

void ROOT::Math::LorentzRotation::Invert ( )

Invert a Lorentz rotation in place.

Definition at line 175 of file LorentzRotation.cxx.

bool ROOT::Math::LorentzRotation::operator!= ( const LorentzRotation rhs) const
inline

Definition at line 459 of file LorentzRotation.h.

LorentzVector< ROOT::Math::PxPyPzE4D<double> > ROOT::Math::LorentzRotation::operator() ( const LorentzVector< ROOT::Math::PxPyPzE4D< double > > &  v) const
inline

Lorentz transformation operation on a Minkowski ('Cartesian') LorentzVector.

Definition at line 356 of file LorentzRotation.h.

Referenced by operator()(), and operator*().

template<class CoordSystem >
LorentzVector<CoordSystem> ROOT::Math::LorentzRotation::operator() ( const LorentzVector< CoordSystem > &  v) const
inline

Lorentz transformation operation on a LorentzVector in any coordinate system.

Definition at line 374 of file LorentzRotation.h.

template<class Foreign4Vector >
Foreign4Vector ROOT::Math::LorentzRotation::operator() ( const Foreign4Vector &  v) const
inline

Lorentz transformation operation on an arbitrary 4-vector v.

Preconditions: v must implement methods x(), y(), z(), and t() and the arbitrary vector type must have a constructor taking (x,y,z,t)

Definition at line 387 of file LorentzRotation.h.

template<class A4Vector >
A4Vector ROOT::Math::LorentzRotation::operator* ( const A4Vector &  v) const
inline

Overload operator * for rotation on a vector.

Definition at line 398 of file LorentzRotation.h.

LorentzRotation ROOT::Math::LorentzRotation::operator* ( const LorentzRotation r) const

Multiply (combine) this Lorentz rotation by another LorentzRotation.

Definition at line 196 of file LorentzRotation.cxx.

LorentzRotation ROOT::Math::LorentzRotation::operator* ( const Boost b) const
inline

Multiply (combine) this Lorentz rotation by a pure Lorentz boost.

Definition at line 426 of file LorentzRotation.h.

LorentzRotation ROOT::Math::LorentzRotation::operator* ( const BoostX b) const
inline

Definition at line 427 of file LorentzRotation.h.

LorentzRotation ROOT::Math::LorentzRotation::operator* ( const BoostY b) const
inline

Definition at line 428 of file LorentzRotation.h.

LorentzRotation ROOT::Math::LorentzRotation::operator* ( const BoostZ b) const
inline

Definition at line 429 of file LorentzRotation.h.

LorentzRotation ROOT::Math::LorentzRotation::operator* ( const Rotation3D r) const
inline

Multiply (combine) this Lorentz rotation by a 3-D Rotation.

Definition at line 434 of file LorentzRotation.h.

LorentzRotation ROOT::Math::LorentzRotation::operator* ( const AxisAngle a) const
inline

Definition at line 435 of file LorentzRotation.h.

LorentzRotation ROOT::Math::LorentzRotation::operator* ( const EulerAngles e) const
inline

Definition at line 436 of file LorentzRotation.h.

LorentzRotation ROOT::Math::LorentzRotation::operator* ( const Quaternion q) const
inline

Definition at line 437 of file LorentzRotation.h.

LorentzRotation ROOT::Math::LorentzRotation::operator* ( const RotationX rx) const
inline

Definition at line 438 of file LorentzRotation.h.

LorentzRotation ROOT::Math::LorentzRotation::operator* ( const RotationY ry) const
inline

Definition at line 439 of file LorentzRotation.h.

LorentzRotation ROOT::Math::LorentzRotation::operator* ( const RotationZ rz) const
inline

Definition at line 440 of file LorentzRotation.h.

template<class R >
LorentzRotation& ROOT::Math::LorentzRotation::operator*= ( const R r)
inline

Post-Multiply (on right) by another LorentzRotation, Boost, or rotation : T = T*R.

Definition at line 448 of file LorentzRotation.h.

LorentzRotation& ROOT::Math::LorentzRotation::operator= ( LorentzRotation const &  rhs)
inline

Assign from another LorentzRotation.

Definition at line 152 of file LorentzRotation.h.

LorentzRotation& ROOT::Math::LorentzRotation::operator= ( Boost const &  b)
inline

Assign from a pure boost.

Definition at line 164 of file LorentzRotation.h.

Referenced by operator=().

LorentzRotation& ROOT::Math::LorentzRotation::operator= ( BoostX const &  b)
inline

Definition at line 166 of file LorentzRotation.h.

Referenced by operator=().

LorentzRotation& ROOT::Math::LorentzRotation::operator= ( BoostY const &  b)
inline

Definition at line 168 of file LorentzRotation.h.

Referenced by operator=().

LorentzRotation& ROOT::Math::LorentzRotation::operator= ( BoostZ const &  b)
inline

Definition at line 170 of file LorentzRotation.h.

Referenced by operator=().

LorentzRotation& ROOT::Math::LorentzRotation::operator= ( Rotation3D const &  r)
inline

Assign from a 3-D rotation.

Definition at line 176 of file LorentzRotation.h.

Referenced by operator=().

LorentzRotation& ROOT::Math::LorentzRotation::operator= ( AxisAngle const &  a)
inline

Definition at line 178 of file LorentzRotation.h.

Referenced by operator=().

LorentzRotation& ROOT::Math::LorentzRotation::operator= ( EulerAngles const &  e)
inline

Definition at line 180 of file LorentzRotation.h.

Referenced by operator=().

LorentzRotation& ROOT::Math::LorentzRotation::operator= ( Quaternion const &  q)
inline

Definition at line 182 of file LorentzRotation.h.

Referenced by operator=().

LorentzRotation& ROOT::Math::LorentzRotation::operator= ( RotationZ const &  r)
inline

Definition at line 184 of file LorentzRotation.h.

Referenced by operator=().

LorentzRotation& ROOT::Math::LorentzRotation::operator= ( RotationY const &  r)
inline

Definition at line 186 of file LorentzRotation.h.

Referenced by operator=().

LorentzRotation& ROOT::Math::LorentzRotation::operator= ( RotationX const &  r)
inline

Definition at line 188 of file LorentzRotation.h.

Referenced by operator=().

template<class ForeignMatrix >
LorentzRotation& ROOT::Math::LorentzRotation::operator= ( const ForeignMatrix &  m)
inline

Assign from a linear algebra matrix of size at least 4x4, which must support operator()(i,j) to obtain elements (0,3) thru (3,3).

Precondition: The matrix is assumed to be orthosymplectic. NO checking or re-adjusting is performed.

Definition at line 198 of file LorentzRotation.h.

bool ROOT::Math::LorentzRotation::operator== ( const LorentzRotation rhs) const
inline

Equality/inequality operators.

Definition at line 453 of file LorentzRotation.h.

Referenced by operator!=().

void ROOT::Math::LorentzRotation::Rectify ( )

Re-adjust components to eliminate small deviations from a perfect orthosyplectic matrix.

Definition at line 122 of file LorentzRotation.cxx.

Referenced by SetComponents().

template<class Foreign4Vector >
void ROOT::Math::LorentzRotation::SetComponents ( const Foreign4Vector &  v1,
const Foreign4Vector &  v2,
const Foreign4Vector &  v3,
const Foreign4Vector &  v4 
)
inline

Set components from four orthosymplectic vectors (which must have methods x(), y(), z(), and t()) which will be used as the columns of the Lorentz rotation matrix.

The values will be adjusted so that the result will always be a good Lorentz rotation matrix.

Definition at line 222 of file LorentzRotation.h.

Referenced by LorentzRotation(), operator=(), and SetComponents().

template<class IT >
void ROOT::Math::LorentzRotation::SetComponents ( IT  begin,
IT  end 
)
inline

Set the 16 matrix components given an iterator to the start of the desired data, and another to the end (16 past start).

Definition at line 256 of file LorentzRotation.h.

void ROOT::Math::LorentzRotation::SetComponents ( Scalar  xx,
Scalar  xy,
Scalar  xz,
Scalar  xt,
Scalar  yx,
Scalar  yy,
Scalar  yz,
Scalar  yt,
Scalar  zx,
Scalar  zy,
Scalar  zz,
Scalar  zt,
Scalar  tx,
Scalar  ty,
Scalar  tz,
Scalar  tt 
)
inline

Set the components from sixteen scalars – UNCHECKED for orthosymplectic.

Definition at line 325 of file LorentzRotation.h.

template<class ForeignMatrix >
void ROOT::Math::LorentzRotation::SetRotationMatrix ( const ForeignMatrix &  m)
inline

Set components from a linear algebra matrix of size at least 4x4, which must support operator()(i,j) to obtain elements (0,0) thru (3,3).

Precondition: The matrix is assumed to be orthosymplectic. NO checking or re-adjusting is performed.

Definition at line 300 of file LorentzRotation.h.

Referenced by testTransform3D().

Member Data Documentation

Scalar ROOT::Math::LorentzRotation::fM[16]
private

The documentation for this class was generated from the following files: