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

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

Class describing a 4D coordinate system or momentum-energy vectors stored as (Px, Py, Pz, M).

This system is useful to describe ultra-relativistic particles (like electrons at LHC) to avoid numerical errors evaluating the mass when E >>> m The metric used is (-,-,-,+) Spacelike particles (M2 < 0) are described with negative mass values, but in this case m2 must always be less than P2 to preserve a positive value of E2

See also
Physics Vectors

Definition at line 54 of file PxPyPzM4D.h.

Public Types

typedef ScalarType Scalar
 

Public Member Functions

constexpr PxPyPzM4D () noexcept=default
 Default constructor with x=y=z=m=0.
 
template<class CoordSystem >
 PxPyPzM4D (const CoordSystem &v)
 construct from any 4D coordinate system class implementing X(), Y(), X() and M()
 
 PxPyPzM4D (Scalar px, Scalar py, Scalar pz, Scalar m)
 Constructor from x, y , z , m values.
 
Scalar E () const
 Energy.
 
Scalar E2 () const
 energy squared
 
Scalar Et () const
 transverse energy
 
Scalar Et2 () const
 transverse energy squared
 
Scalar Eta () const
 pseudorapidity
 
void GetCoordinates (Scalar &px, Scalar &py, Scalar &pz, Scalar &m) 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
 
Scalar M2 () const
 vector magnitude squared (or mass squared) In case of negative mass (spacelike particles return negative values)
 
Scalar Mag () const
 
Scalar Mag2 () const
 
Scalar Mt () const
 transverse mass
 
Scalar Mt2 () const
 transverse mass squared
 
void Negate ()
 negate the 4-vector - Note that the energy cannot be negate (would need an additional data member) therefore negate will work only on the spatial components.
 
bool operator!= (const PxPyPzM4D &rhs) const
 
template<class AnyCoordSystem >
PxPyPzM4Doperator= (const AnyCoordSystem &v)
 construct from any 4D coordinate system class implementing X(), Y(), X() and M()
 
bool operator== (const PxPyPzM4D &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 m)
 Set internal data based on 4 Scalar numbers.
 
void SetM (Scalar m)
 set T value
 
void SetPx (Scalar px)
 set X value
 
void SetPxPyPzE (Scalar px, Scalar py, Scalar pz, Scalar e)
 set all values
 
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 Member Functions

void RestrictNegMass ()
 

Private Attributes

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

#include <MathX/GenVectorX/PxPyPzM4D.h>

Member Typedef Documentation

◆ Scalar

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

Definition at line 57 of file PxPyPzM4D.h.

Constructor & Destructor Documentation

◆ PxPyPzM4D() [1/3]

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

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

◆ PxPyPzM4D() [2/3]

template<class ScalarType = double>
ROOT::ROOT_MATH_ARCH::PxPyPzM4D< ScalarType >::PxPyPzM4D ( Scalar px,
Scalar py,
Scalar pz,
Scalar m )
inline

Constructor from x, y , z , m values.

Definition at line 69 of file PxPyPzM4D.h.

◆ PxPyPzM4D() [3/3]

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

construct from any 4D coordinate system class implementing X(), Y(), X() and M()

Definition at line 81 of file PxPyPzM4D.h.

Member Function Documentation

◆ E()

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

Energy.

Definition at line 164 of file PxPyPzM4D.h.

◆ E2()

template<class ScalarType = double>
Scalar ROOT::ROOT_MATH_ARCH::PxPyPzM4D< ScalarType >::E2 ( ) const
inline

energy squared

Definition at line 191 of file PxPyPzM4D.h.

◆ Et()

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

transverse energy

Definition at line 246 of file PxPyPzM4D.h.

◆ Et2()

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

transverse energy squared

Definition at line 236 of file PxPyPzM4D.h.

◆ Eta()

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

pseudorapidity

Definition at line 265 of file PxPyPzM4D.h.

◆ GetCoordinates() [1/2]

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

get internal data into 4 Scalar numbers

Definition at line 139 of file PxPyPzM4D.h.

◆ GetCoordinates() [2/2]

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

get internal data into an array of 4 Scalar numbers

Definition at line 115 of file PxPyPzM4D.h.

◆ M()

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

Definition at line 154 of file PxPyPzM4D.h.

◆ M2()

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

vector magnitude squared (or mass squared) In case of negative mass (spacelike particles return negative values)

Definition at line 183 of file PxPyPzM4D.h.

◆ Mag()

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

Definition at line 186 of file PxPyPzM4D.h.

◆ Mag2()

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

Definition at line 184 of file PxPyPzM4D.h.

◆ Mt()

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

transverse mass

Definition at line 219 of file PxPyPzM4D.h.

◆ Mt2()

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

transverse mass squared

Definition at line 214 of file PxPyPzM4D.h.

◆ Negate()

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

negate the 4-vector - Note that the energy cannot be negate (would need an additional data member) therefore negate will work only on the spatial components.

One would need to use negate only with vectors having the energy as data members

Definition at line 303 of file PxPyPzM4D.h.

◆ operator!=()

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

Definition at line 328 of file PxPyPzM4D.h.

◆ operator=()

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

construct from any 4D coordinate system class implementing X(), Y(), X() and M()

Definition at line 90 of file PxPyPzM4D.h.

◆ operator==()

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

Exact equality.

Definition at line 327 of file PxPyPzM4D.h.

◆ P()

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

magnitude of spatial components (magnitude of 3-momentum)

Definition at line 176 of file PxPyPzM4D.h.

◆ P2()

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

squared magnitude of spatial components

Definition at line 171 of file PxPyPzM4D.h.

◆ Perp()

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

Definition at line 208 of file PxPyPzM4D.h.

◆ Perp2()

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

Definition at line 202 of file PxPyPzM4D.h.

◆ Phi()

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

azimuthal angle

Definition at line 255 of file PxPyPzM4D.h.

◆ Pt()

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

Transverse spatial component (P_perp or rho)

Definition at line 207 of file PxPyPzM4D.h.

◆ Pt2()

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

transverse spatial component squared

Definition at line 201 of file PxPyPzM4D.h.

◆ Px()

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

Definition at line 151 of file PxPyPzM4D.h.

◆ Py()

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

Definition at line 152 of file PxPyPzM4D.h.

◆ Pz()

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

Definition at line 153 of file PxPyPzM4D.h.

◆ R()

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

Definition at line 177 of file PxPyPzM4D.h.

◆ RestrictNegMass()

template<class ScalarType = double>
void ROOT::ROOT_MATH_ARCH::PxPyPzM4D< ScalarType >::RestrictNegMass ( )
inlineprivate

Definition at line 356 of file PxPyPzM4D.h.

◆ Rho()

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

Definition at line 209 of file PxPyPzM4D.h.

◆ Scale()

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

scale coordinate values by a scalar quantity a

Definition at line 316 of file PxPyPzM4D.h.

◆ SetCoordinates() [1/2]

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

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

Definition at line 102 of file PxPyPzM4D.h.

◆ SetCoordinates() [2/2]

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

Set internal data based on 4 Scalar numbers.

Definition at line 126 of file PxPyPzM4D.h.

◆ SetM()

template<class ScalarType = double>
void ROOT::ROOT_MATH_ARCH::PxPyPzM4D< ScalarType >::SetM ( Scalar m)
inline

set T value

Definition at line 284 of file PxPyPzM4D.h.

◆ SetPx()

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

set X value

Definition at line 272 of file PxPyPzM4D.h.

◆ SetPxPyPzE()

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

set all values

Definition at line 392 of file PxPyPzM4D.h.

◆ SetPy()

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

set Y value

Definition at line 276 of file PxPyPzM4D.h.

◆ SetPz()

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

set Z value

Definition at line 280 of file PxPyPzM4D.h.

◆ T()

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

Definition at line 166 of file PxPyPzM4D.h.

◆ t()

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

Definition at line 337 of file PxPyPzM4D.h.

◆ Theta()

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

polar angle

Definition at line 260 of file PxPyPzM4D.h.

◆ X()

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

Definition at line 156 of file PxPyPzM4D.h.

◆ x()

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

Definition at line 334 of file PxPyPzM4D.h.

◆ Y()

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

Definition at line 157 of file PxPyPzM4D.h.

◆ y()

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

Definition at line 335 of file PxPyPzM4D.h.

◆ Z()

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

Definition at line 158 of file PxPyPzM4D.h.

◆ z()

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

Definition at line 336 of file PxPyPzM4D.h.

Member Data Documentation

◆ fM

template<class ScalarType = double>
ScalarType ROOT::ROOT_MATH_ARCH::PxPyPzM4D< ScalarType >::fM = 0
private

Definition at line 376 of file PxPyPzM4D.h.

◆ fX

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

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

Definition at line 373 of file PxPyPzM4D.h.

◆ fY

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

Definition at line 374 of file PxPyPzM4D.h.

◆ fZ

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

Definition at line 375 of file PxPyPzM4D.h.

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