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.
ROOT provides specialisations and aliases to them of the ROOT::Math::LorentzVector template:
Definition at line 61 of file LorentzVector.h.
Public Types | |
typedef DisplacementVector3D< Cartesian3D< Scalar > > | BetaVector |
typedef CoordSystem | CoordinateType |
typedef CoordSystem::Scalar | Scalar |
Public Member Functions | |
LorentzVector () | |
default constructor of an empty vector (Px = Py = Pz = E = 0 ) | |
template<class ForeignLorentzVector , typename = decltype(std::declval<ForeignLorentzVector>().x() + std::declval<ForeignLorentzVector>().y() + std::declval<ForeignLorentzVector>().z() + std::declval<ForeignLorentzVector>().t())> | |
constexpr | LorentzVector (const ForeignLorentzVector &v) |
Construct from a foreign 4D vector type, for example, HepLorentzVector Precondition: v must implement methods x(), y(), z(), and t() | |
template<class Coords > | |
constexpr | LorentzVector (const LorentzVector< Coords > &v) |
constructor from a LorentzVector expressed in different coordinates, or using a different Scalar type | |
LorentzVector (const Scalar &a, const Scalar &b, const Scalar &c, const Scalar &d) | |
generic constructors from four scalar values. | |
Scalar | Beta () const |
Return beta scalar value. | |
BetaVector | BoostToCM () const |
The beta vector for the boost that would bring this vector into its center of mass frame (zero momentum) | |
template<class Other4Vector > | |
BetaVector | BoostToCM (const Other4Vector &v) const |
The beta vector for the boost that would bring this vector into its center of mass frame (zero momentum) | |
Scalar | ColinearRapidity () const |
Rapidity in the direction of travel: atanh (|P|/E)=.5 log[(E+P)/(E-P)]. | |
const CoordSystem & | Coordinates () const |
Retrieve a const reference to the coordinates object. | |
template<class OtherLorentzVector > | |
Scalar | DeltaR (const OtherLorentzVector &v, const bool useRapidity=false) const |
deltaRapidity between this and vector v | |
unsigned int | Dimension () const |
dimension | |
template<class OtherLorentzVector > | |
Scalar | Dot (const OtherLorentzVector &q) const |
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 | |
Scalar | E () const |
return 4-th component (time, or energy for a 4-momentum vector) | |
Scalar | e () const |
Scalar | energy () const |
Scalar | Et () const |
return the transverse energy | |
Scalar | Et2 () const |
return the transverse energy squared | |
Scalar | Eta () const |
pseudorapidity | |
Scalar | eta () const |
Scalar | Gamma () const |
Return Gamma scalar value. | |
template<class IT > | |
void | GetCoordinates (IT begin) const |
get internal data into 4 Scalars at *begin | |
template<class IT > | |
void | GetCoordinates (IT begin, IT end) const |
get internal data into 4 Scalars at *begin to *end | |
void | GetCoordinates (Scalar &a, Scalar &b, Scalar &c, Scalar &d) const |
get internal data into 4 Scalar numbers | |
void | GetCoordinates (Scalar dest[]) const |
get internal data into an array of 4 Scalar numbers | |
bool | isLightlike (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. | |
bool | isTimelike () const |
Determine if momentum-energy can represent a physical massive particle. | |
Scalar | M () const |
return magnitude (mass) using the (-,-,-,+) metric. | |
Scalar | M2 () const |
return magnitude (mass) squared M2 = T**2 - X**2 - Y**2 - Z**2 (we use -,-,-,+ metric) | |
Scalar | mag () const |
Scalar | mag2 () const |
Scalar | mass () const |
Scalar | mass2 () const |
Scalar | Mt () const |
return the transverse mass | |
Scalar | mt () const |
Scalar | Mt2 () const |
return the transverse mass squared | |
Scalar | mt2 () const |
bool | operator!= (const LorentzVector &rhs) const |
LorentzVector | operator* (const Scalar &a) const |
product of a LorentzVector by a scalar quantity | |
LorentzVector & | operator*= (Scalar a) |
multiplication by a scalar quantity v *= a | |
LorentzVector | operator+ () const |
template<class OtherLorentzVector > | |
LorentzVector | operator+ (const OtherLorentzVector &v2) const |
addition of two LorentzVectors (v3 = v1 + v2) Enable the addition with any other LorentzVector | |
template<class OtherLorentzVector > | |
LorentzVector & | operator+= (const OtherLorentzVector &q) |
Self addition with another Vector ( v+= q ) Enable the addition with any other LorentzVector. | |
LorentzVector | operator- () const |
Negative of a LorentzVector (q = - v ) | |
template<class OtherLorentzVector > | |
LorentzVector | operator- (const OtherLorentzVector &v2) const |
subtraction of two LorentzVectors (v3 = v1 - v2) Enable the subtraction of any other LorentzVector | |
template<class OtherLorentzVector > | |
LorentzVector & | operator-= (const OtherLorentzVector &q) |
Self subtraction of another Vector from this ( v-= q ) Enable the addition with any other LorentzVector. | |
LorentzVector< CoordSystem > | operator/ (const Scalar &a) const |
Divide a LorentzVector by a scalar quantity. | |
LorentzVector & | operator/= (Scalar a) |
division by a scalar quantity v /= a | |
template<class ForeignLorentzVector , typename = decltype(std::declval<ForeignLorentzVector>().x() + std::declval<ForeignLorentzVector>().y() + std::declval<ForeignLorentzVector>().z() + std::declval<ForeignLorentzVector>().t())> | |
LorentzVector & | operator= (const ForeignLorentzVector &v) |
assignment from any other Lorentz vector implementing x(), y(), z() and t() | |
template<class OtherCoords > | |
LorentzVector & | operator= (const LorentzVector< OtherCoords > &v) |
Assignment operator from a lorentz vector of arbitrary type. | |
bool | operator== (const LorentzVector &rhs) const |
Exact equality. | |
Scalar | P () const |
Scalar | P2 () const |
return the square of the spatial (3D) magnitude ( X**2 + Y**2 + Z**2 ) | |
Scalar | Perp2 () const |
return the square of the transverse spatial component ( X**2 + Y**2 ) | |
Scalar | perp2 () const |
Scalar | Phi () const |
azimuthal Angle | |
Scalar | phi () const |
Scalar | Pt () const |
return the transverse spatial component sqrt ( X**2 + Y**2 ) | |
Scalar | pt () const |
Scalar | Px () const |
spatial X component | |
Scalar | px () const |
Scalar | Py () const |
spatial Y component | |
Scalar | py () const |
Scalar | Pz () const |
spatial Z component | |
Scalar | pz () const |
Scalar | R () const |
return the spatial (3D) magnitude ( sqrt(X**2 + Y**2 + Z**2) ) | |
Scalar | r () const |
Scalar | Rapidity () const |
Rapidity relative to the Z axis: .5 log [(E+Pz)/(E-Pz)]. | |
Scalar | Rho () const |
Scalar | rho () const |
LorentzVector< CoordSystem > & | SetCoordinates (const Scalar src[]) |
Set internal data based on an array of 4 Scalar numbers. | |
template<class IT > | |
LorentzVector< CoordSystem > & | SetCoordinates (IT begin, IT end) |
Set internal data based on 4 Scalars at *begin to *end. | |
LorentzVector< CoordSystem > & | SetCoordinates (Scalar a, Scalar b, Scalar c, Scalar d) |
Set internal data based on 4 Scalar numbers. | |
LorentzVector< CoordSystem > & | SetE (Scalar a) |
Methods setting a Single-component Work only if the component is one of which the vector is represented. | |
LorentzVector< CoordSystem > & | SetEta (Scalar a) |
LorentzVector< CoordSystem > & | SetM (Scalar a) |
LorentzVector< CoordSystem > & | SetPhi (Scalar a) |
LorentzVector< CoordSystem > & | SetPt (Scalar a) |
LorentzVector< CoordSystem > & | SetPx (Scalar a) |
LorentzVector< CoordSystem > & | SetPxPyPzE (Scalar xx, Scalar yy, Scalar zz, Scalar ee) |
LorentzVector< CoordSystem > & | SetPy (Scalar a) |
LorentzVector< CoordSystem > & | SetPz (Scalar a) |
LorentzVector< CoordSystem > & | SetXYZT (Scalar xx, Scalar yy, Scalar zz, Scalar tt) |
set the values of the vector from the cartesian components (x,y,z,t) (if the vector is held in another coordinates, like (Pt,eta,phi,m) then (x, y, z, t) are converted to that form) | |
Scalar | T () const |
Scalar | t () const |
Scalar | Theta () const |
polar Angle | |
Scalar | theta () const |
::ROOT::Math::DisplacementVector3D< Cartesian3D< Scalar > > | Vect () const |
get the spatial components of the Vector in a DisplacementVector based on Cartesian Coordinates | |
Scalar | X () const |
Scalar | x () const |
Scalar | Y () const |
Scalar | y () const |
Scalar | Z () const |
Scalar | z () const |
Private Attributes | |
CoordSystem | fCoordinates |
Static Private Attributes | |
static constexpr unsigned int | fDimension = CoordinateType::Dimension |
#include <Math/GenVector/LorentzVector.h>
typedef DisplacementVector3D< Cartesian3D<Scalar> > ROOT::Math::LorentzVector< CoordSystem >::BetaVector |
Definition at line 574 of file LorentzVector.h.
typedef CoordSystem ROOT::Math::LorentzVector< CoordSystem >::CoordinateType |
Definition at line 68 of file LorentzVector.h.
typedef CoordSystem::Scalar ROOT::Math::LorentzVector< CoordSystem >::Scalar |
Definition at line 67 of file LorentzVector.h.
|
inline |
default constructor of an empty vector (Px = Py = Pz = E = 0 )
Definition at line 73 of file LorentzVector.h.
|
inline |
generic constructors from four scalar values.
The association between values and coordinate depends on the coordinate system. For PxPyPzE4D,
a | scalar value (Px) |
b | scalar value (Py) |
c | scalar value (Pz) |
d | scalar value (E) |
Definition at line 84 of file LorentzVector.h.
|
inlineexplicitconstexpr |
constructor from a LorentzVector expressed in different coordinates, or using a different Scalar type
Definition at line 95 of file LorentzVector.h.
|
inlineexplicitconstexpr |
|
inline |
Return beta scalar value.
Definition at line 624 of file LorentzVector.h.
|
inline |
The beta vector for the boost that would bring this vector into its center of mass frame (zero momentum)
Definition at line 580 of file LorentzVector.h.
|
inline |
The beta vector for the boost that would bring this vector into its center of mass frame (zero momentum)
Definition at line 602 of file LorentzVector.h.
|
inline |
Rapidity in the direction of travel: atanh (|P|/E)=.5 log[(E+P)/(E-P)].
Definition at line 541 of file LorentzVector.h.
|
inline |
Retrieve a const reference to the coordinates object.
Definition at line 172 of file LorentzVector.h.
|
inline |
deltaRapidity between this and vector v
\[ \Delta R = \sqrt { \Delta \eta ^2 + \Delta \phi ^2 } \]
useRapidity | true to use Rapidity(), false to use Eta() |
Definition at line 375 of file LorentzVector.h.
|
inline |
dimension
Definition at line 271 of file LorentzVector.h.
|
inline |
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
q | any LorentzVector implementing the x(), y() , z() and t() member functions |
Definition at line 412 of file LorentzVector.h.
|
inline |
return 4-th component (time, or energy for a 4-momentum vector)
Definition at line 296 of file LorentzVector.h.
|
inline |
Definition at line 674 of file LorentzVector.h.
|
inline |
Definition at line 689 of file LorentzVector.h.
|
inline |
return the transverse energy
\[ e_t = \sqrt{ \frac{E^2 p_{\perp}^2 }{ |p|^2 } } X sign(E) \]
Definition at line 351 of file LorentzVector.h.
|
inline |
return the transverse energy squared
\[ e_t = \frac{E^2 p_{\perp}^2 }{ |p|^2 } \]
Definition at line 345 of file LorentzVector.h.
|
inline |
pseudorapidity
\[ \eta = - \ln { \tan { \frac { \theta} {2} } } \]
Definition at line 367 of file LorentzVector.h.
|
inline |
Definition at line 679 of file LorentzVector.h.
|
inline |
Return Gamma scalar value.
Definition at line 642 of file LorentzVector.h.
|
inline |
get internal data into 4 Scalars at *begin
Definition at line 231 of file LorentzVector.h.
|
inline |
get internal data into 4 Scalars at *begin to *end
Definition at line 220 of file LorentzVector.h.
|
inline |
get internal data into 4 Scalar numbers
Definition at line 207 of file LorentzVector.h.
|
inline |
get internal data into an array of 4 Scalar numbers
Definition at line 213 of file LorentzVector.h.
|
inline |
Determine if momentum-energy can represent a massless particle.
Definition at line 560 of file LorentzVector.h.
|
inline |
Determine if momentum-energy is spacelike, and represents a tachyon.
Definition at line 570 of file LorentzVector.h.
|
inline |
Determine if momentum-energy can represent a physical massive particle.
Definition at line 553 of file LorentzVector.h.
|
inline |
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
Definition at line 308 of file LorentzVector.h.
|
inline |
return magnitude (mass) squared M2 = T**2 - X**2 - Y**2 - Z**2 (we use -,-,-,+ metric)
Definition at line 302 of file LorentzVector.h.
|
inline |
Definition at line 683 of file LorentzVector.h.
|
inline |
Definition at line 682 of file LorentzVector.h.
|
inline |
Definition at line 690 of file LorentzVector.h.
|
inline |
Definition at line 691 of file LorentzVector.h.
|
inline |
return the transverse mass
\[ \sqrt{ m_t^2 = E^2 - p{_z}^2} X sign(E^ - p{_z}^2) \]
Definition at line 339 of file LorentzVector.h.
|
inline |
Definition at line 684 of file LorentzVector.h.
|
inline |
return the transverse mass squared
\[ m_t^2 = E^2 - p{_z}^2 \]
Definition at line 333 of file LorentzVector.h.
|
inline |
Definition at line 685 of file LorentzVector.h.
|
inline |
Definition at line 262 of file LorentzVector.h.
|
inline |
product of a LorentzVector by a scalar quantity
a | scalar quantity of type a |
Definition at line 493 of file LorentzVector.h.
|
inline |
multiplication by a scalar quantity v *= a
Definition at line 475 of file LorentzVector.h.
|
inline |
Definition at line 519 of file LorentzVector.h.
|
inline |
addition of two LorentzVectors (v3 = v1 + v2) Enable the addition with any other LorentzVector
v2 | any LorentzVector implementing the x(), y() , z() and t() member functions |
Definition at line 449 of file LorentzVector.h.
|
inline |
Self addition with another Vector ( v+= q ) Enable the addition with any other LorentzVector.
q | any LorentzVector implementing the x(), y() , z() and t() member functions |
Definition at line 423 of file LorentzVector.h.
|
inline |
Negative of a LorentzVector (q = - v )
Definition at line 514 of file LorentzVector.h.
|
inline |
subtraction of two LorentzVectors (v3 = v1 - v2) Enable the subtraction of any other LorentzVector
v2 | any LorentzVector implementing the x(), y() , z() and t() member functions |
Definition at line 464 of file LorentzVector.h.
|
inline |
Self subtraction of another Vector from this ( v-= q ) Enable the addition with any other LorentzVector.
q | any LorentzVector implementing the x(), y() , z() and t() member functions |
Definition at line 436 of file LorentzVector.h.
|
inline |
Divide a LorentzVector by a scalar quantity.
a | scalar quantity of type a |
Definition at line 504 of file LorentzVector.h.
|
inline |
division by a scalar quantity v /= a
Definition at line 483 of file LorentzVector.h.
|
inline |
|
inline |
Assignment operator from a lorentz vector of arbitrary type.
Definition at line 132 of file LorentzVector.h.
|
inline |
Exact equality.
Definition at line 259 of file LorentzVector.h.
|
inline |
Definition at line 313 of file LorentzVector.h.
|
inline |
return the square of the spatial (3D) magnitude ( X**2 + Y**2 + Z**2 )
Definition at line 317 of file LorentzVector.h.
|
inline |
return the square of the transverse spatial component ( X**2 + Y**2 )
Definition at line 321 of file LorentzVector.h.
|
inline |
Definition at line 681 of file LorentzVector.h.
|
inline |
azimuthal Angle
Definition at line 356 of file LorentzVector.h.
|
inline |
Definition at line 677 of file LorentzVector.h.
|
inline |
return the transverse spatial component sqrt ( X**2 + Y**2 )
Definition at line 326 of file LorentzVector.h.
|
inline |
Definition at line 680 of file LorentzVector.h.
|
inline |
spatial X component
Definition at line 281 of file LorentzVector.h.
|
inline |
Definition at line 671 of file LorentzVector.h.
|
inline |
spatial Y component
Definition at line 286 of file LorentzVector.h.
|
inline |
Definition at line 672 of file LorentzVector.h.
|
inline |
spatial Z component
Definition at line 291 of file LorentzVector.h.
|
inline |
Definition at line 673 of file LorentzVector.h.
|
inline |
return the spatial (3D) magnitude ( sqrt(X**2 + Y**2 + Z**2) )
Definition at line 312 of file LorentzVector.h.
|
inline |
Definition at line 675 of file LorentzVector.h.
|
inline |
Rapidity relative to the Z axis: .5 log [(E+Pz)/(E-Pz)].
Definition at line 528 of file LorentzVector.h.
|
inline |
Definition at line 327 of file LorentzVector.h.
|
inline |
Definition at line 678 of file LorentzVector.h.
|
inline |
Set internal data based on an array of 4 Scalar numbers.
Definition at line 179 of file LorentzVector.h.
|
inline |
Set internal data based on 4 Scalars at *begin to *end.
Definition at line 196 of file LorentzVector.h.
|
inline |
Set internal data based on 4 Scalar numbers.
Definition at line 187 of file LorentzVector.h.
|
inline |
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.
Definition at line 699 of file LorentzVector.h.
|
inline |
Definition at line 700 of file LorentzVector.h.
|
inline |
Definition at line 701 of file LorentzVector.h.
|
inline |
Definition at line 702 of file LorentzVector.h.
|
inline |
Definition at line 703 of file LorentzVector.h.
|
inline |
Definition at line 704 of file LorentzVector.h.
|
inline |
Definition at line 249 of file LorentzVector.h.
|
inline |
Definition at line 705 of file LorentzVector.h.
|
inline |
Definition at line 706 of file LorentzVector.h.
|
inline |
set the values of the vector from the cartesian components (x,y,z,t) (if the vector is held in another coordinates, like (Pt,eta,phi,m) then (x, y, z, t) are converted to that form)
Definition at line 245 of file LorentzVector.h.
|
inline |
Definition at line 297 of file LorentzVector.h.
|
inline |
Definition at line 670 of file LorentzVector.h.
|
inline |
polar Angle
Definition at line 361 of file LorentzVector.h.
|
inline |
Definition at line 676 of file LorentzVector.h.
|
inline |
get the spatial components of the Vector in a DisplacementVector based on Cartesian Coordinates
Definition at line 396 of file LorentzVector.h.
|
inline |
Definition at line 282 of file LorentzVector.h.
|
inline |
Definition at line 667 of file LorentzVector.h.
|
inline |
Definition at line 287 of file LorentzVector.h.
|
inline |
Definition at line 668 of file LorentzVector.h.
|
inline |
Definition at line 292 of file LorentzVector.h.
|
inline |
Definition at line 669 of file LorentzVector.h.
|
private |
Definition at line 710 of file LorentzVector.h.
|
staticconstexprprivate |
Definition at line 711 of file LorentzVector.h.