#include <LorentzTrans.hh>
Definition at line 20 of file LorentzTrans.hh.
Public Member Functions | |
LorentzTransform () | |
LorentzTransform (const Vector3 &boost) | |
LorentzTransform (const double betaX, const double betaY, const double betaZ) | |
LorentzTransform & | setBoost (const Vector3 &boost) |
LorentzTransform & | setBoost (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 <) const |
Combine LTs, treating this as the LH matrix. | |
Matrix4 | toMatrix () const |
LorentzTransform | operator* (const LorentzTransform <) 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 <) |
LorentzTransform | ( | ) | [inline] |
Definition at line 24 of file LorentzTrans.hh.
References LorentzTransform::_boostMatrix.
00024 { 00025 _boostMatrix = Matrix<4>::mkIdentity(); 00026 }
LorentzTransform | ( | const Vector3 & | boost | ) | [inline] |
LorentzTransform | ( | const double | betaX, | |
const double | betaY, | |||
const double | betaZ | |||
) | [inline] |
Definition at line 32 of file LorentzTrans.hh.
References LorentzTransform::setBoost().
00032 { 00033 setBoost(betaX, betaY, betaZ); 00034 }
LorentzTransform& setBoost | ( | const Vector3 & | boost | ) | [inline] |
Definition at line 36 of file LorentzTrans.hh.
References LorentzTransform::_boostMatrix, LorentzTransform::beta(), LorentzTransform::gamma(), Rivet::lorentzGamma(), Vector3::mkX(), Vector::mod(), Vector::mod2(), LorentzTransform::rotate(), and Matrix::set().
Referenced by LorentzTransform::LorentzTransform(), DISKinematics::project(), and LorentzTransform::setBoost().
00036 { 00037 assert(boost.mod2() < 1); 00038 const double beta = boost.mod(); 00039 const double gamma = lorentzGamma(beta); 00040 _boostMatrix = Matrix<4>::mkIdentity(); 00041 _boostMatrix.set(0, 0, gamma); 00042 _boostMatrix.set(1, 1, gamma); 00043 // Positive coeff since these are active boosts 00044 _boostMatrix.set(0, 1, +beta*gamma); 00045 _boostMatrix.set(1, 0, +beta*gamma); 00046 _boostMatrix = rotate(Vector3::mkX(), boost)._boostMatrix; 00047 return *this; 00048 }
LorentzTransform& setBoost | ( | const double | betaX, | |
const double | betaY, | |||
const double | betaZ | |||
) | [inline] |
Definition at line 55 of file LorentzTrans.hh.
References LorentzTransform::setBoost().
00055 { 00056 return setBoost(Vector3(betaX, betaY, betaZ)); 00057 }
Vector3 boost | ( | ) | const [inline] |
Definition at line 59 of file LorentzTrans.hh.
References LorentzTransform::_boostMatrix, LorentzTransform::beta(), Matrix::getColumn(), Vector::isZero(), Vector::mod(), and Vector3::unit().
Referenced by LorentzTransform::beta().
00059 { 00060 FourMomentum boost(_boostMatrix.getColumn(0)); 00061 //cout << "!!!" << boost << endl; 00062 if (boost.isZero()) return boost; 00063 assert(boost.E() > 0); 00064 const double beta = boost.p().mod() / boost.E(); 00065 return boost.p().unit() * beta; 00066 }
double beta | ( | ) | const [inline] |
Definition at line 68 of file LorentzTrans.hh.
References LorentzTransform::boost(), and Vector::mod().
Referenced by LorentzTransform::boost(), LorentzTransform::gamma(), and LorentzTransform::setBoost().
00068 { 00069 return boost().mod(); 00070 }
double gamma | ( | ) | const [inline] |
Definition at line 72 of file LorentzTrans.hh.
References LorentzTransform::beta(), and Rivet::lorentzGamma().
Referenced by LorentzTransform::setBoost().
00072 { 00073 return lorentzGamma(beta()); 00074 }
LorentzTransform rotate | ( | const Vector3 & | from, | |
const Vector3 & | to | |||
) | const [inline] |
Definition at line 76 of file LorentzTrans.hh.
Referenced by LorentzTransform::rotate(), and LorentzTransform::setBoost().
00076 { 00077 return rotate(Matrix3(from, to)); 00078 }
LorentzTransform rotate | ( | const Vector3 & | axis, | |
const double | angle | |||
) | const [inline] |
LorentzTransform rotate | ( | const Matrix3 & | rot | ) | const [inline] |
Definition at line 84 of file LorentzTrans.hh.
References LorentzTransform::_boostMatrix, Matrix::inverse(), and LorentzTransform::mkMatrix4().
00084 { 00085 LorentzTransform lt = *this; 00086 const Matrix4 rot4 = mkMatrix4(rot); 00087 const Matrix4 newlt = rot4 * _boostMatrix * rot4.inverse(); 00088 lt._boostMatrix = newlt; 00089 return lt; 00090 }
FourVector transform | ( | const FourVector & | v4 | ) | const [inline] |
Definition at line 92 of file LorentzTrans.hh.
References LorentzTransform::_boostMatrix, and Rivet::multiply().
Referenced by H1_2000_S4129130::analyze(), H1_1994_S2919893::analyze(), DISKinematics::project(), and Rivet::transform().
00092 { 00093 return multiply(_boostMatrix, v4); 00094 }
LorentzTransform inverse | ( | ) | const [inline] |
Definition at line 96 of file LorentzTrans.hh.
References LorentzTransform::_boostMatrix, and Matrix::inverse().
Referenced by Rivet::inverse().
00096 { 00097 LorentzTransform rtn; 00098 rtn._boostMatrix = _boostMatrix.inverse(); 00099 return rtn; 00100 }
LorentzTransform combine | ( | const LorentzTransform & | lt | ) | const [inline] |
Combine LTs, treating this as the LH matrix.
Definition at line 104 of file LorentzTrans.hh.
References LorentzTransform::_boostMatrix.
Referenced by Rivet::combine(), LorentzTransform::operator*(), and DISKinematics::project().
00104 { 00105 LorentzTransform rtn; 00106 rtn._boostMatrix = _boostMatrix * lt._boostMatrix; 00107 return rtn; 00108 }
Matrix4 toMatrix | ( | ) | const [inline] |
Definition at line 110 of file LorentzTrans.hh.
References LorentzTransform::_boostMatrix.
00110 { 00111 return _boostMatrix; 00112 }
LorentzTransform operator* | ( | const LorentzTransform & | lt | ) | const [inline] |
Definition at line 115 of file LorentzTrans.hh.
References LorentzTransform::combine().
00115 { 00116 return combine(lt); 00117 }
LorentzTransform preMult | ( | const Matrix3 & | m3 | ) | [inline] |
Definition at line 119 of file LorentzTrans.hh.
References LorentzTransform::_boostMatrix, LorentzTransform::mkMatrix4(), and Rivet::multiply().
Referenced by DISKinematics::project().
00119 { 00120 _boostMatrix = multiply(mkMatrix4(m3),_boostMatrix); 00121 return *this; 00122 }
LorentzTransform postMult | ( | const Matrix3 & | m3 | ) | [inline] |
Definition at line 124 of file LorentzTrans.hh.
References LorentzTransform::_boostMatrix, and LorentzTransform::mkMatrix4().
00124 { 00125 _boostMatrix *= mkMatrix4(m3); 00126 return *this; 00127 }
Definition at line 130 of file LorentzTrans.hh.
References Matrix::get(), Matrix< 4 >::mkIdentity(), and Matrix::set().
Referenced by LorentzTransform::postMult(), LorentzTransform::preMult(), and LorentzTransform::rotate().
00130 { 00131 Matrix4 m4 = Matrix4::mkIdentity(); 00132 for (size_t i = 0; i < 3; ++i) { 00133 for (size_t j = 0; j < 3; ++j) { 00134 m4.set(i+1, j+1, m3.get(i, j)); 00135 } 00136 } 00137 return m4; 00138 }
string toString | ( | const LorentzTransform & | lt | ) | [friend] |
Definition at line 164 of file LorentzTrans.hh.
00164 { 00165 return toString(lt._boostMatrix); 00166 }
Matrix4 _boostMatrix [private] |
Definition at line 142 of file LorentzTrans.hh.
Referenced by LorentzTransform::boost(), LorentzTransform::combine(), LorentzTransform::inverse(), LorentzTransform::LorentzTransform(), LorentzTransform::postMult(), LorentzTransform::preMult(), LorentzTransform::rotate(), LorentzTransform::setBoost(), LorentzTransform::toMatrix(), Rivet::toString(), and LorentzTransform::transform().