18#ifndef ROOT_Math_GenVector_PxPyPzM4D
19#define ROOT_Math_GenVector_PxPyPzM4D 1
48template <
class ScalarType =
double>
77 template <
class CoordSystem>
106 template <
class AnyCoordSystem>
192 return e2 > 0 ? e2 : 0;
223 " Pz^2 > E^2 so the transverse mass would be imaginary");
235 return pt2 == 0 ? 0 :
E2() * pt2/( pt2 +
fZ*
fZ );
309 GenVector::Throw (
"PxPyPzM4D::Negate - cannot negate the energy - can negate only the spatial components");
343#if defined(__MAKECINT__) || defined(G__DICTIONARY)
362 if (
fM >=0 )
return;
364 GenVector::Throw(
"PxPyPzM4D::unphysical value of mass, set to closest physical value");
395template <
class ScalarType>
401#if defined(__MAKECINT__) || defined(G__DICTIONARY)
407template <
class ScalarType>
413template <
class ScalarType>
414inline void PxPyPzM4D<ScalarType>::SetEta(ScalarType eta) {
415 GenVector_exception
e(
"PxPyPzM4D::SetEta() is not supposed to be called");
417 PtEtaPhiE4D<ScalarType>
v(*
this);
v.SetEta(eta); *
this = PxPyPzM4D<ScalarType>(
v);
419template <
class ScalarType>
420inline void PxPyPzM4D<ScalarType>::SetPhi(ScalarType phi) {
421 GenVector_exception
e(
"PxPyPzM4D::SetPhi() is not supposed to be called");
423 PtEtaPhiE4D<ScalarType>
v(*
this);
v.SetPhi(phi); *
this = PxPyPzM4D<ScalarType>(
v);
425template <
class ScalarType>
426inline void PxPyPzM4D<ScalarType>::SetE(ScalarType energy) {
427 GenVector_exception
e(
"PxPyPzM4D::SetE() is not supposed to be called");
429 PxPyPzE4D<ScalarType>
v(*
this);
v.SetE(energy);
430 *
this = PxPyPzM4D<ScalarType>(
v);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t dest
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t src
Class describing a 4D cylindrical coordinate system using Pt , Phi, Eta and E (or rho,...
Class describing a 4D cartesian coordinate system (x, y, z, t coordinates) or momentum-energy vectors...
Class describing a 4D coordinate system or momentum-energy vectors stored as (Px, Py,...
Scalar Theta() const
polar angle
PxPyPzM4D(const PxPyPzM4D &v)
copy constructor
Scalar Et() const
transverse energy
PxPyPzM4D & operator=(const PxPyPzM4D &v)
assignment operator
Scalar E2() const
energy squared
void Scale(const Scalar &a)
scale coordinate values by a scalar quantity a
constexpr PxPyPzM4D(const CoordSystem &v)
construct from any 4D coordinate system class implementing X(), Y(), X() and M()
ScalarType fX
(contiguous) data containing the coordinate values x,y,z,t
void GetCoordinates(Scalar &px, Scalar &py, Scalar &pz, Scalar &m) const
get internal data into 4 Scalar numbers
void SetPx(Scalar px)
set X value
PxPyPzM4D(Scalar px, Scalar py, Scalar pz, Scalar m)
Constructor from x, y , z , m values.
void SetCoordinates(const Scalar src[])
Set internal data based on an array of 4 Scalar numbers.
void Negate()
negate the 4-vector - Note that the energy cannot be negate (would need an additional data member) th...
Scalar M2() const
vector magnitude squared (or mass squared) In case of negative mass (spacelike particles return negat...
Scalar P() const
magnitude of spatial components (magnitude of 3-momentum)
void SetPz(Scalar pz)
set Z value
Scalar Mt2() const
transverse mass squared
void SetCoordinates(Scalar px, Scalar py, Scalar pz, Scalar m)
Set internal data based on 4 Scalar numbers.
void GetCoordinates(Scalar dest[]) const
get internal data into an array of 4 Scalar numbers
Scalar Pt() const
Transverse spatial component (P_perp or rho)
bool operator==(const PxPyPzM4D &rhs) const
Exact equality.
void SetPy(Scalar py)
set Y value
Scalar Mt() const
transverse mass
static constexpr unsigned int Dimension
Scalar Phi() const
azimuthal angle
Scalar P2() const
squared magnitude of spatial components
Scalar Pt2() const
transverse spatial component squared
bool operator!=(const PxPyPzM4D &rhs) const
Scalar Et2() const
transverse energy squared
PxPyPzM4D()
Default constructor with x=y=z=m=0.
void SetM(Scalar m)
set T value
void SetPxPyPzE(Scalar px, Scalar py, Scalar pz, Scalar e)
set all values
Scalar Eta() const
pseudorapidity
Namespace for new Math classes and functions.
void Throw(const char *)
function throwing exception, by creating internally a GenVector_exception only when needed
Scalar Eta_FromRhoZ(Scalar rho, Scalar z)
Calculate eta given rho and zeta.
VecExpr< UnaryOp< Sqrt< T >, VecExpr< A, T, D >, T >, T, D > sqrt(const VecExpr< A, T, D > &rhs)
Rotation3D::Scalar Scalar
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...