18#ifndef ROOT_Math_GenVector_PxPyPzE4D
19#define ROOT_Math_GenVector_PxPyPzE4D 1
43template <
class ScalarType =
double>
67 template <
class CoordSystem>
75 {
fX=src[0];
fY=src[1];
fZ=src[2];
fT=src[3]; }
81 { dest[0] =
fX; dest[1] =
fY; dest[2] =
fZ; dest[3] =
fT; }
139 " P^2 > E^2 so the mass would be imaginary");
174 " Pz^2 > E^2 so the transverse mass would be imaginary");
186 return pt2 == 0 ? 0 :
fT*
fT * pt2/( pt2 +
fZ*
fZ );
276 template <
class AnyCoordSystem>
305#if defined(__ROOTCLING__) || defined(G__DICTIONARY)
336#if defined(__ROOTCLING__) || defined(G__DICTIONARY)
350template <
class ScalarType>
351void PxPyPzE4D<ScalarType>::SetPt(Scalar
pt) {
352 GenVector_exception
e(
"PxPyPzE4D::SetPt() is not supposed to be called");
354 PtEtaPhiE4D<Scalar>
v(*
this);
v.SetPt(
pt); *
this = PxPyPzE4D<Scalar>(
v);
356template <
class ScalarType>
362template <
class ScalarType>
369template <
class ScalarType>
Class describing a 4D cylindrical coordinate system using Pt , Phi, Eta and E (or rho,...
Class describing a 4D cylindrical coordinate system using Pt , Phi, Eta and M (mass) The metric used ...
Class describing a 4D cartesian coordinate system (x, y, z, t coordinates) or momentum-energy vectors...
void GetCoordinates(Scalar dest[]) const
get internal data into an array of 4 Scalar numbers
constexpr PxPyPzE4D(const CoordSystem &v)
construct from any vector or coordinate system class implementing x(), y() and z() and t()
void GetCoordinates(Scalar &px, Scalar &py, Scalar &pz, Scalar &e) const
get internal data into 4 Scalar numbers
ScalarType fX
(contiguous) data containing the coordinate values x,y,z,t
void SetCoordinates(Scalar px, Scalar py, Scalar pz, Scalar e)
Set internal data based on 4 Scalar numbers.
bool operator==(const PxPyPzE4D &rhs) const
Exact equality.
Scalar Mt() const
transverse mass
Scalar Pt() const
Transverse spatial component (P_perp or rho).
void SetPz(Scalar pz)
set Z value
bool operator!=(const PxPyPzE4D &rhs) const
void SetCoordinates(const Scalar src[])
Set internal data based on an array of 4 Scalar numbers.
void Scale(const Scalar &a)
scale coordinate values by a scalar quantity a
void SetPxPyPzE(Scalar px, Scalar py, Scalar pz, Scalar e)
set all values using cartesian coordinates
void SetPx(Scalar px)
set X value
Scalar Eta() const
pseudorapidity
void Negate()
negate the 4-vector
Scalar Mt2() const
transverse mass squared
Scalar P2() const
squared magnitude of spatial components
Scalar M() const
invariant mass
Scalar Et() const
transverse energy
constexpr PxPyPzE4D() noexcept=default
Default constructor with x=y=z=t=0.
Scalar Et2() const
transverse energy squared
Scalar Pt2() const
transverse spatial component squared
Scalar Phi() const
azimuthal angle
Scalar Theta() const
polar angle
PxPyPzE4D & operator=(const AnyCoordSystem &v)
Assignment from a generic coordinate system implementing x(), y(), z() and t().
Scalar P() const
magnitude of spatial components (magnitude of 3-momentum)
static constexpr unsigned int Dimension
void SetE(Scalar e)
set T value
void SetPy(Scalar py)
set Y value
Scalar M2() const
vector magnitude squared (or mass squared)
Namespace for new Math classes and functions.
Scalar Eta_FromRhoZ(Scalar rho, Scalar z)
Calculate eta given rho and zeta.
void GenVector_Throw(const char *)
function throwing exception, by creating internally a GenVector_exception only when needed
VecExpr< UnaryOp< Sqrt< T >, VecExpr< A, T, D >, T >, T, D > sqrt(const VecExpr< A, T, D > &rhs)
Rotation3D::Scalar Scalar