19 #ifndef ROOT_Math_GenVector_Cartesian3D
20 #define ROOT_Math_GenVector_Cartesian3D 1
22 #ifndef ROOT_Math_GenVector_Polar3Dfwd
26 #ifndef ROOT_Math_Math
33 #ifndef ROOT_Math_GenVector_eta
50 template <
class T =
double>
71 template <
class CoordSystem>
103 { dest[0] =
fX; dest[1] =
fY; dest[2] =
fZ; }
169 template <
class CoordSystem>
190 T x()
const {
return X();}
191 T y()
const {
return Y();}
192 T z()
const {
return Z(); }
221 #if defined(__MAKECINT__) || defined(G__DICTIONARY)
227 void SetTheta(
Scalar theta);
251 #if defined(__MAKECINT__) || defined(G__DICTIONARY)
255 #ifndef ROOT_Math_GenVector_GenVector_exception
258 #ifndef ROOT_Math_GenVector_CylindricalEta3D
261 #ifndef ROOT_Math_GenVector_Polar3D
272 void Cartesian3D<T>::SetR(
Scalar r) {
273 GenVector_exception e(
"Cartesian3D::SetR() is not supposed to be called");
275 Polar3D<Scalar>
v(*
this); v.SetR(r); *
this = Cartesian3D<Scalar>(
v);
279 void Cartesian3D<T>::SetTheta(
Scalar theta) {
280 GenVector_exception e(
"Cartesian3D::SetTheta() is not supposed to be called");
282 Polar3D<Scalar>
v(*
this);
v.SetTheta(theta); *
this = Cartesian3D<Scalar>(
v);
286 void Cartesian3D<T>::SetPhi(
Scalar phi) {
287 GenVector_exception e(
"Cartesian3D::SetPhi() is not supposed to be called");
289 Polar3D<Scalar>
v(*
this);
v.SetPhi(phi); *
this = Cartesian3D<Scalar>(
v);
293 void Cartesian3D<T>::SetRho(
Scalar rho) {
294 GenVector_exception e(
"Cartesian3D::SetRho() is not supposed to be called");
296 CylindricalEta3D<Scalar>
v(*
this);
v.SetRho(rho);
297 *
this = Cartesian3D<Scalar>(
v);
301 void Cartesian3D<T>::SetEta(
Scalar eta) {
302 GenVector_exception e(
"Cartesian3D::SetEta() is not supposed to be called");
304 CylindricalEta3D<Scalar>
v(*
this);
v.SetEta(eta);
305 *
this = Cartesian3D<Scalar>(
v);
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
Cartesian3D(Scalar xx, Scalar yy, Scalar zz)
Constructor from x,y,z coordinates.
Class describing a 3D cartesian coordinate system (x, y, z coordinates)
void GetCoordinates(Scalar dest[]) const
get internal data into an array of 3 Scalar numbers
Cartesian3D & operator=(const Cartesian3D &v)
assignment operator
void SetXYZ(Scalar xx, Scalar yy, Scalar zz)
set all values using cartesian coordinates
void SetY(Scalar yy)
set the y coordinate value keeping x and z constant
void GetCoordinates(Scalar &xx, Scalar &yy, Scalar &zz) const
get internal data into 3 Scalar numbers
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 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
bool operator==(const Cartesian3D &rhs) const
Exact equality.
Cartesian3D(const Polar3D< T2 > &v)
Scalar Eta_FromRhoZ(Scalar rho, Scalar z)
Calculate eta given rho and zeta.
bool operator!=(const Cartesian3D &rhs) const
Cartesian3D(const CoordSystem &v)
Construct from any Vector or coordinate system implementing X(), Y() and Z()
double atan2(double, double)
#define dest(otri, vertexptr)
Cartesian3D(const Cartesian3D &v)
copy constructor
std::complex< float_v > Z
Class describing a polar coordinate system based on r, theta and phi Phi is restricted to be in the r...