18#ifndef ROOT_Math_GenVector_PtEtaPhiM4D
19#define ROOT_Math_GenVector_PtEtaPhiM4D 1
53template <
class ScalarType>
81 template <
class CoordSystem >
172 :
fEta > etaMax<Scalar>() ?
fEta - etaMax<Scalar>()
173 :
fEta < -etaMax<Scalar>() ? -
fEta - etaMax<Scalar>() : 0;
192 return e2 > 0 ? e2 : 0;
232 " Pz^2 > E^2 so the transverse mass would be imaginary");
244 return 2. *
E2() / (cosh(2 *
fEta) + 1);
263 GenVector::Throw(
"PtEtaPhiM4D::unphysical value of mass, set to closest physical value");
321 GenVector::Throw (
"PtEtaPhiM4D::Negate - cannot negate the energy - can negate only the spatial components");
339 template <
class CoordSystem >
367#if defined(__MAKECINT__) || defined(G__DICTIONARY)
405template <
class ScalarType>
411#if defined(__MAKECINT__) || defined(G__DICTIONARY)
415template <
class ScalarType>
421template <
class ScalarType>
422void PtEtaPhiM4D<ScalarType>::SetPy(
Scalar py) {
423 GenVector_exception
e(
"PtEtaPhiM4D::SetPx() is not supposed to be called");
425 PxPyPzE4D<Scalar>
v(*
this);
v.SetPy(py); *
this = PtEtaPhiM4D<Scalar>(
v);
427template <
class ScalarType>
428void PtEtaPhiM4D<ScalarType>::SetPz(
Scalar pz) {
429 GenVector_exception
e(
"PtEtaPhiM4D::SetPx() is not supposed to be called");
431 PxPyPzE4D<Scalar>
v(*
this);
v.SetPz(pz); *
this = PtEtaPhiM4D<Scalar>(
v);
433template <
class ScalarType>
434void PtEtaPhiM4D<ScalarType>::SetE(
Scalar energy) {
435 GenVector_exception
e(
"PtEtaPhiM4D::SetE() is not supposed to be called");
437 PxPyPzE4D<Scalar>
v(*
this);
v.SetE(energy); *
this = PtEtaPhiM4D<Scalar>(
v);
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t dest
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t src
Class describing a 4D cylindrical coordinate system using Pt , Phi, Eta and M (mass) The metric used ...
void GetCoordinates(Scalar &pt, Scalar &eta, Scalar &phi, Scalar &mass) const
get internal data into 4 Scalar numbers
PtEtaPhiM4D(const PtEtaPhiM4D &v)
copy constructor
PtEtaPhiM4D & operator=(const PtEtaPhiM4D &v)
assignment operator
void SetPt(Scalar pt)
set Pt value
PtEtaPhiM4D()
Default constructor gives zero 4-vector (with zero mass)
void SetPhi(Scalar phi)
set phi value
void Negate()
negate the 4-vector – Note that the energy cannot be negate (would need an additional data member) th...
bool operator==(const PtEtaPhiM4D &rhs) const
Exact equality.
Scalar Et() const
transverse energy
Scalar P2() const
squared magnitude of spatial components (momentum squared)
void GetCoordinates(Scalar dest[]) const
get internal data into an array of 4 Scalar numbers
Scalar E2() const
energy squared
void SetCoordinates(Scalar pt, Scalar eta, Scalar phi, Scalar mass)
Set internal data based on 4 Scalar numbers.
void SetCoordinates(const Scalar src[])
Set internal data based on an array of 4 Scalar numbers.
static constexpr unsigned int Dimension
Scalar Mt() const
transverse mass - will be negative if Mt2() is negative
void SetPxPyPzE(Scalar px, Scalar py, Scalar pz, Scalar e)
set values using cartesian coordinate system
Scalar Et2() const
transverse energy squared
bool operator!=(const PtEtaPhiM4D &rhs) const
void SetM(Scalar mass)
set M value
Scalar M() const
M() is the invariant mass; in this coordinate system it can be negagative if set that way.
Scalar Pt2() const
transverse spatial component squared
Scalar M2() const
vector magnitude squared (or mass squared) In case of negative mass (spacelike particles return negat...
constexpr PtEtaPhiM4D(const CoordSystem &c)
Generic constructor from any 4D coordinate system implementing Pt(), Eta(), Phi() and M()
Scalar Mt2() const
transverse mass squared
Scalar Theta() const
polar angle
PtEtaPhiM4D(Scalar pt, Scalar eta, Scalar phi, Scalar mass)
Constructor from pt, eta, phi, mass values.
void Scale(Scalar a)
Scale coordinate values by a scalar quantity a.
Scalar P() const
magnitude of momentum
Scalar E() const
Energy (timelike component of momentum-energy 4-vector)
void SetEta(Scalar eta)
set eta value
Class describing a 4D cartesian coordinate system (x, y, z, t coordinates) or momentum-energy vectors...
Namespace for new Math classes and functions.
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)
Rotation3D::Scalar Scalar
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...