#include <LorentzTrans.hh>
Definition at line 21 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 25 of file LorentzTrans.hh.
References LorentzTransform::_boostMatrix.
00025 { 00026 _boostMatrix = Matrix<4>::mkIdentity(); 00027 }
LorentzTransform | ( | const Vector3 & | boost | ) | [inline] |
LorentzTransform | ( | const double | betaX, | |
const double | betaY, | |||
const double | betaZ | |||
) | [inline] |
Definition at line 33 of file LorentzTrans.hh.
References LorentzTransform::setBoost().
00033 { 00034 setBoost(betaX, betaY, betaZ); 00035 }
LorentzTransform& setBoost | ( | const Vector3 & | boost | ) | [inline] |
Definition at line 37 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().
00037 { 00038 assert(boost.mod2() < 1); 00039 const double beta = boost.mod(); 00040 const double gamma = lorentzGamma(beta); 00041 _boostMatrix = Matrix<4>::mkIdentity(); 00042 _boostMatrix.set(0, 0, gamma); 00043 _boostMatrix.set(1, 1, gamma); 00044 // Positive coeff since these are active boosts 00045 _boostMatrix.set(0, 1, +beta*gamma); 00046 _boostMatrix.set(1, 0, +beta*gamma); 00047 _boostMatrix = rotate(Vector3::mkX(), boost)._boostMatrix; 00048 return *this; 00049 }
LorentzTransform& setBoost | ( | const double | betaX, | |
const double | betaY, | |||
const double | betaZ | |||
) | [inline] |
Definition at line 56 of file LorentzTrans.hh.
References LorentzTransform::setBoost().
00056 { 00057 return setBoost(Vector3(betaX, betaY, betaZ)); 00058 }
Vector3 boost | ( | ) | const [inline] |
Definition at line 60 of file LorentzTrans.hh.
References LorentzTransform::_boostMatrix, LorentzTransform::beta(), Matrix::getColumn(), Vector::isZero(), Vector::mod(), and Vector3::unit().
Referenced by LorentzTransform::beta().
00060 { 00061 FourMomentum boost(_boostMatrix.getColumn(0)); 00062 //cout << "!!!" << boost << endl; 00063 if (boost.isZero()) return boost; 00064 assert(boost.E() > 0); 00065 const double beta = boost.p().mod() / boost.E(); 00066 return boost.p().unit() * beta; 00067 }
double beta | ( | ) | const [inline] |
Definition at line 69 of file LorentzTrans.hh.
References LorentzTransform::boost(), and Vector::mod().
Referenced by LorentzTransform::boost(), LorentzTransform::gamma(), and LorentzTransform::setBoost().
00069 { 00070 return boost().mod(); 00071 }
double gamma | ( | ) | const [inline] |
Definition at line 73 of file LorentzTrans.hh.
References LorentzTransform::beta(), and Rivet::lorentzGamma().
Referenced by LorentzTransform::setBoost().
00073 { 00074 return lorentzGamma(beta()); 00075 }
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().
00077 { 00078 return rotate(Matrix3(from, to)); 00079 }
LorentzTransform rotate | ( | const Vector3 & | axis, | |
const double | angle | |||
) | const [inline] |
LorentzTransform rotate | ( | const Matrix3 & | rot | ) | const [inline] |
Definition at line 85 of file LorentzTrans.hh.
References LorentzTransform::_boostMatrix, Matrix::inverse(), and LorentzTransform::mkMatrix4().
00085 { 00086 LorentzTransform lt = *this; 00087 const Matrix4 rot4 = mkMatrix4(rot); 00088 const Matrix4 newlt = rot4 * _boostMatrix * rot4.inverse(); 00089 lt._boostMatrix = newlt; 00090 return lt; 00091 }
FourVector transform | ( | const FourVector & | v4 | ) | const [inline] |
Definition at line 93 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().
00093 { 00094 return multiply(_boostMatrix, v4); 00095 }
LorentzTransform inverse | ( | ) | const [inline] |
Definition at line 97 of file LorentzTrans.hh.
References LorentzTransform::_boostMatrix, and Matrix::inverse().
Referenced by Rivet::inverse().
00097 { 00098 LorentzTransform rtn; 00099 rtn._boostMatrix = _boostMatrix.inverse(); 00100 return rtn; 00101 }
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().
00105 { 00106 LorentzTransform rtn; 00107 rtn._boostMatrix = _boostMatrix * lt._boostMatrix; 00108 return rtn; 00109 }
Matrix4 toMatrix | ( | ) | const [inline] |
Definition at line 111 of file LorentzTrans.hh.
References LorentzTransform::_boostMatrix.
00111 { 00112 return _boostMatrix; 00113 }
LorentzTransform operator* | ( | const LorentzTransform & | lt | ) | const [inline] |
Definition at line 116 of file LorentzTrans.hh.
References LorentzTransform::combine().
00116 { 00117 return combine(lt); 00118 }
LorentzTransform preMult | ( | const Matrix3 & | m3 | ) | [inline] |
Definition at line 120 of file LorentzTrans.hh.
References LorentzTransform::_boostMatrix, LorentzTransform::mkMatrix4(), and Rivet::multiply().
Referenced by DISKinematics::project().
00120 { 00121 _boostMatrix = multiply(mkMatrix4(m3),_boostMatrix); 00122 return *this; 00123 }
LorentzTransform postMult | ( | const Matrix3 & | m3 | ) | [inline] |
Definition at line 125 of file LorentzTrans.hh.
References LorentzTransform::_boostMatrix, and LorentzTransform::mkMatrix4().
00125 { 00126 _boostMatrix *= mkMatrix4(m3); 00127 return *this; 00128 }
Definition at line 131 of file LorentzTrans.hh.
References Matrix::get(), Matrix< 4 >::mkIdentity(), and Matrix::set().
Referenced by LorentzTransform::postMult(), LorentzTransform::preMult(), and LorentzTransform::rotate().
00131 { 00132 Matrix4 m4 = Matrix4::mkIdentity(); 00133 for (size_t i = 0; i < 3; ++i) { 00134 for (size_t j = 0; j < 3; ++j) { 00135 m4.set(i+1, j+1, m3.get(i, j)); 00136 } 00137 } 00138 return m4; 00139 }
string toString | ( | const LorentzTransform & | lt | ) | [friend] |
Definition at line 165 of file LorentzTrans.hh.
00165 { 00166 return toString(lt._boostMatrix); 00167 }
Matrix4 _boostMatrix [private] |
Definition at line 143 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().