19 #ifndef ROOT_Math_GenVector_PtEtaPhiE4D
20 #define ROOT_Math_GenVector_PtEtaPhiE4D 1
22 #ifndef ROOT_Math_Math
26 #ifndef ROOT_Math_GenVector_etaMax
30 #ifndef ROOT_Math_GenVector_GenVector_exception
57 template <
class ScalarType>
81 template <
class CoordSystem >
116 { dest[0] =
fPt; dest[1] =
fEta; dest[2] =
fPhi; dest[3] =
fE; }
153 fEta > 0 ?
fEta - etaMax<Scalar>() :
154 fEta + etaMax<Scalar>() ;
163 fEta > etaMax<Scalar>() ?
fEta - etaMax<Scalar>() :
164 fEta < -etaMax<Scalar>() ? -
fEta - etaMax<Scalar>() :
189 " Pt and Eta give P such that P^2 > E^2, so the mass would be imaginary");
215 " Pt and Eta give Pz such that Pz^2 > E^2, so the mass would be imaginary");
250 if (
fEta >= 0)
return 0;
314 template <
class CoordSystem >
343 #if defined(__MAKECINT__) || defined(G__DICTIONARY)
374 #ifndef ROOT_Math_GenVector_PxPyPzE4D
377 #if defined(__MAKECINT__) || defined(G__DICTIONARY)
378 #ifndef ROOT_Math_GenVector_PtEtaPhiM4D
387 template <
class ScalarType>
393 #if defined(__MAKECINT__) || defined(G__DICTIONARY)
397 template <
class ScalarType>
403 template <
class ScalarType>
404 inline void PtEtaPhiE4D<ScalarType>::SetPy(
Scalar py) {
405 GenVector_exception e(
"PtEtaPhiE4D::SetPx() is not supposed to be called");
407 PxPyPzE4D<Scalar>
v(*
this);
v.SetPy(py); *
this = PtEtaPhiE4D<Scalar>(
v);
409 template <
class ScalarType>
410 inline void PtEtaPhiE4D<ScalarType>::SetPz(
Scalar pz) {
411 GenVector_exception e(
"PtEtaPhiE4D::SetPx() is not supposed to be called");
413 PxPyPzE4D<Scalar>
v(*
this);
v.SetPz(pz); *
this = PtEtaPhiE4D<Scalar>(
v);
415 template <
class ScalarType>
416 inline void PtEtaPhiE4D<ScalarType>::SetM(
Scalar m) {
417 GenVector_exception e(
"PtEtaPhiE4D::SetM() is not supposed to be called");
419 PtEtaPhiM4D<Scalar>
v(*
this);
v.SetM(m);
420 *
this = PtEtaPhiE4D<Scalar>(
v);
423 #endif // endif __MAKE__CINT || G__DICTIONARY
432 #endif // ROOT_Math_GenVector_PtEtaPhiE4D
Class describing a 4D cylindrical coordinate system using Pt , Phi, Eta and E (or rho...
void SetPhi(Scalar phi)
set phi value
bool operator!=(const PtEtaPhiE4D &rhs) const
void SetPxPyPzE(Scalar px, Scalar py, Scalar pz, Scalar e)
set values using cartesian coordinate system
void GetCoordinates(Scalar &pt, Scalar &eta, Scalar &phi, Scalar &e) const
get internal data into 4 Scalar numbers
Scalar Et2() const
transverse energy squared
PtEtaPhiE4D()
Default constructor gives zero 4-vector.
Scalar Theta() const
polar angle
void GetCoordinates(Scalar dest[]) const
get internal data into an array of 4 Scalar numbers
Scalar Mt() const
transverse mass
void Scale(Scalar a)
Scale coordinate values by a scalar quantity a.
Scalar Et() const
transverse energy
Scalar P() const
magnitude of momentum
Class describing a 4D cartesian coordinate system (x, y, z, t coordinates) or momentum-energy vectors...
Scalar Mt2() const
transverse mass squared
Scalar Pt2() const
transverse spatial component squared
Scalar P2() const
squared magnitude of spatial components (momentum squared)
Scalar M() const
invariant mass
void Negate()
negate the 4-vector
void SetPt(Scalar pt)
set Pt value
void Throw(const char *)
function throwing exception, by creating internally a GenVector_exception only when needed ...
void SetCoordinates(Scalar pt, Scalar eta, Scalar phi, Scalar e)
Set internal data based on 4 Scalar numbers.
Scalar M2() const
vector magnitude squared (or mass squared)
void SetEta(Scalar eta)
set eta value
void SetCoordinates(const Scalar src[])
Set internal data based on an array of 4 Scalar numbers.
void SetE(Scalar e)
set E value
PtEtaPhiE4D(Scalar pt, Scalar eta, Scalar phi, Scalar e)
Constructor from pt, eta, phi, e values.
#define dest(otri, vertexptr)
PtEtaPhiE4D & operator=(const PtEtaPhiE4D &v)
assignment operator
PtEtaPhiE4D(const CoordSystem &c)
Generic constructor from any 4D coordinate system implementing Pt(), Eta(), Phi() and E() ...
bool operator==(const PtEtaPhiE4D &rhs) const
Exact equality.
PtEtaPhiE4D(const PtEtaPhiE4D &v)
copy constructor