1 #ifndef RIVET_MATH_LORENTZTRANS 2 #define RIVET_MATH_LORENTZTRANS 4 #include "Rivet/Math/MathHeader.hh" 5 #include "Rivet/Math/MathUtils.hh" 6 #include "Rivet/Math/MatrixN.hh" 7 #include "Rivet/Math/Matrix3.hh" 8 #include "Rivet/Math/Vector4.hh" 29 return 1.0 / sqrt(1 -
sqr(beta));
34 return sqrt(1 -
sqr(1/gamma));
103 assert(vbeta.
mod2() < 1);
104 const double beta = vbeta.
mod();
107 _boostMatrix.set(0, 0, gamma);
108 _boostMatrix.set(1, 1, gamma);
109 _boostMatrix.set(0, 1, +beta*gamma);
110 _boostMatrix.set(1, 0, +beta*gamma);
111 if (beta > 0) _boostMatrix =
rotate(Vector3::mkX(), vbeta)._boostMatrix;
119 if (boost.isZero())
return Vector3();
120 assert(boost.E() > 0);
121 const double beta = boost.p3().mod() / boost.E();
122 return boost.p3().unit() *
beta;
136 _boostMatrix.set(0, 0, gamma);
137 _boostMatrix.set(1, 1, gamma);
138 _boostMatrix.set(0, 1, +beta*gamma);
139 _boostMatrix.set(1, 0, +beta*gamma);
140 if (beta > 0) _boostMatrix =
rotate(Vector3::mkX(), vgamma)._boostMatrix;
147 if (boost.isZero())
return Vector3();
148 assert(boost.E() > 0);
149 const double beta = boost.p3().mod() / boost.E();
150 return boost.p3().unit() *
beta;
163 return multiply(_boostMatrix, v4);
168 return multiply(_boostMatrix, v4);
198 const Matrix4 rot4 = _mkMatrix4(rot);
200 lt._boostMatrix = newlt;
207 rtn._boostMatrix = _boostMatrix.
inverse();
214 rtn._boostMatrix = _boostMatrix * lt._boostMatrix;
225 _boostMatrix = multiply(_mkMatrix4(m3),_boostMatrix);
231 _boostMatrix *= _mkMatrix4(m3);
247 Matrix4 m4 = Matrix4::mkIdentity();
248 for (
size_t i = 0; i < 3; ++i) {
249 for (
size_t j = 0; j < 3; ++j) {
250 m4.set(i+1, j+1, m3.get(i, j));
Definition: ALICE_2010_I880049.cc:13
Vector3 betaVec() const
Definition: Vector4.hh:671
bool isZero(double tolerance=1E-5) const
Check for nullness, allowing for numerical precision.
Definition: VectorN.hh:75
double mod2() const
Calculate the modulus-squared of a vector. .
Definition: VectorN.hh:84
Matrix< N > inverse() const
Calculate inverse.
Definition: MatrixN.hh:134
Specialisation of MatrixN to aid 3 dimensional rotations.
Definition: Matrix3.hh:13
double angle(const Vector3 &a, const Vector3 &b)
Angle (in radians) between two 3-vectors.
Definition: Vector3.hh:286
General -dimensional mathematical matrix object.
Definition: MatrixN.hh:14
Specialisation of VectorN to a general (non-momentum) Lorentz 4-vector.
Definition: Vector4.hh:22
std::string toString(const AnalysisInfo &ai)
String representation.
Definition: AnalysisInfo.cc:144
Three-dimensional specialisation of Vector.
Definition: Vector3.hh:26
Specialized version of the FourVector with momentum/energy functionality.
Definition: Vector4.hh:301
std::enable_if< std::is_arithmetic< NUM >::value, NUM >::type sqr(NUM a)
Named number-type squaring operation.
Definition: MathUtils.hh:189
double mod() const
Calculate the modulus of a vector. .
Definition: VectorN.hh:95