Class describing a generic LorentzVector in the 4D space-time, using the specified coordinate system for the spatial vector part. The metric used for the LorentzVector is (-,-,-,+). In the case of LorentzVector we don't distinguish the concepts of points and displacement vectors as in the 3D case, since the main use case for 4D Vectors is to describe the kinematics of relativistic particles. A LorentzVector behaves like a DisplacementVector in 4D. The Minkowski components could be viewed as v and t, or for kinematic 4-vectors, as p and E. @ingroup GenVector
ROOT::Math::PtEtaPhiE4D<double> | fCoordinates | internal coordinate system |
------ assignment ------ Assignment operator from a lorentz vector of arbitrary type
------ Set, Get, and access coordinate data ------ Retrieve a const reference to the coordinates object
Set internal data based on an array of 4 Scalar numbers
get internal data into 4 Scalar numbers
{ fCoordinates.GetCoordinates(a, b, c, d); }
get internal data into an array of 4 Scalar numbers
{ fCoordinates.GetCoordinates(dest); }
------------------- Equality ----------------- Exact equality
------ Individual element access, in various coordinate systems ------ individual coordinate accessors in various coordinate systems spatial X component
{ return fCoordinates.Px(); }
return 4-th component (time, or energy for a 4-momentum vector)
{ return fCoordinates.Pz(); }
return magnitude (mass) using the (-,-,-,+) metric. If M2 is negative (space-like vector) a GenVector_exception is suggested and if continuing, - sqrt( -M2) is returned
{ return fCoordinates.M2(); }
------ Operations combining two Lorentz vectors ------ scalar (Dot) product of two LorentzVector vectors (metric is -,-,-,+) Enable the product using any other LorentzVector implementing the x(), y() , y() and t() member functions \param q any LorentzVector implementing the x(), y() , z() and t() member functions \return the result of v.q of type according to the base scalar type of v
LorentzVector<CoordinateType> v(*this); v.Negate();
Determine if momentum-energy can represent a massless particle
The beta vector for the boost that would bring this vector into its center of mass frame (zero momentum)
TODO - should attempt to Throw with msg about boostVector computed for LorentzVector with t=0
Method providing limited backward name compatibility with CLHEP ----
{ return fCoordinates.Px(); }
Methods setting a Single-component Work only if the component is one of which the vector is represented. For example SetE will work for a PxPyPzE Vector but not for a PxPyPzM Vector.
{ fCoordinates.SetE (a); return *this; }
{ fCoordinates.SetEta(a); return *this; }
{ fCoordinates.SetM (a); return *this; }
{ fCoordinates.SetPhi(a); return *this; }
{ fCoordinates.SetPt (a); return *this; }
{ fCoordinates.SetPx (a); return *this; }
{ fCoordinates.SetPy (a); return *this; }
{ fCoordinates.SetPz (a); return *this; }