18 #ifndef ROOT_Math_GenVector_PtEtaPhiM4D 19 #define ROOT_Math_GenVector_PtEtaPhiM4D 1 51 template <
class ScalarType>
78 template <
class CoordSystem >
116 { dest[0] =
fPt; dest[1] =
fEta; dest[2] =
fPhi; dest[3] =
fM; }
145 Scalar
M()
const {
return fM; }
146 Scalar
Mag()
const {
return M(); }
154 Scalar
X ()
const {
return Px(); }
156 Scalar
Y ()
const {
return Py(); }
160 Scalar
Z ()
const {
return Pz(); }
167 :
fEta > etaMax<Scalar>() ?
fEta - etaMax<Scalar>()
168 :
fEta < -etaMax<Scalar>() ? -
fEta - etaMax<Scalar>() : 0;
170 Scalar
R()
const {
return P(); }
177 const Scalar p =
P();
185 Scalar e2 =
P2() +
M2();
187 return e2 > 0 ? e2 : 0;
195 Scalar
T()
const {
return E(); }
221 const Scalar
mm =
Mt2();
226 " Pz^2 > E^2 so the transverse mass would be imaginary");
245 inline static Scalar
pi() {
return M_PI; }
254 GenVector::Throw(
"PtEtaPhiM4D::unphysical value of mass, set to closest physical value");
299 void SetPxPyPzE(Scalar px, Scalar py, Scalar pz, Scalar
e);
312 GenVector::Throw (
"PtEtaPhiM4D::Negate - cannot negate the energy - can negate only the spatial components");
330 template <
class CoordSystem >
352 Scalar
x()
const {
return X(); }
353 Scalar
y()
const {
return Y(); }
354 Scalar
z()
const {
return Z(); }
355 Scalar
t()
const {
return E(); }
358 #if defined(__MAKECINT__) || defined(G__DICTIONARY) 362 void SetPx(Scalar px);
364 void SetPy(Scalar py);
366 void SetPz(Scalar pz);
396 template <
class ScalarType>
402 #if defined(__MAKECINT__) || defined(G__DICTIONARY) 406 template <
class ScalarType>
412 template <
class ScalarType>
418 template <
class ScalarType>
424 template <
class ScalarType>
431 #endif // endif __MAKE__CINT || G__DICTIONARY 439 #endif // ROOT_Math_GenVector_PtEtaPhiM4D Scalar Mt2() const
transverse mass squared
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 Mt() const
transverse mass - will be negative if Mt2() is negative
Namespace for new ROOT classes and functions.
void Scale(Scalar a)
Scale coordinate values by a scalar quantity a.
Scalar Et2() const
transverse energy squared
PtEtaPhiM4D(const CoordSystem &c)
Generic constructor from any 4D coordinate system implementing Pt(), Eta(), Phi() and M() ...
Scalar Pt2() const
transverse spatial component squared
Scalar M() const
M() is the invariant mass; in this coordinate system it can be negagative if set that way...
void SetPxPyPzE(Scalar px, Scalar py, Scalar pz, Scalar e)
set values using cartesian coordinate system
void GetCoordinates(Scalar dest[]) const
get internal data into an array of 4 Scalar numbers
static constexpr double mm
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
Scalar P() const
magnitude of momentum
Class describing a 4D cartesian coordinate system (x, y, z, t coordinates) or momentum-energy vectors...
void SetPt(Scalar pt)
set Pt value
PtEtaPhiM4D()
Default constructor gives zero 4-vector (with zero mass)
PtEtaPhiM4D(const PtEtaPhiM4D &v)
copy constructor
void SetM(Scalar mass)
set M value
void GetCoordinates(Scalar &pt, Scalar &eta, Scalar &phi, Scalar &mass) const
get internal data into 4 Scalar numbers
void Throw(const char *)
function throwing exception, by creating internally a GenVector_exception only when needed ...
void SetPz(Scalar pz)
set Z value
void SetPy(Scalar py)
set Y value
Scalar P2() const
squared magnitude of spatial components (momentum squared)
bool operator!=(const PtEtaPhiM4D &rhs) const
PtEtaPhiM4D & operator=(const PtEtaPhiM4D &v)
assignment operator
Scalar M2() const
vector magnitude squared (or mass squared) In case of negative mass (spacelike particles return negat...
PtEtaPhiM4D(Scalar pt, Scalar eta, Scalar phi, Scalar mass)
Constructor from pt, eta, phi, mass values.
bool operator==(const PtEtaPhiM4D &rhs) const
Exact equality.
Scalar Theta() const
polar angle
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.
void SetEta(Scalar eta)
set eta value
Scalar E() const
Energy (timelike component of momentum-energy 4-vector)
void Negate()
negate the 4-vector – Note that the energy cannot be negate (would need an additional data member) t...
#define dest(otri, vertexptr)
void SetCoordinates(Scalar pt, Scalar eta, Scalar phi, Scalar mass)
Set internal data based on 4 Scalar numbers.
Scalar Et() const
transverse energy
Scalar E2() const
energy squared
void SetCoordinates(const Scalar src[])
Set internal data based on an array of 4 Scalar numbers.
void SetE(Scalar e)
set T value