Logo ROOT  
Reference Guide
ROOT::Math::Cartesian3D< T > Class Template Reference

template<class T = double>
class ROOT::Math::Cartesian3D< T >

Class describing a 3D cartesian coordinate system (x, y, z coordinates)

Definition at line 44 of file Cartesian3D.h.

Public Types

typedef T Scalar
 

Public Member Functions

 Cartesian3D ()
 Default constructor with x=y=z=0. More...
 
 Cartesian3D (const Cartesian3D &v)
 copy constructor More...
 
template<class CoordSystem >
 Cartesian3D (const CoordSystem &v)
 Construct from any Vector or coordinate system implementing X(), Y() and Z() More...
 
template<class T2 >
 Cartesian3D (const Polar3D< T2 > &v)
 
 Cartesian3D (Scalar xx, Scalar yy, Scalar zz)
 Constructor from x,y,z coordinates. More...
 
Scalar Eta () const
 
void GetCoordinates (Scalar &xx, Scalar &yy, Scalar &zz) const
 get internal data into 3 Scalar numbers More...
 
void GetCoordinates (Scalar dest[]) const
 get internal data into an array of 3 Scalar numbers More...
 
Scalar Mag2 () const
 
void Negate ()
 negate the vector More...
 
bool operator!= (const Cartesian3D &rhs) const
 
Cartesian3Doperator= (const Cartesian3D &v)
 assignment operator More...
 
template<class CoordSystem >
Cartesian3Doperator= (const CoordSystem &v)
 Assignment from any class implementing x(),y() and z() (can assign from any coordinate system) More...
 
template<class T2 >
Cartesian3Doperator= (const Polar3D< T2 > &v)
 
bool operator== (const Cartesian3D &rhs) const
 Exact equality. More...
 
Scalar Perp2 () const
 
Scalar Phi () const
 
Scalar R () const
 
Scalar Rho () const
 
void Scale (Scalar a)
 scale the vector by a scalar quantity a More...
 
void SetCoordinates (const Scalar src[])
 Set internal data based on an array of 3 Scalar numbers. More...
 
void SetCoordinates (Scalar xx, Scalar yy, Scalar zz)
 Set internal data based on 3 Scalar numbers. More...
 
void SetX (Scalar xx)
 set the x coordinate value keeping y and z constant More...
 
void SetXYZ (Scalar xx, Scalar yy, Scalar zz)
 set all values using cartesian coordinates More...
 
void SetY (Scalar yy)
 set the y coordinate value keeping x and z constant More...
 
void SetZ (Scalar zz)
 set the z coordinate value keeping x and y constant More...
 
Scalar Theta () const
 
Scalar X () const
 
x () const
 
Scalar Y () const
 
y () const
 
Scalar Z () const
 
z () const
 

Private Attributes

fX
 
fY
 
fZ
 

#include <Math/GenVector/Cartesian3D.h>

Member Typedef Documentation

◆ Scalar

template<class T = double>
typedef T ROOT::Math::Cartesian3D< T >::Scalar

Definition at line 48 of file Cartesian3D.h.

Constructor & Destructor Documentation

◆ Cartesian3D() [1/5]

template<class T = double>
ROOT::Math::Cartesian3D< T >::Cartesian3D ( )
inline

Default constructor with x=y=z=0.

Definition at line 53 of file Cartesian3D.h.

◆ Cartesian3D() [2/5]

template<class T = double>
ROOT::Math::Cartesian3D< T >::Cartesian3D ( Scalar  xx,
Scalar  yy,
Scalar  zz 
)
inline

Constructor from x,y,z coordinates.

Definition at line 58 of file Cartesian3D.h.

◆ Cartesian3D() [3/5]

template<class T = double>
template<class CoordSystem >
ROOT::Math::Cartesian3D< T >::Cartesian3D ( const CoordSystem &  v)
inlineexplicit

Construct from any Vector or coordinate system implementing X(), Y() and Z()

Definition at line 65 of file Cartesian3D.h.

◆ Cartesian3D() [4/5]

template<class T = double>
ROOT::Math::Cartesian3D< T >::Cartesian3D ( const Cartesian3D< T > &  v)
inline

copy constructor

Definition at line 73 of file Cartesian3D.h.

◆ Cartesian3D() [5/5]

template<class T = double>
template<class T2 >
ROOT::Math::Cartesian3D< T >::Cartesian3D ( const Polar3D< T2 > &  v)
inlineexplicit

Definition at line 193 of file Cartesian3D.h.

Member Function Documentation

◆ Eta()

template<class T = double>
Scalar ROOT::Math::Cartesian3D< T >::Eta ( ) const
inline

Definition at line 118 of file Cartesian3D.h.

◆ GetCoordinates() [1/2]

template<class T = double>
void ROOT::Math::Cartesian3D< T >::GetCoordinates ( Scalar xx,
Scalar yy,
Scalar zz 
) const
inline

get internal data into 3 Scalar numbers

Definition at line 105 of file Cartesian3D.h.

◆ GetCoordinates() [2/2]

template<class T = double>
void ROOT::Math::Cartesian3D< T >::GetCoordinates ( Scalar  dest[]) const
inline

get internal data into an array of 3 Scalar numbers

Definition at line 94 of file Cartesian3D.h.

◆ Mag2()

template<class T = double>
Scalar ROOT::Math::Cartesian3D< T >::Mag2 ( ) const
inline

Definition at line 110 of file Cartesian3D.h.

◆ Negate()

template<class T = double>
void ROOT::Math::Cartesian3D< T >::Negate ( )
inline

negate the vector

Definition at line 159 of file Cartesian3D.h.

◆ operator!=()

template<class T = double>
bool ROOT::Math::Cartesian3D< T >::operator!= ( const Cartesian3D< T > &  rhs) const
inline

Definition at line 179 of file Cartesian3D.h.

◆ operator=() [1/3]

template<class T = double>
Cartesian3D & ROOT::Math::Cartesian3D< T >::operator= ( const Cartesian3D< T > &  v)
inline

assignment operator

Definition at line 79 of file Cartesian3D.h.

◆ operator=() [2/3]

template<class T = double>
template<class CoordSystem >
Cartesian3D & ROOT::Math::Cartesian3D< T >::operator= ( const CoordSystem &  v)
inline

Assignment from any class implementing x(),y() and z() (can assign from any coordinate system)

Definition at line 166 of file Cartesian3D.h.

◆ operator=() [3/3]

template<class T = double>
template<class T2 >
Cartesian3D & ROOT::Math::Cartesian3D< T >::operator= ( const Polar3D< T2 > &  v)
inline

Definition at line 207 of file Cartesian3D.h.

◆ operator==()

template<class T = double>
bool ROOT::Math::Cartesian3D< T >::operator== ( const Cartesian3D< T > &  rhs) const
inline

Exact equality.

Definition at line 176 of file Cartesian3D.h.

◆ Perp2()

template<class T = double>
Scalar ROOT::Math::Cartesian3D< T >::Perp2 ( ) const
inline

Definition at line 111 of file Cartesian3D.h.

◆ Phi()

template<class T = double>
Scalar ROOT::Math::Cartesian3D< T >::Phi ( ) const
inline

Definition at line 115 of file Cartesian3D.h.

◆ R()

template<class T = double>
Scalar ROOT::Math::Cartesian3D< T >::R ( ) const
inline

Definition at line 113 of file Cartesian3D.h.

◆ Rho()

template<class T = double>
Scalar ROOT::Math::Cartesian3D< T >::Rho ( ) const
inline

Definition at line 112 of file Cartesian3D.h.

◆ Scale()

template<class T = double>
void ROOT::Math::Cartesian3D< T >::Scale ( Scalar  a)
inline

scale the vector by a scalar quantity a

Definition at line 149 of file Cartesian3D.h.

◆ SetCoordinates() [1/2]

template<class T = double>
void ROOT::Math::Cartesian3D< T >::SetCoordinates ( const Scalar  src[])
inline

Set internal data based on an array of 3 Scalar numbers.

Definition at line 89 of file Cartesian3D.h.

◆ SetCoordinates() [2/2]

template<class T = double>
void ROOT::Math::Cartesian3D< T >::SetCoordinates ( Scalar  xx,
Scalar  yy,
Scalar  zz 
)
inline

Set internal data based on 3 Scalar numbers.

Definition at line 100 of file Cartesian3D.h.

◆ SetX()

template<class T = double>
void ROOT::Math::Cartesian3D< T >::SetX ( Scalar  xx)
inline

set the x coordinate value keeping y and z constant

Definition at line 125 of file Cartesian3D.h.

◆ SetXYZ()

template<class T = double>
void ROOT::Math::Cartesian3D< T >::SetXYZ ( Scalar  xx,
Scalar  yy,
Scalar  zz 
)
inline

set all values using cartesian coordinates

Definition at line 140 of file Cartesian3D.h.

◆ SetY()

template<class T = double>
void ROOT::Math::Cartesian3D< T >::SetY ( Scalar  yy)
inline

set the y coordinate value keeping x and z constant

Definition at line 130 of file Cartesian3D.h.

◆ SetZ()

template<class T = double>
void ROOT::Math::Cartesian3D< T >::SetZ ( Scalar  zz)
inline

set the z coordinate value keeping x and y constant

Definition at line 135 of file Cartesian3D.h.

◆ Theta()

template<class T = double>
Scalar ROOT::Math::Cartesian3D< T >::Theta ( ) const
inline

Definition at line 114 of file Cartesian3D.h.

◆ X()

template<class T = double>
Scalar ROOT::Math::Cartesian3D< T >::X ( ) const
inline

Definition at line 107 of file Cartesian3D.h.

◆ x()

template<class T = double>
T ROOT::Math::Cartesian3D< T >::x ( ) const
inline

Definition at line 186 of file Cartesian3D.h.

◆ Y()

template<class T = double>
Scalar ROOT::Math::Cartesian3D< T >::Y ( ) const
inline

Definition at line 108 of file Cartesian3D.h.

◆ y()

template<class T = double>
T ROOT::Math::Cartesian3D< T >::y ( ) const
inline

Definition at line 187 of file Cartesian3D.h.

◆ Z()

template<class T = double>
Scalar ROOT::Math::Cartesian3D< T >::Z ( ) const
inline

Definition at line 109 of file Cartesian3D.h.

◆ z()

template<class T = double>
T ROOT::Math::Cartesian3D< T >::z ( ) const
inline

Definition at line 188 of file Cartesian3D.h.

Member Data Documentation

◆ fX

template<class T = double>
T ROOT::Math::Cartesian3D< T >::fX
private

Definition at line 237 of file Cartesian3D.h.

◆ fY

template<class T = double>
T ROOT::Math::Cartesian3D< T >::fY
private

Definition at line 238 of file Cartesian3D.h.

◆ fZ

template<class T = double>
T ROOT::Math::Cartesian3D< T >::fZ
private

Definition at line 239 of file Cartesian3D.h.

Libraries for ROOT::Math::Cartesian3D< T >:
[legend]

The documentation for this class was generated from the following file: