19 #ifndef ROOT_Math_GenVector_Cartesian3D 20 #define ROOT_Math_GenVector_Cartesian3D 1 43 template <
class T =
double>
64 template <
class CoordSystem>
95 { dest[0] =
fX; dest[1] =
fY; dest[2] =
fZ; }
107 Scalar
X()
const {
return fX;}
108 Scalar
Y()
const {
return fY;}
109 Scalar
Z()
const {
return fZ;}
140 void SetXYZ(Scalar xx, Scalar yy, Scalar zz) {
165 template <
class CoordSystem>
186 T x()
const {
return X();}
187 T y()
const {
return Y();}
188 T z()
const {
return Z(); }
195 const T rho = v.
Rho();
209 const T rho = v.
Rho();
218 #if defined(__MAKECINT__) || defined(G__DICTIONARY) 224 void SetTheta(Scalar theta);
226 void SetPhi(Scalar phi);
228 void SetRho(Scalar rho);
230 void SetEta(Scalar eta);
248 #if defined(__MAKECINT__) || defined(G__DICTIONARY)
bool operator==(const Cartesian3D &rhs) const
Exact equality.
void SetX(Scalar xx)
set the x coordinate value keeping y and z constant
void Scale(Scalar a)
scale the vector by a scalar quantity a
Namespace for new ROOT classes and functions.
Cartesian3D(Scalar xx, Scalar yy, Scalar zz)
Constructor from x,y,z coordinates.
Class describing a cylindrical coordinate system based on eta (pseudorapidity) instead of z...
Class describing a 3D cartesian coordinate system (x, y, z coordinates)
Cartesian3D & operator=(const Cartesian3D &v)
assignment operator
void SetXYZ(Scalar xx, Scalar yy, Scalar zz)
set all values using cartesian coordinates
VecExpr< UnaryOp< Sqrt< T >, VecExpr< A, T, D >, T >, T, D > sqrt(const VecExpr< A, T, D > &rhs)
void SetR(const T &r)
set the r coordinate value keeping theta and phi constant
void SetY(Scalar yy)
set the y coordinate value keeping x and z constant
Cartesian3D()
Default constructor with x=y=z=0.
void Negate()
negate the vector
void SetCoordinates(Scalar xx, Scalar yy, Scalar zz)
Set internal data based on 3 Scalar numbers.
void SetTheta(const T &theta)
set the theta coordinate value keeping r and phi constant
void SetCoordinates(const Scalar src[])
Set internal data based on an array of 3 Scalar numbers.
void SetZ(Scalar zz)
set the z coordinate value keeping x and y constant
void SetRho(T rho)
set the rho coordinate value keeping eta and phi constant
bool operator!=(const Cartesian3D &rhs) const
Cartesian3D(const Polar3D< T2 > &v)
Scalar Eta_FromRhoZ(Scalar rho, Scalar z)
Calculate eta given rho and zeta.
void SetEta(T eta)
set the eta coordinate value keeping rho and phi constant
Cartesian3D(const CoordSystem &v)
Construct from any Vector or coordinate system implementing X(), Y() and Z()
double atan2(double, double)
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
void GetCoordinates(Scalar dest[]) const
get internal data into an array of 3 Scalar numbers
Namespace for new Math classes and functions.
void SetPhi(const T &phi)
set the phi coordinate value keeping r and theta constant
#define dest(otri, vertexptr)
Cartesian3D(const Cartesian3D &v)
copy constructor
Rotation3D::Scalar Scalar
Class describing a polar coordinate system based on r, theta and phi Phi is restricted to be in the r...
void GetCoordinates(Scalar &xx, Scalar &yy, Scalar &zz) const
get internal data into 3 Scalar numbers