Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::ROOT_MATH_ARCH::Cartesian3D< T > Class Template Reference

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

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

See also
Physics Vectors

Definition at line 52 of file Cartesian3D.h.

Public Types

typedefScalar
 

Public Member Functions

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

Private Attributes

fX = 0
 
fY = 0
 
fZ = 0
 

#include <MathX/GenVectorX/Cartesian3D.h>

Member Typedef Documentation

◆ Scalar

Definition at line 55 of file Cartesian3D.h.

Constructor & Destructor Documentation

◆ Cartesian3D() [1/4]

template<class T = double>
constexpr ROOT::ROOT_MATH_ARCH::Cartesian3D< T >::Cartesian3D ( )
constexprdefaultnoexcept

Default constructor with x=y=z=0.

◆ Cartesian3D() [2/4]

template<class T = double>
constexpr ROOT::ROOT_MATH_ARCH::Cartesian3D< T >::Cartesian3D ( Scalar xx,
Scalar yy,
Scalar zz )
inlineconstexprnoexcept

Constructor from x,y,z coordinates.

Definition at line 65 of file Cartesian3D.h.

◆ Cartesian3D() [3/4]

template<class T = double>
template<class CoordSystem >
constexpr ROOT::ROOT_MATH_ARCH::Cartesian3D< T >::Cartesian3D ( const CoordSystem & v)
inlineexplicitconstexpr

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

Definition at line 72 of file Cartesian3D.h.

◆ Cartesian3D() [4/4]

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

Definition at line 204 of file Cartesian3D.h.

Member Function Documentation

◆ Eta()

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

Definition at line 127 of file Cartesian3D.h.

◆ GetCoordinates() [1/2]

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

get internal data into 3 Scalar numbers

Definition at line 109 of file Cartesian3D.h.

◆ GetCoordinates() [2/2]

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

get internal data into an array of 3 Scalar numbers

Definition at line 89 of file Cartesian3D.h.

◆ Mag2()

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

Definition at line 119 of file Cartesian3D.h.

◆ Negate()

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

negate the vector

Definition at line 167 of file Cartesian3D.h.

◆ operator!=()

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

Definition at line 191 of file Cartesian3D.h.

◆ operator=() [1/2]

template<class T = double>
template<class CoordSystem >
Cartesian3D & ROOT::ROOT_MATH_ARCH::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 179 of file Cartesian3D.h.

◆ operator=() [2/2]

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

Definition at line 218 of file Cartesian3D.h.

◆ operator==()

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

Exact equality.

Definition at line 190 of file Cartesian3D.h.

◆ Perp2()

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

Definition at line 120 of file Cartesian3D.h.

◆ Phi()

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

Definition at line 124 of file Cartesian3D.h.

◆ R()

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

Definition at line 122 of file Cartesian3D.h.

◆ Rho()

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

Definition at line 121 of file Cartesian3D.h.

◆ Scale()

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

scale the vector by a scalar quantity a

Definition at line 157 of file Cartesian3D.h.

◆ SetCoordinates() [1/2]

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

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

Definition at line 79 of file Cartesian3D.h.

◆ SetCoordinates() [2/2]

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

Set internal data based on 3 Scalar numbers.

Definition at line 99 of file Cartesian3D.h.

◆ SetX()

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

set the x coordinate value keeping y and z constant

Definition at line 132 of file Cartesian3D.h.

◆ SetXYZ()

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

set all values using cartesian coordinates

Definition at line 147 of file Cartesian3D.h.

◆ SetY()

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

set the y coordinate value keeping x and z constant

Definition at line 137 of file Cartesian3D.h.

◆ SetZ()

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

set the z coordinate value keeping x and y constant

Definition at line 142 of file Cartesian3D.h.

◆ Theta()

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

Definition at line 123 of file Cartesian3D.h.

◆ X()

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

Definition at line 116 of file Cartesian3D.h.

◆ x()

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

Definition at line 197 of file Cartesian3D.h.

◆ Y()

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

Definition at line 117 of file Cartesian3D.h.

◆ y()

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

Definition at line 198 of file Cartesian3D.h.

◆ Z()

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

Definition at line 118 of file Cartesian3D.h.

◆ z()

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

Definition at line 199 of file Cartesian3D.h.

Member Data Documentation

◆ fX

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

Definition at line 244 of file Cartesian3D.h.

◆ fY

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

Definition at line 245 of file Cartesian3D.h.

◆ fZ

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

Definition at line 246 of file Cartesian3D.h.

  • math/experimental/genvectorx/inc/MathX/GenVectorX/Cartesian3D.h