18 #ifndef ROOT_Math_GenVector_PxPyPzM4D 19 #define ROOT_Math_GenVector_PxPyPzM4D 1 46 template <
class ScalarType =
double>
74 template <
class CoordSystem>
103 template <
class AnyCoordSystem>
116 fX=src[0];
fY=src[1];
fZ=src[2];
fM=src[3];
124 { dest[0] =
fX; dest[1] =
fY; dest[2] =
fZ; dest[3] =
fM; }
144 Scalar
Px()
const {
return fX;}
145 Scalar
Py()
const {
return fY;}
146 Scalar
Pz()
const {
return fZ;}
147 Scalar
M()
const {
return fM; }
149 Scalar
X()
const {
return fX;}
150 Scalar
Y()
const {
return fY;}
151 Scalar
Z()
const {
return fZ;}
159 Scalar
T()
const {
return E();}
170 Scalar
R()
const {
return P(); }
181 Scalar
Mag()
const {
return M(); }
187 Scalar e2 =
P2() +
M2();
189 return e2 > 0 ? e2 : 0;
214 const Scalar mm =
Mt2();
219 " Pz^2 > E^2 so the transverse mass would be imaginary");
230 return pt2 == 0 ? 0 :
E2() * pt2/( pt2 +
fZ*
fZ );
237 const Scalar etet =
Et2();
290 void SetPxPyPzE(Scalar px, Scalar py, Scalar pz, Scalar
e);
303 GenVector::Throw (
"PxPyPzM4D::Negate - cannot negate the energy - can negate only the spatial components");
330 Scalar
x()
const {
return X(); }
331 Scalar
y()
const {
return Y(); }
332 Scalar
z()
const {
return Z(); }
333 Scalar
t()
const {
return E(); }
337 #if defined(__MAKECINT__) || defined(G__DICTIONARY) 341 void SetPt(Scalar pt);
343 void SetEta(Scalar eta);
345 void SetPhi(Scalar phi);
356 if (
fM >=0 )
return;
358 GenVector::Throw(
"PxPyPzM4D::unphysical value of mass, set to closest physical value");
389 template <
class ScalarType>
395 #if defined(__MAKECINT__) || defined(G__DICTIONARY) 401 template <
class ScalarType>
407 template <
class ScalarType>
413 template <
class ScalarType>
419 template <
class ScalarType>
428 #endif // endif __MAKE__CINT || G__DICTIONARY 436 #endif // ROOT_Math_GenVector_PxPyPzM4D Class describing a 4D cylindrical coordinate system using Pt , Phi, Eta and E (or rho...
void SetPhi(Scalar phi)
set phi value
void GetCoordinates(Scalar dest[]) const
get internal data into an array of 4 Scalar numbers
Scalar Theta() const
polar angle
Namespace for new ROOT classes and functions.
void GetCoordinates(Scalar &px, Scalar &py, Scalar &pz, Scalar &m) const
get internal data into 4 Scalar numbers
Scalar Mt2() const
transverse mass squared
void Scale(const Scalar &a)
scale coordinate values by a scalar quantity a
Scalar Mt() const
transverse mass
void Negate()
negate the 4-vector - Note that the energy cannot be negate (would need an additional data member) th...
PxPyPzM4D(const CoordSystem &v)
construct from any 4D coordinate system class implementing X(), Y(), X() and M()
void SetPy(Scalar py)
set Y value
void SetM(Scalar m)
set T value
VecExpr< UnaryOp< Sqrt< T >, VecExpr< A, T, D >, T >, T, D > sqrt(const VecExpr< A, T, D > &rhs)
Class describing a 4D cartesian coordinate system (x, y, z, t coordinates) or momentum-energy vectors...
Class describing a 4D coordinate system or momentum-energy vectors stored as (Px, Py...
ScalarType fX
(contigous) data containing the coordinate values x,y,z,t
Scalar Et() const
transverse energy
Scalar M2() const
vector magnitude squared (or mass squared) In case of negative mass (spacelike particles return negat...
bool operator==(const PxPyPzM4D &rhs) const
Exact equality.
PxPyPzM4D()
Default constructor with x=y=z=m=0.
Scalar Eta() const
pseudorapidity
Scalar E2() const
energy squared
bool operator!=(const PxPyPzM4D &rhs) const
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
PxPyPzM4D(const PxPyPzM4D &v)
copy constructor
Scalar Pt2() const
transverse spatial component squared
void SetCoordinates(const Scalar src[])
Set internal data based on an array of 4 Scalar numbers.
void SetPt(Scalar pt)
set Pt value
Scalar Et2() const
transverse energy squared
void Throw(const char *)
function throwing exception, by creating internally a GenVector_exception only when needed ...
Scalar P() const
magnitude of spatial components (magnitude of 3-momentum)
void SetEta(Scalar eta)
set eta value
Scalar Phi() const
azimuthal angle
Scalar Eta_FromRhoZ(Scalar rho, Scalar z)
Calculate eta given rho and zeta.
void SetPxPyPzE(Scalar px, Scalar py, Scalar pz, Scalar e)
set all values
Scalar P2() const
squared magnitude of spatial components
double atan2(double, double)
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 Pt() const
Transverse spatial component (P_perp or rho)
void SetCoordinates(Scalar px, Scalar py, Scalar pz, Scalar m)
Set internal data based on 4 Scalar numbers.
PxPyPzM4D & operator=(const PxPyPzM4D &v)
assignment operator
#define dest(otri, vertexptr)
void SetPz(Scalar pz)
set Z value
void SetPx(Scalar px)
set X value
PxPyPzM4D(Scalar px, Scalar py, Scalar pz, Scalar m)
Constructor from x, y , z , m values.
void SetE(Scalar e)
set T value