ROOT logo
ROOT » MATH » GENVECTOR » ROOT::Math::PxPyPzM4D<double>

class ROOT::Math::PxPyPzM4D<double>

    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 alwasy be less than P2 to preserve a positive value of E2

    @ingroup GenVector

This class is also known as (typedefs to this class)

ROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<double> >::CoordinateType

Function Members (Methods)

ROOT::Math::PxPyPzM4D<double>::ScalarE() const
ROOT::Math::PxPyPzM4D<double>::ScalarE2() const
ROOT::Math::PxPyPzM4D<double>::ScalarEt() const
ROOT::Math::PxPyPzM4D<double>::ScalarEt2() const
ROOT::Math::PxPyPzM4D<double>::ScalarEta() const
voidGetCoordinates(ROOT::Math::PxPyPzM4D<double>::Scalar* dest) const
voidGetCoordinates(ROOT::Math::PxPyPzM4D<double>::Scalar& px, ROOT::Math::PxPyPzM4D<double>::Scalar& py, ROOT::Math::PxPyPzM4D<double>::Scalar& pz, ROOT::Math::PxPyPzM4D<double>::Scalar& m) const
ROOT::Math::PxPyPzM4D<double>::ScalarM() const
ROOT::Math::PxPyPzM4D<double>::ScalarM2() const
ROOT::Math::PxPyPzM4D<double>::ScalarMag() const
ROOT::Math::PxPyPzM4D<double>::ScalarMag2() const
ROOT::Math::PxPyPzM4D<double>::ScalarMt() const
ROOT::Math::PxPyPzM4D<double>::ScalarMt2() const
booloperator!=(const ROOT::Math::PxPyPzM4D<double>& rhs) const
ROOT::Math::PxPyPzM4D<double>&operator=(const ROOT::Math::PxPyPzM4D<double>& v)
booloperator==(const ROOT::Math::PxPyPzM4D<double>& rhs) const
ROOT::Math::PxPyPzM4D<double>::ScalarP() const
ROOT::Math::PxPyPzM4D<double>::ScalarP2() const
ROOT::Math::PxPyPzM4D<double>::ScalarPerp() const
ROOT::Math::PxPyPzM4D<double>::ScalarPerp2() const
ROOT::Math::PxPyPzM4D<double>::ScalarPhi() const
ROOT::Math::PxPyPzM4D<double>::ScalarPt() const
ROOT::Math::PxPyPzM4D<double>::ScalarPt2() const
ROOT::Math::PxPyPzM4D<double>::ScalarPx() const
ROOT::Math::PxPyPzM4D<double>PxPyPzM4D<double>(const ROOT::Math::PxPyPzM4D<double>& v)
ROOT::Math::PxPyPzM4D<double>PxPyPzM4D<double>(ROOT::Math::PxPyPzM4D<double>::Scalar px, ROOT::Math::PxPyPzM4D<double>::Scalar py, ROOT::Math::PxPyPzM4D<double>::Scalar pz, ROOT::Math::PxPyPzM4D<double>::Scalar m)
ROOT::Math::PxPyPzM4D<double>::ScalarPy() const
ROOT::Math::PxPyPzM4D<double>::ScalarPz() const
ROOT::Math::PxPyPzM4D<double>::ScalarR() const
ROOT::Math::PxPyPzM4D<double>::ScalarRho() const
voidScale(const ROOT::Math::PxPyPzM4D<double>::Scalar& a)
voidSetCoordinates(const ROOT::Math::PxPyPzM4D<double>::Scalar* src)
voidSetCoordinates(ROOT::Math::PxPyPzM4D<double>::Scalar px, ROOT::Math::PxPyPzM4D<double>::Scalar py, ROOT::Math::PxPyPzM4D<double>::Scalar pz, ROOT::Math::PxPyPzM4D<double>::Scalar m)
voidSetE(double energy)
voidSetEta(double eta)
voidSetM(ROOT::Math::PxPyPzM4D<double>::Scalar m)
voidSetPhi(double phi)
voidSetPt(double pt)
voidSetPx(ROOT::Math::PxPyPzM4D<double>::Scalar px)
voidSetPxPyPzE(ROOT::Math::PxPyPzM4D<double>::Scalar px, ROOT::Math::PxPyPzM4D<double>::Scalar py, ROOT::Math::PxPyPzM4D<double>::Scalar pz, ROOT::Math::PxPyPzM4D<double>::Scalar e)
voidSetPy(ROOT::Math::PxPyPzM4D<double>::Scalar py)
voidSetPz(ROOT::Math::PxPyPzM4D<double>::Scalar pz)
ROOT::Math::PxPyPzM4D<double>::ScalarT() const
ROOT::Math::PxPyPzM4D<double>::Scalart() const
ROOT::Math::PxPyPzM4D<double>::ScalarTheta() const
ROOT::Math::PxPyPzM4D<double>::ScalarX() const
ROOT::Math::PxPyPzM4D<double>::Scalarx() const
ROOT::Math::PxPyPzM4D<double>::ScalarY() const
ROOT::Math::PxPyPzM4D<double>::Scalary() const
ROOT::Math::PxPyPzM4D<double>::ScalarZ() const
ROOT::Math::PxPyPzM4D<double>::Scalarz() const

Data Members


Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

void SetCoordinates(const ROOT::Math::PxPyPzM4D<double>::Scalar* src)
      Set internal data based on an array of 4 Scalar numbers

void GetCoordinates(ROOT::Math::PxPyPzM4D<double>::Scalar* dest) const
      get internal data into an array of 4 Scalar numbers

{ dest[0] = fX; dest[1] = fY; dest[2] = fZ; dest[3] = fM; }
void SetCoordinates(ROOT::Math::PxPyPzM4D<double>::Scalar px, ROOT::Math::PxPyPzM4D<double>::Scalar py, ROOT::Math::PxPyPzM4D<double>::Scalar pz, ROOT::Math::PxPyPzM4D<double>::Scalar m)
      Set internal data based on 4 Scalar numbers

void GetCoordinates(ROOT::Math::PxPyPzM4D<double>::Scalar& px, ROOT::Math::PxPyPzM4D<double>::Scalar& py, ROOT::Math::PxPyPzM4D<double>::Scalar& pz, ROOT::Math::PxPyPzM4D<double>::Scalar& m) const
      get internal data into 4 Scalar numbers

{ px=fX; py=fY; pz=fZ; m=fM;}
Scalar Px() const
 --------- Coordinates and Coordinate-like Scalar properties -------------
 cartesian (Minkowski)coordinate accessors
{ return fX;}
Scalar Py() const
{ return fY;}
Scalar Pz() const
{ return fZ;}
Scalar M() const
{ return fM; }
Scalar X() const
{ return fX;}
Scalar Y() const
{ return fY;}
Scalar Z() const
{ return fZ;}
Scalar E() const
 other coordinate representation


{ return std::sqrt(E2() ); }
Scalar T() const
{ return E();}
Scalar P2() const
      squared magnitude of spatial components

{ return fX*fX + fY*fY + fZ*fZ; }
Scalar P() const
      magnitude of spatial components (magnitude of 3-momentum)

{ return std::sqrt(P2()); }
Scalar R() const
{ return P(); }
Scalar M2() const
      vector magnitude squared (or mass squared)
      In case of negative mass (spacelike particles return negative values)

Scalar Mag2() const
{ return M2(); }
Scalar Mag() const
{ return M(); }
Scalar E2() const
      energy squared

Scalar Pt2() const
       transverse spatial component squared

{ return fX*fX + fY*fY;}
Scalar Perp2() const
{ return Pt2();}
Scalar Pt() const
      Transverse spatial component (P_perp or rho)

{ return std::sqrt(Perp2());}
Scalar Perp() const
{ return Pt();}
Scalar Rho() const
{ return Pt();}
Scalar Mt2() const
       transverse mass squared

{ return E2() - fZ*fZ; }
Scalar Mt() const
      transverse mass

Scalar Et2() const
       transverse energy squared

Scalar Et() const
      transverse energy

Scalar Phi() const
      azimuthal angle

Scalar Theta() const
      polar angle

Scalar Eta() const

void SetPx(ROOT::Math::PxPyPzM4D<double>::Scalar px)
 --------- Set Coordinates of this system  ---------------

      set X value

void SetPy(ROOT::Math::PxPyPzM4D<double>::Scalar py)
      set Y value

void SetPz(ROOT::Math::PxPyPzM4D<double>::Scalar pz)
      set Z value

void SetM(ROOT::Math::PxPyPzM4D<double>::Scalar m)
      set T value

void SetPxPyPzE(ROOT::Math::PxPyPzM4D<double>::Scalar px, ROOT::Math::PxPyPzM4D<double>::Scalar py, ROOT::Math::PxPyPzM4D<double>::Scalar pz, ROOT::Math::PxPyPzM4D<double>::Scalar e)
       set all values

void Negate()
 ------ Manipulations -------------

      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

void Scale(const ROOT::Math::PxPyPzM4D<double>::Scalar& a)
      scale coordinate values by a scalar quantity a

Scalar x() const
 ============= Compatibility section ==================
 The following make this coordinate system look enough like a CLHEP
 vector that an assignment member template can work with either
{ return X(); }
Scalar y() const
{ return Y(); }
Scalar z() const
{ return Z(); }
Scalar t() const
{ return E(); }
void SetPt(double pt)
 ====== Set member functions for coordinates in other systems =======
void SetEta(double eta)
void SetPhi(double phi)
void SetE(double energy)
void RestrictNegMass()
 restrict the value of negative mass to avoid unphysical negative E2 values
 M2 must be less than P2 for the tachionic particles - otherwise use positive values