# class ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<Double32_t> >


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



## Data Members

private:
 ROOT::Math::PxPyPzE4D fCoordinates internal coordinate system

## Function documentation

LorentzVector & operator=( const LorentzVector<OtherCoords> & v)
 ------ assignment ------

Assignment operator from a lorentz vector of arbitrary type


const CoordSystem & Coordinates() const
 ------ Set, Get, and access coordinate data ------

Retrieve a const reference to  the coordinates object


LorentzVector<CoordSystem>& SetCoordinates(const Scalar[] src)
          Set internal data based on an array of 4 Scalar numbers



          get internal data into 4 Scalar numbers


{ fCoordinates.GetCoordinates(a, b, c, d); }
void GetCoordinates(Scalar[] dest) const
          get internal data into an array of 4 Scalar numbers


{ fCoordinates.GetCoordinates(dest); }
bool operator==(const ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >& rhs) const
 ------------------- Equality -----------------

Exact equality


bool operator!=(const ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >& rhs) const
Scalar Px() const
 ------ Individual element access, in various coordinate systems ------
individual coordinate accessors in various coordinate systems

spatial X component


{ return fCoordinates.Px(); }
Scalar X() const
          spatial Y component


{ return fCoordinates.Px(); }
Scalar Py() const
{ return fCoordinates.Py(); }
Scalar Y() const
          spatial Z component


{ return fCoordinates.Py(); }
Scalar Pz() const
{ return fCoordinates.Pz(); }
Scalar Z() const
          return 4-th component (time, or energy for a 4-momentum vector)


{ return fCoordinates.Pz(); }
Scalar E() const
{ return fCoordinates.E(); }
Scalar T() const
          return magnitude (mass) squared  M2 = T**2 - X**2 - Y**2 - Z**2
(we use -,-,-,+ metric)


{ return fCoordinates.E(); }
Scalar M2() const
          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(); }
Scalar M() const
          return the spatial (3D) magnitude ( sqrt(X**2 + Y**2 + Z**2) )


{ return fCoordinates.M();}
Scalar R() const
{ return fCoordinates.R(); }
Scalar P() const
          return the square of the spatial (3D) magnitude ( X**2 + Y**2 + Z**2 )


{ return fCoordinates.R(); }
Scalar P2() const
          return the square of the transverse spatial component ( X**2 + Y**2 )


{ return P() * P(); }
Scalar Perp2() const
{ return fCoordinates.Perp2();}
Scalar Pt() const
          return the  transverse spatial component sqrt ( X**2 + Y**2 )


{ return fCoordinates.Pt(); }
Scalar Rho() const
{ return fCoordinates.Pt(); }
Scalar Mt2() const
          return the transverse mass squared
\f[ m_t^2 = E^2 - p{_z}^2 \f]


{ return fCoordinates.Mt2(); }
Scalar Mt() const
          return the transverse mass
\f[ \sqrt{ m_t^2 = E^2 - p{_z}^2} X sign(E^ - p{_z}^2) \f]


{ return fCoordinates.Mt(); }
Scalar Et2() const
          return the transverse energy squared
\f[ e_t = \frac{E^2 p_{\perp}^2 }{ |p|^2 } \f]


{ return fCoordinates.Et2(); }
Scalar Et() const
          return the transverse energy
\f[ e_t = \sqrt{ \frac{E^2 p_{\perp}^2 }{ |p|^2 } } X sign(E) \f]


{ return fCoordinates.Et(); }
Scalar Phi() const
          azimuthal  Angle


{ return fCoordinates.Phi();}
Scalar Theta() const
          polar Angle


{ return fCoordinates.Theta(); }
Scalar Eta() const
          pseudorapidity
\f[ \eta = - \ln { \tan { \frac { \theta} {2} } } \f]


{ return fCoordinates.Eta(); }
return operator*( Scalar(-1) )
LorentzVector<CoordinateType> v(*this);
v.Negate();

Scalar Rapidity() const
 ---- Relativistic Properties ----

Rapidity relative to the Z axis:  .5 log [(E+Pz)/(E-Pz)]


Scalar ColinearRapidity() const
          Rapidity in the direction of travel: atanh (|P|/E)=.5 log[(E+P)/(E-P)]


bool isTimelike() const
          Determine if momentum-energy can represent a physical massive particle


bool isLightlike(ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >::Scalar tolerance = 100 * std::numeric_limits<Scalar>::epsilon()) const
          Determine if momentum-energy can represent a massless particle


bool isSpacelike() const
          Determine if momentum-energy is spacelike, and represents a tachyon


BetaVector BoostToCM() const
          The beta vector for the boost that would bring this vector into
its center of mass frame (zero momentum)


return - Vect()
 TODO - should attempt to Throw with msg about
boostVector computed for LorentzVector with t=0

Scalar Beta() const
beta and gamma

Return beta scalar value


Scalar Gamma() const
           Return Gamma scalar value


Scalar x() const
 Method providing limited backward name compatibility with CLHEP ----

{ return fCoordinates.Px(); }
Scalar y() const
{ return fCoordinates.Py(); }
Scalar z() const
{ return fCoordinates.Pz(); }
Scalar t() const
{ return fCoordinates.E(); }
Scalar px() const
{ return fCoordinates.Px(); }
Scalar py() const
{ return fCoordinates.Py(); }
Scalar pz() const
{ return fCoordinates.Pz(); }
Scalar e() const
{ return fCoordinates.E(); }
Scalar theta() const
{ return fCoordinates.Theta(); }
Scalar phi() const
{ return fCoordinates.Phi(); }
Scalar rho() const
{ return fCoordinates.Rho(); }
Scalar eta() const
{ return fCoordinates.Eta(); }
Scalar pt() const
{ return fCoordinates.Pt(); }
Scalar perp2() const
{ return fCoordinates.Perp2(); }
Scalar mag2() const
{ return fCoordinates.M2(); }
Scalar mag() const
{ return fCoordinates.M(); }
Scalar mt() const
{ return fCoordinates.Mt(); }
Scalar mt2() const
{ return fCoordinates.Mt2(); }
Scalar energy() const
 Methods  requested by CMS ---

{ return fCoordinates.E(); }
Scalar mass() const
{ return fCoordinates.M(); }
Scalar mass2() const
{ return fCoordinates.M2(); }
LorentzVector<CoordSystem>& SetE(ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >::Scalar a)
          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; }
LorentzVector<CoordSystem>& SetEta(ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >::Scalar a)
{ fCoordinates.SetEta(a); return *this; }
LorentzVector<CoordSystem>& SetM(ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >::Scalar a)
{ fCoordinates.SetM (a); return *this; }
LorentzVector<CoordSystem>& SetPhi(ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >::Scalar a)
{ fCoordinates.SetPhi(a); return *this; }
LorentzVector<CoordSystem>& SetPt(ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >::Scalar a)
{ fCoordinates.SetPt (a); return *this; }
LorentzVector<CoordSystem>& SetPx(ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >::Scalar a)
{ fCoordinates.SetPx (a); return *this; }
LorentzVector<CoordSystem>& SetPy(ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >::Scalar a)
{ fCoordinates.SetPy (a); return *this; }
LorentzVector<CoordSystem>& SetPz(ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >::Scalar a)
{ fCoordinates.SetPz (a); return *this; }