FourVector Class Reference Specialisation of VectorN to a general (non-momentum) Lorentz 4-vector. More...
Detailed DescriptionSpecialisation of VectorN to a general (non-momentum) Lorentz 4-vector.
Definition at line 22 of file Vector4.hh. Constructor & Destructor Documentation
Definition at line 30 of file Vector4.hh. : Vector<4>() { }
Definition at line 40 of file Vector4.hh. : Vector<4>(other) { }
Definition at line 50 of file Vector4.hh. { } Member Function Documentation
Angle between this vector and another. Definition at line 80 of file Vector4.hh. Angle between this vector and another (3-vector) Definition at line 84 of file Vector4.hh.
Angle subtended by the 3-vector's projection in x-y and the x-axis. Definition at line 117 of file Vector4.hh. { return vector3().azimuthalAngle(mapping); }
Contract two 4-vectors, with metric signature (+ - - -). Definition at line 163 of file Vector4.hh. { return contract(v); }
Definition at line 33 of file VectorN.hh. { if (index >= N) { throw std::runtime_error("Tried to access an invalid vector index."); } else { return _vec(index); } }
Definition at line 41 of file VectorN.hh. { if (index >= N) { throw std::runtime_error("Tried to access an invalid vector index."); } else { return _vec(index); } }
Definition at line 75 of file Vector4.hh. { return Rivet::isZero(invariant()); }
Check for nullness, allowing for numerical precision. Definition at line 75 of file VectorN.hh. { for (size_t i=0; i < N; ++i) { if (! Rivet::isZero(_vec[i], tolerance) ) return false; } return true; }
Calculate the modulus of a vector. Definition at line 95 of file VectorN.hh. { const double norm = mod2(); assert(norm >= 0); return sqrt(norm); }
Calculate the modulus-squared of a vector. Definition at line 84 of file VectorN.hh. Definition at line 112 of file VectorN.hh. { return _vec != a._vec; }
Contract two 4-vectors, with metric signature (+ - - -). Definition at line 168 of file Vector4.hh. { return contract(v); }
Add to this 4-vector. Definition at line 185 of file Vector4.hh.
Multiply all components (space and time) by -1. Reimplemented from Vector< 4 >. Reimplemented in FourMomentum. Definition at line 197 of file Vector4.hh. { FourVector result; result._vec = -_vec; return result; }
Subtract from this 4-vector. NB time as well as space components are subtracted. Definition at line 191 of file Vector4.hh.
Definition at line 116 of file VectorN.hh. { return _vec < a._vec; }
Definition at line 120 of file VectorN.hh. { return _vec <= a._vec; }
Definition at line 108 of file VectorN.hh. { return _vec == a._vec; }
Definition at line 124 of file VectorN.hh. { return _vec > a._vec; }
Definition at line 128 of file VectorN.hh. { return _vec >= a._vec; }
Direct access to vector elements by index. Definition at line 50 of file VectorN.hh. { return get(index); }
Direct access to vector elements by index. Definition at line 55 of file VectorN.hh. { return get(index); }
Synonym for azimuthalAngle. Definition at line 121 of file Vector4.hh.
Angle subtended by the 3-vector and the z-axis. Definition at line 126 of file Vector4.hh. { return vector3().polarAngle(); }
Projection of 3-vector on to the Definition at line 104 of file Vector4.hh. { return vector3().polarRadius(); }
Square of the projection of the 3-vector on to the Definition at line 91 of file Vector4.hh. { return vector3().polarRadius2(); }
Pseudorapidity (defined purely by the 3-vector components) Definition at line 135 of file Vector4.hh. { return vector3().pseudorapidity(); }
Multiply space components only by -1. Reimplemented in FourMomentum. Definition at line 204 of file Vector4.hh. { FourVector result = -*this; result.setT(-result.t()); return result; }
Set indexed value. Definition at line 60 of file VectorN.hh. { if (index >= N) { throw std::runtime_error("Tried to access an invalid vector index."); } else { _vec[index] = value; } return *this; }
Definition at line 56 of file Vector4.hh. { set(0, t); return *this; }
Definition at line 60 of file Vector4.hh. { set(1, x); return *this; }
Definition at line 64 of file Vector4.hh. { set(2, y); return *this; }
Definition at line 68 of file Vector4.hh. { set(3, z); return *this; }
Definition at line 54 of file Vector4.hh. { return get(0); }
Definition at line 55 of file Vector4.hh.
Get the spatial part of the 4-vector as a 3-vector. Definition at line 149 of file Vector4.hh. { return Vector3(get(1), get(2), get(3)); }
Definition at line 58 of file Vector4.hh. { return get(1); }
Definition at line 59 of file Vector4.hh.
Definition at line 62 of file Vector4.hh. { return get(2); }
Definition at line 63 of file Vector4.hh.
Definition at line 66 of file Vector4.hh. { return get(3); }
Definition at line 67 of file Vector4.hh. Friends And Related Function Documentation
Definition at line 245 of file Vector4.hh. { FourVector result; result._vec = a._vec + b._vec; return result; }
Definition at line 223 of file Vector4.hh. { FourVector result; result._vec = a * v._vec; return result; }
Definition at line 229 of file Vector4.hh. { return multiply(a, v); }
Definition at line 250 of file LorentzTrans.hh. {
return lt.transform(v4);
}
Member Data Documentation
Vector. Definition at line 133 of file VectorN.hh. The documentation for this class was generated from the following file: Generated on Tue Dec 13 2016 16:32:46 for The Rivet MC analysis system by ![]() |