18 #ifndef ROOT_Math_GenVector_PtEtaPhiM4D
19 #define ROOT_Math_GenVector_PtEtaPhiM4D 1
21 #ifndef ROOT_Math_Math
25 #ifndef ROOT_Math_GenVector_etaMax
29 #ifndef ROOT_Math_GenVector_GenVector_exception
55 template <
class ScalarType>
82 template <
class CoordSystem >
120 { dest[0] =
fPt; dest[1] =
fEta; dest[2] =
fPhi; dest[3] =
fM; }
164 fEta > 0 ?
fEta - etaMax<Scalar>() :
165 fEta + etaMax<Scalar>() ;
174 fEta > etaMax<Scalar>() ?
fEta - etaMax<Scalar>() :
175 fEta < -etaMax<Scalar>() ? -
fEta - etaMax<Scalar>() :
191 return e2 > 0 ? e2 : 0;
230 " Pz^2 > E^2 so the transverse mass would be imaginary");
260 if (
fM >=0 )
return;
262 GenVector::Throw (
"PtEtaPhiM4D::unphysical value of mass, set to closest physical value");
275 if (
fEta >= 0)
return 0;
324 GenVector::Throw (
"PtEtaPhiM4D::Negate - cannot negate the energy - can negate only the spatial components");
342 template <
class CoordSystem >
370 #if defined(__MAKECINT__) || defined(G__DICTIONARY)
399 #ifndef ROOT_Math_GenVector_PxPyPzE4D
410 template <
class ScalarType>
416 #if defined(__MAKECINT__) || defined(G__DICTIONARY)
420 template <
class ScalarType>
426 template <
class ScalarType>
427 void PtEtaPhiM4D<ScalarType>::SetPy(
Scalar py) {
428 GenVector_exception e(
"PtEtaPhiM4D::SetPx() is not supposed to be called");
430 PxPyPzE4D<Scalar>
v(*
this);
v.SetPy(py); *
this = PtEtaPhiM4D<Scalar>(
v);
432 template <
class ScalarType>
433 void PtEtaPhiM4D<ScalarType>::SetPz(
Scalar pz) {
434 GenVector_exception e(
"PtEtaPhiM4D::SetPx() is not supposed to be called");
436 PxPyPzE4D<Scalar>
v(*
this);
v.SetPz(pz); *
this = PtEtaPhiM4D<Scalar>(
v);
438 template <
class ScalarType>
439 void PtEtaPhiM4D<ScalarType>::SetE(
Scalar energy) {
440 GenVector_exception e(
"PtEtaPhiM4D::SetE() is not supposed to be called");
442 PxPyPzE4D<Scalar>
v(*
this);
v.SetE(energy); *
this = PtEtaPhiM4D<Scalar>(
v);
445 #endif // endif __MAKE__CINT || G__DICTIONARY
453 #endif // ROOT_Math_GenVector_PtEtaPhiM4D
void SetPhi(Scalar phi)
set phi value
Class describing a 4D cylindrical coordinate system using Pt , Phi, Eta and M (mass) The metric used ...
Scalar Et2() const
transverse energy squared
void Scale(Scalar a)
Scale coordinate values by a scalar quantity a.
PtEtaPhiM4D(const CoordSystem &c)
Generic constructor from any 4D coordinate system implementing Pt(), Eta(), Phi() and M() ...
Scalar M2() const
vector magnitude squared (or mass squared) In case of negative mass (spacelike particles return negat...
void SetPxPyPzE(Scalar px, Scalar py, Scalar pz, Scalar e)
set values using cartesian coordinate system
Scalar P2() const
squared magnitude of spatial components (momentum squared)
Scalar P() const
magnitude of momentum
Class describing a 4D cartesian coordinate system (x, y, z, t coordinates) or momentum-energy vectors...
Scalar E() const
Energy (timelike component of momentum-energy 4-vector)
void SetPt(Scalar pt)
set Pt value
bool operator==(const PtEtaPhiM4D &rhs) const
Exact equality.
PtEtaPhiM4D()
Default constructor gives zero 4-vector (with zero mass)
PtEtaPhiM4D(const PtEtaPhiM4D &v)
copy constructor
void SetM(Scalar mass)
set M value
void Throw(const char *)
function throwing exception, by creating internally a GenVector_exception only when needed ...
Scalar Mt2() const
transverse mass squared
Scalar M() const
M() is the invariant mass; in this coordinate system it can be negagative if set that way...
PtEtaPhiM4D & operator=(const PtEtaPhiM4D &v)
assignment operator
PtEtaPhiM4D(Scalar pt, Scalar eta, Scalar phi, Scalar mass)
Constructor from pt, eta, phi, mass values.
bool operator!=(const PtEtaPhiM4D &rhs) const
Scalar Theta() const
polar angle
void GetCoordinates(Scalar dest[]) const
get internal data into an array of 4 Scalar numbers
Scalar Pt2() const
transverse spatial component squared
void SetEta(Scalar eta)
set eta value
void Negate()
negate the 4-vector – Note that the energy cannot be negate (would need an additional data member) th...
#define dest(otri, vertexptr)
void SetCoordinates(Scalar pt, Scalar eta, Scalar phi, Scalar mass)
Set internal data based on 4 Scalar numbers.
void GetCoordinates(Scalar &pt, Scalar &eta, Scalar &phi, Scalar &mass) const
get internal data into 4 Scalar numbers
Scalar E2() const
energy squared
Scalar Mt() const
transverse mass - will be negative if Mt2() is negative
Scalar Et() const
transverse energy
void SetCoordinates(const Scalar src[])
Set internal data based on an array of 4 Scalar numbers.