19#ifndef ROOT_Math_GenVector_Cartesian3D
20#define ROOT_Math_GenVector_Cartesian3D 1
43template <
class T =
double>
64 template <
class CoordSystem>
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);
248#if defined(__MAKECINT__) || defined(G__DICTIONARY)
263void Cartesian3D<T>::SetR(
Scalar r) {
264 GenVector_exception
e(
"Cartesian3D::SetR() is not supposed to be called");
266 Polar3D<Scalar>
v(*
this);
v.SetR(
r); *
this = Cartesian3D<Scalar>(
v);
270void Cartesian3D<T>::SetTheta(
Scalar theta) {
271 GenVector_exception
e(
"Cartesian3D::SetTheta() is not supposed to be called");
273 Polar3D<Scalar>
v(*
this);
v.SetTheta(theta); *
this = Cartesian3D<Scalar>(
v);
277void Cartesian3D<T>::SetPhi(
Scalar phi) {
278 GenVector_exception
e(
"Cartesian3D::SetPhi() is not supposed to be called");
280 Polar3D<Scalar>
v(*
this);
v.SetPhi(phi); *
this = Cartesian3D<Scalar>(
v);
284void Cartesian3D<T>::SetRho(
Scalar rho) {
285 GenVector_exception
e(
"Cartesian3D::SetRho() is not supposed to be called");
287 CylindricalEta3D<Scalar>
v(*
this);
v.SetRho(rho);
288 *
this = Cartesian3D<Scalar>(
v);
292void Cartesian3D<T>::SetEta(
Scalar eta) {
293 GenVector_exception
e(
"Cartesian3D::SetEta() is not supposed to be called");
295 CylindricalEta3D<Scalar>
v(*
this);
v.SetEta(eta);
296 *
this = Cartesian3D<Scalar>(
v);
double atan2(double, double)
Class describing a 3D cartesian coordinate system (x, y, z coordinates)
void SetXYZ(Scalar xx, Scalar yy, Scalar zz)
set all values using cartesian coordinates
bool operator!=(const Cartesian3D &rhs) const
bool operator==(const Cartesian3D &rhs) const
Exact equality.
void SetCoordinates(const Scalar src[])
Set internal data based on an array of 3 Scalar numbers.
Cartesian3D(const Cartesian3D &v)
copy constructor
void GetCoordinates(Scalar dest[]) const
get internal data into an array of 3 Scalar numbers
Cartesian3D & operator=(const Cartesian3D &v)
assignment operator
Cartesian3D(const Polar3D< T2 > &v)
void Scale(Scalar a)
scale the vector by a scalar quantity a
Cartesian3D()
Default constructor with x=y=z=0.
void SetCoordinates(Scalar xx, Scalar yy, Scalar zz)
Set internal data based on 3 Scalar numbers.
Cartesian3D(const CoordSystem &v)
Construct from any Vector or coordinate system implementing X(), Y() and Z()
Cartesian3D(Scalar xx, Scalar yy, Scalar zz)
Constructor from x,y,z coordinates.
void SetZ(Scalar zz)
set the z coordinate value keeping x and y constant
void GetCoordinates(Scalar &xx, Scalar &yy, Scalar &zz) const
get internal data into 3 Scalar numbers
void SetX(Scalar xx)
set the x coordinate value keeping y and z constant
void SetY(Scalar yy)
set the y coordinate value keeping x and z constant
void Negate()
negate the vector
Class describing a polar coordinate system based on r, theta and phi Phi is restricted to be in the r...
Namespace for new Math classes and functions.
Scalar Eta_FromRhoZ(Scalar rho, Scalar z)
Calculate eta given rho and zeta.
VecExpr< UnaryOp< Sqrt< T >, VecExpr< A, T, D >, T >, T, D > sqrt(const VecExpr< A, T, D > &rhs)
Rotation3D::Scalar Scalar
#define dest(otri, vertexptr)