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]; }
100 { dest[0] =
fX; dest[1] =
fY; dest[2] =
fZ; dest[3] =
fT; }
118 Scalar
Px()
const {
return fX;}
119 Scalar
Py()
const {
return fY;}
120 Scalar
Pz()
const {
return fZ;}
121 Scalar
E()
const {
return fT;}
123 Scalar
X()
const {
return fX;}
124 Scalar
Y()
const {
return fY;}
125 Scalar
Z()
const {
return fZ;}
126 Scalar
T()
const {
return fT;}
139 Scalar
R()
const {
return P(); }
152 const Scalar mm =
M2();
157 " P^2 > E^2 so the mass would be imaginary");
161 Scalar
Mag()
const {
return M(); }
185 const Scalar mm =
Mt2();
190 " Pz^2 > E^2 so the transverse mass would be imaginary");
201 return pt2 == 0 ? 0 :
fT*
fT * pt2/( pt2 +
fZ*
fZ );
208 const Scalar etet =
Et2();
290 template <
class AnyCoordSystem>
312 Scalar
x()
const {
return fX; }
313 Scalar
y()
const {
return fY; }
314 Scalar
z()
const {
return fZ; }
315 Scalar
t()
const {
return fT; }
319 #if defined(__MAKECINT__) || defined(G__DICTIONARY) 323 void SetPt(Scalar pt);
325 void SetEta(Scalar eta);
327 void SetPhi(Scalar phi);
351 #if defined(__MAKECINT__) || defined(G__DICTIONARY) 365 template <
class ScalarType>
371 template <
class ScalarType>
377 template <
class ScalarType>
384 template <
class ScalarType>
397 #endif // endif __MAKE__CINT || G__DICTIONARY 400 #endif // ROOT_Math_GenVector_PxPyPzE4D Class describing a 4D cylindrical coordinate system using Pt , Phi, Eta and E (or rho...
void SetPhi(Scalar phi)
set phi value
Scalar Mt() const
transverse mass
Class describing a 4D cylindrical coordinate system using Pt , Phi, Eta and M (mass) The metric used ...
PxPyPzE4D()
Default constructor with x=y=z=t=0.
Namespace for new ROOT classes and functions.
Scalar Pt() const
Transverse spatial component (P_perp or rho)
void SetCoordinates(const Scalar src[])
Set internal data based on an array of 4 Scalar numbers.
Scalar P2() const
squared magnitude of spatial components
Scalar Pt2() const
transverse spatial component squared
Scalar P() const
magnitude of spatial components (magnitude of 3-momentum)
ScalarType fX
(contigous) data containing the coordinate values x,y,z,t
Scalar Theta() const
polar angle
void GetCoordinates(Scalar dest[]) const
get internal data into an array of 4 Scalar numbers
PxPyPzE4D(const PxPyPzE4D &v)
copy constructor
Scalar Eta() const
pseudorapidity
VecExpr< UnaryOp< Sqrt< T >, VecExpr< A, T, D >, T >, T, D > sqrt(const VecExpr< A, T, D > &rhs)
void SetPx(Scalar px)
set X value
Class describing a 4D cartesian coordinate system (x, y, z, t coordinates) or momentum-energy vectors...
void SetPxPyPzE(Scalar px, Scalar py, Scalar pz, Scalar e)
set all values using cartesian coordinates
void GetCoordinates(Scalar &px, Scalar &py, Scalar &pz, Scalar &e) const
get internal data into 4 Scalar numbers
bool operator==(const PxPyPzE4D &rhs) const
Exact equality.
void SetM(Scalar mass)
set M value
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t Int_t m
PxPyPzE4D & operator=(const PxPyPzE4D &v)
assignment operator
PxPyPzE4D(const CoordSystem &v)
construct from any vector or coordinate system class implementing x(), y() and z() and t() ...
void SetPt(Scalar pt)
set Pt value
void Throw(const char *)
function throwing exception, by creating internally a GenVector_exception only when needed ...
void Scale(const Scalar &a)
scale coordinate values by a scalar quantity a
void SetPz(Scalar pz)
set Z value
void SetPy(Scalar py)
set Y value
void SetEta(Scalar eta)
set eta value
Scalar Et() const
transverse energy
Scalar Et2() const
transverse energy squared
Scalar M() const
invariant mass
Scalar Eta_FromRhoZ(Scalar rho, Scalar z)
Calculate eta given rho and zeta.
PxPyPzE4D(Scalar px, Scalar py, Scalar pz, Scalar e)
Constructor from x, y , z , t values.
double atan2(double, double)
void Negate()
negate the 4-vector
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
Namespace for new Math classes and functions.
Scalar Mt2() const
transverse mass squared
#define dest(otri, vertexptr)
bool operator!=(const PxPyPzE4D &rhs) const
Scalar Phi() const
azimuthal angle
void SetCoordinates(Scalar px, Scalar py, Scalar pz, Scalar e)
Set internal data based on 4 Scalar numbers.
Scalar M2() const
vector magnitude squared (or mass squared)
void SetE(Scalar e)
set T value