|
ROOT
Reference Guide |
|
Go to the documentation of this file.
18 #ifndef ROOT_Math_GenVector_PxPyPzE4D
19 #define ROOT_Math_GenVector_PxPyPzE4D 1
41 template <
class ScalarType =
double>
67 template <
class CoordSystem>
94 {
fX=src[0];
fY=src[1];
fZ=src[2];
fT=src[3]; }
157 " P^2 > E^2 so the mass would be imaginary");
190 " Pz^2 > E^2 so the transverse mass would be imaginary");
201 return pt2 == 0 ? 0 :
fT*
fT * pt2/( pt2 +
fZ*
fZ );
290 template <
class AnyCoordSystem>
319 #if defined(__MAKECINT__) || defined(G__DICTIONARY)
351 #if defined(__MAKECINT__) || defined(G__DICTIONARY)
365 template <
class ScalarType>
366 void PxPyPzE4D<ScalarType>::SetPt(
Scalar pt) {
367 GenVector_exception
e(
"PxPyPzE4D::SetPt() is not supposed to be called");
369 PtEtaPhiE4D<Scalar>
v(*
this);
v.SetPt(
pt); *
this = PxPyPzE4D<Scalar>(
v);
371 template <
class ScalarType>
372 void PxPyPzE4D<ScalarType>::SetEta(
Scalar eta) {
373 GenVector_exception
e(
"PxPyPzE4D::SetEta() is not supposed to be called");
375 PtEtaPhiE4D<Scalar>
v(*
this);
v.SetEta(eta); *
this = PxPyPzE4D<Scalar>(
v);
377 template <
class ScalarType>
378 void PxPyPzE4D<ScalarType>::SetPhi(
Scalar phi) {
379 GenVector_exception
e(
"PxPyPzE4D::SetPhi() is not supposed to be called");
381 PtEtaPhiE4D<Scalar>
v(*
this);
v.SetPhi(phi); *
this = PxPyPzE4D<Scalar>(
v);
384 template <
class ScalarType>
385 void PxPyPzE4D<ScalarType>::SetM(
Scalar m) {
386 GenVector_exception
e(
"PxPyPzE4D::SetM() is not supposed to be called");
388 PtEtaPhiM4D<Scalar>
v(*
this);
v.SetM(
m);
389 *
this = PxPyPzE4D<Scalar>(
v);
Scalar Pt() const
Transverse spatial component (P_perp or rho)
void GetCoordinates(Scalar &px, Scalar &py, Scalar &pz, Scalar &e) const
get internal data into 4 Scalar numbers
Scalar Et() const
transverse energy
PxPyPzE4D(const CoordSystem &v)
construct from any vector or coordinate system class implementing x(), y() and z() and t()
#define dest(otri, vertexptr)
void Negate()
negate the 4-vector
void SetPz(Scalar pz)
set Z value
void SetPy(Scalar py)
set Y value
Scalar Mt2() const
transverse mass squared
void SetCoordinates(const Scalar src[])
Set internal data based on an array of 4 Scalar numbers.
bool operator!=(const PxPyPzE4D &rhs) const
Scalar P2() const
squared magnitude of spatial components
Scalar Pt2() const
transverse spatial component squared
Scalar Mt() const
transverse mass
void SetE(Scalar e)
set T value
Scalar Theta() const
polar angle
Scalar Eta_FromRhoZ(Scalar rho, Scalar z)
Calculate eta given rho and zeta.
Scalar Phi() const
azimuthal angle
void SetCoordinates(Scalar px, Scalar py, Scalar pz, Scalar e)
Set internal data based on 4 Scalar numbers.
double atan2(double, double)
void 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)
Scalar P() const
magnitude of spatial components (magnitude of 3-momentum)
ScalarType fX
(contigous) data containing the coordinate values x,y,z,t
Scalar M2() const
vector magnitude squared (or mass squared)
void SetPx(Scalar px)
set X value
static constexpr double mm
void GetCoordinates(Scalar dest[]) const
get internal data into an array of 4 Scalar numbers
PxPyPzE4D()
Default constructor with x=y=z=t=0.
Scalar Et2() const
transverse energy squared
Rotation3D::Scalar Scalar
PxPyPzE4D(Scalar px, Scalar py, Scalar pz, Scalar e)
Constructor from x, y , z , t values.
void SetPxPyPzE(Scalar px, Scalar py, Scalar pz, Scalar e)
set all values using cartesian coordinates
Scalar Eta() const
pseudorapidity
PxPyPzE4D & operator=(const PxPyPzE4D &v)
assignment operator
Scalar M() const
invariant mass
bool operator==(const PxPyPzE4D &rhs) const
Exact equality.
void Scale(const Scalar &a)
scale coordinate values by a scalar quantity a
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Namespace for new Math classes and functions.
Class describing a 4D cartesian coordinate system (x, y, z, t coordinates) or momentum-energy vectors...
PxPyPzE4D(const PxPyPzE4D &v)
copy constructor