rivet is hosted by Hepforge, IPPP Durham

Object implementing Lorentz transform calculations and boosts. More...

#include <LorentzTrans.hh>

Collaboration diagram for LorentzTransform:

List of all members.

Public Member Functions

 LorentzTransform ()
 LorentzTransform (const Vector3 &boost)
 LorentzTransform (const double betaX, const double betaY, const double betaZ)
LorentzTransformsetBoost (const Vector3 &boost)
LorentzTransformsetBoost (const double betaX, const double betaY, const double betaZ)
Vector3 boost () const
double beta () const
double gamma () const
LorentzTransform rotate (const Vector3 &from, const Vector3 &to) const
LorentzTransform rotate (const Vector3 &axis, const double angle) const
LorentzTransform rotate (const Matrix3 &rot) const
FourVector transform (const FourVector &v4) const
LorentzTransform inverse () const
LorentzTransform combine (const LorentzTransform &lt) const
 Combine LTs, treating this as the LH matrix.
Matrix4 toMatrix () const
LorentzTransform operator* (const LorentzTransform &lt) const
LorentzTransform preMult (const Matrix3 &m3)
LorentzTransform postMult (const Matrix3 &m3)

Private Member Functions

Matrix4 mkMatrix4 (const Matrix3 &m3) const

Private Attributes

Matrix4 _boostMatrix

Friends

string toString (const LorentzTransform &lt)

Detailed Description

Object implementing Lorentz transform calculations and boosts.

Definition at line 21 of file LorentzTrans.hh.


Constructor & Destructor Documentation

LorentzTransform ( ) [inline]

Definition at line 25 of file LorentzTrans.hh.

References LorentzTransform::_boostMatrix.

LorentzTransform ( const Vector3 boost) [inline]

Definition at line 29 of file LorentzTrans.hh.

References LorentzTransform::setBoost().

                                           {
      setBoost(boost);
    }
LorentzTransform ( const double  betaX,
const double  betaY,
const double  betaZ 
) [inline]

Definition at line 33 of file LorentzTrans.hh.

References LorentzTransform::setBoost().

                                                                                 {
      setBoost(betaX, betaY, betaZ);
    }

Member Function Documentation

double beta ( ) const [inline]
Vector3 boost ( ) const [inline]

Definition at line 60 of file LorentzTrans.hh.

References LorentzTransform::_boostMatrix, LorentzTransform::beta(), Matrix< N >::getColumn(), Vector< N >::isZero(), Vector< N >::mod(), and Vector3::unit().

Referenced by LorentzTransform::beta().

                          {
      FourMomentum boost(_boostMatrix.getColumn(0));
      //cout << "!!!" << boost << endl;
      if (boost.isZero()) return boost;
      assert(boost.E() > 0);
      const double beta = boost.p().mod() / boost.E();
      return boost.p().unit() * beta;
    }
LorentzTransform combine ( const LorentzTransform lt) const [inline]

Combine LTs, treating this as the LH matrix.

Definition at line 105 of file LorentzTrans.hh.

References LorentzTransform::_boostMatrix.

Referenced by Rivet::combine(), LorentzTransform::operator*(), and DISKinematics::project().

                                                               {
      LorentzTransform rtn;
      rtn._boostMatrix = _boostMatrix * lt._boostMatrix;
      return rtn;
    }
double gamma ( ) const [inline]

Definition at line 73 of file LorentzTrans.hh.

References LorentzTransform::beta(), and Rivet::lorentzGamma().

Referenced by LorentzTransform::setBoost().

                         {
      return lorentzGamma(beta());
    }
Matrix4 mkMatrix4 ( const Matrix3 m3) const [inline, private]

Definition at line 131 of file LorentzTrans.hh.

References Matrix< N >::get(), Matrix< 4 >::mkIdentity(), and Matrix< N >::set().

Referenced by LorentzTransform::postMult(), LorentzTransform::preMult(), and LorentzTransform::rotate().

                                               {
      Matrix4 m4 = Matrix4::mkIdentity();
      for (size_t i = 0; i < 3; ++i) {
        for (size_t j = 0; j < 3; ++j) {
          m4.set(i+1, j+1, m3.get(i, j));
        }
      }
      return m4;
    }
LorentzTransform operator* ( const LorentzTransform lt) const [inline]

Definition at line 116 of file LorentzTrans.hh.

References LorentzTransform::combine().

                                                                 {
      return combine(lt);
    }
LorentzTransform postMult ( const Matrix3 m3) [inline]

Definition at line 125 of file LorentzTrans.hh.

References LorentzTransform::_boostMatrix, and LorentzTransform::mkMatrix4().

                                                  {
      _boostMatrix *= mkMatrix4(m3);
      return *this;
    }
LorentzTransform rotate ( const Vector3 from,
const Vector3 to 
) const [inline]

Definition at line 77 of file LorentzTrans.hh.

Referenced by LorentzTransform::rotate(), and LorentzTransform::setBoost().

                                                                          {
      return rotate(Matrix3(from, to));
    }
LorentzTransform rotate ( const Vector3 axis,
const double  angle 
) const [inline]

Definition at line 81 of file LorentzTrans.hh.

References LorentzTransform::rotate().

                                                                           {
      return rotate(Matrix3(axis, angle));
    }
LorentzTransform rotate ( const Matrix3 rot) const [inline]

Definition at line 85 of file LorentzTrans.hh.

References LorentzTransform::_boostMatrix, Matrix< N >::inverse(), and LorentzTransform::mkMatrix4().

                                                      {
      LorentzTransform lt = *this;
      const Matrix4 rot4 = mkMatrix4(rot);
      const Matrix4 newlt = rot4 * _boostMatrix * rot4.inverse();
      lt._boostMatrix = newlt;
      return lt;
    }
LorentzTransform& setBoost ( const Vector3 boost) [inline]
LorentzTransform& setBoost ( const double  betaX,
const double  betaY,
const double  betaZ 
) [inline]

Definition at line 56 of file LorentzTrans.hh.

References LorentzTransform::setBoost().

                                                                                           {
      return setBoost(Vector3(betaX, betaY, betaZ));
    }
Matrix4 toMatrix ( ) const [inline]

Definition at line 111 of file LorentzTrans.hh.

References LorentzTransform::_boostMatrix.

                             {
      return _boostMatrix;
    }

Friends And Related Function Documentation

string toString ( const LorentzTransform lt) [friend]

Definition at line 165 of file LorentzTrans.hh.

                                                     {
    return toString(lt._boostMatrix);
  }

Member Data Documentation


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