Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType > Class Template Reference

template<class ScalarType = double>
class ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >

Class describing a 4D cartesian coordinate system (x, y, z, t coordinates) or momentum-energy vectors stored as (Px, Py, Pz, E).

The metric used is (-,-,-,+)

See also
Physics Vectors

Definition at line 49 of file PxPyPzE4D.h.

Public Types

typedef ScalarType Scalar
 

Public Member Functions

constexpr PxPyPzE4D () noexcept=default
 Default constructor with x=y=z=t=0.
 
template<class CoordSystem >
 PxPyPzE4D (const CoordSystem &v)
 construct from any vector or coordinate system class implementing x(), y() and z() and t()
 
constexpr PxPyPzE4D (Scalar px, Scalar py, Scalar pz, Scalar e) noexcept
 Constructor from x, y , z , t values.
 
Scalar E () const
 
Scalar Et () const
 transverse energy
 
Scalar Et2 () const
 transverse energy squared
 
Scalar Eta () const
 pseudorapidity
 
void GetCoordinates (Scalar &px, Scalar &py, Scalar &pz, Scalar &e) const
 get internal data into 4 Scalar numbers
 
void GetCoordinates (Scalar dest[]) const
 get internal data into an array of 4 Scalar numbers
 
Scalar M () const
 invariant mass
 
Scalar M2 () const
 vector magnitude squared (or mass squared)
 
Scalar Mag () const
 
Scalar Mag2 () const
 
Scalar Mt () const
 transverse mass
 
Scalar Mt2 () const
 transverse mass squared
 
void Negate ()
 negate the 4-vector
 
bool operator!= (const PxPyPzE4D &rhs) const
 
template<class AnyCoordSystem >
PxPyPzE4Doperator= (const AnyCoordSystem &v)
 Assignment from a generic coordinate system implementing x(), y(), z() and t()
 
bool operator== (const PxPyPzE4D &rhs) const
 Exact equality.
 
Scalar P () const
 magnitude of spatial components (magnitude of 3-momentum)
 
Scalar P2 () const
 squared magnitude of spatial components
 
Scalar Perp () const
 
Scalar Perp2 () const
 
Scalar Phi () const
 azimuthal angle
 
Scalar Pt () const
 Transverse spatial component (P_perp or rho)
 
Scalar Pt2 () const
 transverse spatial component squared
 
Scalar Px () const
 
Scalar Py () const
 
Scalar Pz () const
 
Scalar R () const
 
Scalar Rho () const
 
void Scale (const Scalar &a)
 scale coordinate values by a scalar quantity a
 
void SetCoordinates (const Scalar src[])
 Set internal data based on an array of 4 Scalar numbers.
 
void SetCoordinates (Scalar px, Scalar py, Scalar pz, Scalar e)
 Set internal data based on 4 Scalar numbers.
 
void SetE (Scalar e)
 set T value
 
void SetPx (Scalar px)
 set X value
 
void SetPxPyPzE (Scalar px, Scalar py, Scalar pz, Scalar e)
 set all values using cartesian coordinates
 
void SetPy (Scalar py)
 set Y value
 
void SetPz (Scalar pz)
 set Z value
 
Scalar T () const
 
Scalar t () const
 
Scalar Theta () const
 polar angle
 
Scalar X () const
 
Scalar x () const
 
Scalar Y () const
 
Scalar y () const
 
Scalar Z () const
 
Scalar z () const
 

Private Attributes

ScalarType fT = 0
 
ScalarType fX = 0
 (contiguous) data containing the coordinate values x,y,z,t
 
ScalarType fY = 0
 
ScalarType fZ = 0
 

#include <MathX/GenVectorX/PxPyPzE4D.h>

Member Typedef Documentation

◆ Scalar

template<class ScalarType = double>
typedef ScalarType ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Scalar

Definition at line 52 of file PxPyPzE4D.h.

Constructor & Destructor Documentation

◆ PxPyPzE4D() [1/3]

template<class ScalarType = double>
constexpr ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::PxPyPzE4D ( )
constexprdefaultnoexcept

Default constructor with x=y=z=t=0.

◆ PxPyPzE4D() [2/3]

template<class ScalarType = double>
constexpr ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::PxPyPzE4D ( Scalar px,
Scalar py,
Scalar pz,
Scalar e )
inlineconstexprnoexcept

Constructor from x, y , z , t values.

Definition at line 64 of file PxPyPzE4D.h.

◆ PxPyPzE4D() [3/3]

template<class ScalarType = double>
template<class CoordSystem >
ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::PxPyPzE4D ( const CoordSystem & v)
inlineexplicit

construct from any vector or coordinate system class implementing x(), y() and z() and t()

Definition at line 71 of file PxPyPzE4D.h.

Member Function Documentation

◆ E()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::E ( ) const
inline

Definition at line 126 of file PxPyPzE4D.h.

◆ Et()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Et ( ) const
inline

transverse energy

Definition at line 218 of file PxPyPzE4D.h.

◆ Et2()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Et2 ( ) const
inline

transverse energy squared

Definition at line 208 of file PxPyPzE4D.h.

◆ Eta()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Eta ( ) const
inline

pseudorapidity

Definition at line 237 of file PxPyPzE4D.h.

◆ GetCoordinates() [1/2]

template<class ScalarType = double>
void ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::GetCoordinates ( Scalar & px,
Scalar & py,
Scalar & pz,
Scalar & e ) const
inline

get internal data into 4 Scalar numbers

Definition at line 111 of file PxPyPzE4D.h.

◆ GetCoordinates() [2/2]

template<class ScalarType = double>
void ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::GetCoordinates ( Scalar dest[]) const
inline

get internal data into an array of 4 Scalar numbers

Definition at line 89 of file PxPyPzE4D.h.

◆ M()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::M ( ) const
inline

invariant mass

Definition at line 155 of file PxPyPzE4D.h.

◆ M2()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::M2 ( ) const
inline

vector magnitude squared (or mass squared)

Definition at line 149 of file PxPyPzE4D.h.

◆ Mag()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Mag ( ) const
inline

Definition at line 168 of file PxPyPzE4D.h.

◆ Mag2()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Mag2 ( ) const
inline

Definition at line 150 of file PxPyPzE4D.h.

◆ Mt()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Mt ( ) const
inline

transverse mass

Definition at line 191 of file PxPyPzE4D.h.

◆ Mt2()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Mt2 ( ) const
inline

transverse mass squared

Definition at line 186 of file PxPyPzE4D.h.

◆ Negate()

template<class ScalarType = double>
void ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Negate ( )
inline

negate the 4-vector

Definition at line 274 of file PxPyPzE4D.h.

◆ operator!=()

template<class ScalarType = double>
bool ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::operator!= ( const PxPyPzE4D< ScalarType > & rhs) const
inline

Definition at line 311 of file PxPyPzE4D.h.

◆ operator=()

template<class ScalarType = double>
template<class AnyCoordSystem >
PxPyPzE4D & ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::operator= ( const AnyCoordSystem & v)
inline

Assignment from a generic coordinate system implementing x(), y(), z() and t()

Definition at line 298 of file PxPyPzE4D.h.

◆ operator==()

template<class ScalarType = double>
bool ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::operator== ( const PxPyPzE4D< ScalarType > & rhs) const
inline

Exact equality.

Definition at line 310 of file PxPyPzE4D.h.

◆ P()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::P ( ) const
inline

magnitude of spatial components (magnitude of 3-momentum)

Definition at line 143 of file PxPyPzE4D.h.

◆ P2()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::P2 ( ) const
inline

squared magnitude of spatial components

Definition at line 138 of file PxPyPzE4D.h.

◆ Perp()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Perp ( ) const
inline

Definition at line 180 of file PxPyPzE4D.h.

◆ Perp2()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Perp2 ( ) const
inline

Definition at line 174 of file PxPyPzE4D.h.

◆ Phi()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Phi ( ) const
inline

azimuthal angle

Definition at line 227 of file PxPyPzE4D.h.

◆ Pt()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Pt ( ) const
inline

Transverse spatial component (P_perp or rho)

Definition at line 179 of file PxPyPzE4D.h.

◆ Pt2()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Pt2 ( ) const
inline

transverse spatial component squared

Definition at line 173 of file PxPyPzE4D.h.

◆ Px()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Px ( ) const
inline

Definition at line 123 of file PxPyPzE4D.h.

◆ Py()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Py ( ) const
inline

Definition at line 124 of file PxPyPzE4D.h.

◆ Pz()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Pz ( ) const
inline

Definition at line 125 of file PxPyPzE4D.h.

◆ R()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::R ( ) const
inline

Definition at line 144 of file PxPyPzE4D.h.

◆ Rho()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Rho ( ) const
inline

Definition at line 181 of file PxPyPzE4D.h.

◆ Scale()

template<class ScalarType = double>
void ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Scale ( const Scalar & a)
inline

scale coordinate values by a scalar quantity a

Definition at line 285 of file PxPyPzE4D.h.

◆ SetCoordinates() [1/2]

template<class ScalarType = double>
void ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::SetCoordinates ( const Scalar src[])
inline

Set internal data based on an array of 4 Scalar numbers.

Definition at line 78 of file PxPyPzE4D.h.

◆ SetCoordinates() [2/2]

template<class ScalarType = double>
void ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::SetCoordinates ( Scalar px,
Scalar py,
Scalar pz,
Scalar e )
inline

Set internal data based on 4 Scalar numbers.

Definition at line 100 of file PxPyPzE4D.h.

◆ SetE()

template<class ScalarType = double>
void ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::SetE ( Scalar e)
inline

set T value

Definition at line 256 of file PxPyPzE4D.h.

◆ SetPx()

template<class ScalarType = double>
void ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::SetPx ( Scalar px)
inline

set X value

Definition at line 244 of file PxPyPzE4D.h.

◆ SetPxPyPzE()

template<class ScalarType = double>
void ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::SetPxPyPzE ( Scalar px,
Scalar py,
Scalar pz,
Scalar e )
inline

set all values using cartesian coordinates

Definition at line 261 of file PxPyPzE4D.h.

◆ SetPy()

template<class ScalarType = double>
void ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::SetPy ( Scalar py)
inline

set Y value

Definition at line 248 of file PxPyPzE4D.h.

◆ SetPz()

template<class ScalarType = double>
void ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::SetPz ( Scalar pz)
inline

set Z value

Definition at line 252 of file PxPyPzE4D.h.

◆ T()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::T ( ) const
inline

Definition at line 131 of file PxPyPzE4D.h.

◆ t()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::t ( ) const
inline

Definition at line 320 of file PxPyPzE4D.h.

◆ Theta()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Theta ( ) const
inline

polar angle

Definition at line 232 of file PxPyPzE4D.h.

◆ X()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::X ( ) const
inline

Definition at line 128 of file PxPyPzE4D.h.

◆ x()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::x ( ) const
inline

Definition at line 317 of file PxPyPzE4D.h.

◆ Y()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Y ( ) const
inline

Definition at line 129 of file PxPyPzE4D.h.

◆ y()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::y ( ) const
inline

Definition at line 318 of file PxPyPzE4D.h.

◆ Z()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::Z ( ) const
inline

Definition at line 130 of file PxPyPzE4D.h.

◆ z()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::z ( ) const
inline

Definition at line 319 of file PxPyPzE4D.h.

Member Data Documentation

◆ fT

template<class ScalarType = double>
ScalarType ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::fT = 0
private

Definition at line 344 of file PxPyPzE4D.h.

◆ fX

template<class ScalarType = double>
ScalarType ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::fX = 0
private

(contiguous) data containing the coordinate values x,y,z,t

Definition at line 341 of file PxPyPzE4D.h.

◆ fY

template<class ScalarType = double>
ScalarType ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::fY = 0
private

Definition at line 342 of file PxPyPzE4D.h.

◆ fZ

template<class ScalarType = double>
ScalarType ROOT::ROOT_MATH_ARCH::PxPyPzE4D< ScalarType >::fZ = 0
private

Definition at line 343 of file PxPyPzE4D.h.

  • math/experimental/genvectorx/inc/MathX/GenVectorX/PxPyPzE4D.h