Geant4
10.03.p02
|
#include <BasicVector3D.h>
Public Types | |
enum | { X = 0, Y = 1, Z = 2, NUM_COORDINATES = 3, SIZE = NUM_COORDINATES } |
Public Member Functions | |
BasicVector3D (T x1, T y1, T z1) | |
BasicVector3D (const BasicVector3D< float > &v) | |
virtual | ~BasicVector3D () |
operator T * () | |
operator const T * () const | |
operator CLHEP::Hep3Vector () const | |
BasicVector3D< T > & | operator= (const BasicVector3D< T > &v) |
BasicVector3D< T > & | operator+= (const BasicVector3D< T > &v) |
BasicVector3D< T > & | operator-= (const BasicVector3D< T > &v) |
BasicVector3D< T > & | operator*= (double a) |
BasicVector3D< T > & | operator/= (double a) |
T | operator() (int i) const |
T | operator[] (int i) const |
T & | operator() (int i) |
T & | operator[] (int i) |
T | x () const |
T | y () const |
T | z () const |
void | setX (T a) |
void | setY (T a) |
void | setZ (T a) |
void | set (T x1, T y1, T z1) |
T | perp2 () const |
T | perp () const |
T | rho () const |
void | setPerp (T rh) |
T | mag2 () const |
T | mag () const |
T | r () const |
T | phi () const |
T | theta () const |
T | cosTheta () const |
T | getR () const |
T | getPhi () const |
T | getTheta () const |
void | setMag (T ma) |
void | setR (T ma) |
void | setPhi (T ph) |
void | setTheta (T th) |
T | pseudoRapidity () const |
T | eta () const |
T | getEta () const |
void | setEta (T a) |
T | dot (const BasicVector3D< T > &v) const |
BasicVector3D< T > | cross (const BasicVector3D< T > &v) const |
T | perp2 (const BasicVector3D< T > &v) const |
T | perp (const BasicVector3D< T > &v) const |
T | angle (const BasicVector3D< T > &v) const |
BasicVector3D< T > | unit () const |
BasicVector3D< T > | orthogonal () const |
BasicVector3D< T > & | rotateX (T a) |
BasicVector3D< T > & | rotateY (T a) |
BasicVector3D< T > & | rotateZ (T a) |
BasicVector3D< T > & | rotate (T a, const BasicVector3D< T > &v) |
template<> | |
float | pseudoRapidity () const |
template<> | |
void | setEta (float a) |
template<> | |
float | angle (const BasicVector3D< float > &v) const |
template<> | |
BasicVector3D< float > & | rotateX (float a) |
template<> | |
BasicVector3D< float > & | rotateY (float a) |
template<> | |
BasicVector3D< float > & | rotateZ (float a) |
template<> | |
BasicVector3D< float > & | rotate (float a, const BasicVector3D< float > &v) |
template<> | |
double | pseudoRapidity () const |
template<> | |
void | setEta (double a) |
template<> | |
double | angle (const BasicVector3D< double > &v) const |
template<> | |
BasicVector3D< double > & | rotateX (double a) |
template<> | |
BasicVector3D< double > & | rotateY (double a) |
template<> | |
BasicVector3D< double > & | rotateZ (double a) |
template<> | |
BasicVector3D< double > & | rotate (double a, const BasicVector3D< double > &v) |
Protected Member Functions | |
BasicVector3D () | |
Protected Attributes | |
T | v_ [3] |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &, const BasicVector3D< float > &) |
std::istream & | operator>> (std::istream &, BasicVector3D< float > &) |
BasicVector3D< float > | operator+ (const BasicVector3D< float > &v) |
BasicVector3D< float > | operator+ (const BasicVector3D< float > &a, const BasicVector3D< float > &b) |
BasicVector3D< float > | operator- (const BasicVector3D< float > &v) |
BasicVector3D< float > | operator- (const BasicVector3D< float > &a, const BasicVector3D< float > &b) |
BasicVector3D< float > | operator* (const BasicVector3D< float > &v, double a) |
float | operator* (const BasicVector3D< float > &a, const BasicVector3D< float > &b) |
BasicVector3D< float > | operator* (double a, const BasicVector3D< float > &v) |
BasicVector3D< float > | operator/ (const BasicVector3D< float > &v, double a) |
bool | operator== (const BasicVector3D< float > &a, const BasicVector3D< float > &b) |
bool | operator!= (const BasicVector3D< float > &a, const BasicVector3D< float > &b) |
std::ostream & | operator<< (std::ostream &, const BasicVector3D< double > &) |
std::istream & | operator>> (std::istream &, BasicVector3D< double > &) |
BasicVector3D< double > | operator+ (const BasicVector3D< double > &v) |
BasicVector3D< double > | operator+ (const BasicVector3D< double > &a, const BasicVector3D< double > &b) |
BasicVector3D< double > | operator- (const BasicVector3D< double > &v) |
BasicVector3D< double > | operator- (const BasicVector3D< double > &a, const BasicVector3D< double > &b) |
BasicVector3D< double > | operator* (const BasicVector3D< double > &v, double a) |
double | operator* (const BasicVector3D< double > &a, const BasicVector3D< double > &b) |
BasicVector3D< double > | operator* (double a, const BasicVector3D< double > &v) |
BasicVector3D< double > | operator/ (const BasicVector3D< double > &v, double a) |
bool | operator== (const BasicVector3D< double > &a, const BasicVector3D< double > &b) |
bool | operator!= (const BasicVector3D< double > &a, const BasicVector3D< double > &b) |
Base class for Point3D<T>, Vector3D<T> and Normal3D<T>. It defines only common functionality for those classes and should not be used as separate class.
Definition at line 27 of file BasicVector3D.h.
anonymous enum |
Safe indexing of the coordinates when using with matrices, arrays, etc.
Enumerator | |
---|---|
X |
index for x-component |
Y |
index for y-component |
Z |
index for z-component |
NUM_COORDINATES |
number of components |
SIZE |
number of components |
Definition at line 41 of file BasicVector3D.h.
|
inlineprotected |
Default constructor. It is protected - this class should not be instantiated directly.
Definition at line 35 of file BasicVector3D.h.
|
inline |
|
inline |
Copy constructor. Note: BasicVector3D<double> has constructors from BasicVector3D<double> (provided by compiler) and from BasicVector3D<float> (defined in this file); BasicVector3D<float> has only the last one.
Definition at line 60 of file BasicVector3D.h.
|
inlinevirtual |
float HepGeom::BasicVector3D< float >::angle | ( | const BasicVector3D< float > & | v | ) | const |
double HepGeom::BasicVector3D< double >::angle | ( | const BasicVector3D< double > & | v | ) | const |
T HepGeom::BasicVector3D< T >::angle | ( | const BasicVector3D< T > & | v | ) | const |
Returns angle w.r.t. another vector.
|
inline |
|
inline |
Vector product.
Definition at line 275 of file BasicVector3D.h.
|
inline |
Scalar product.
Definition at line 269 of file BasicVector3D.h.
|
inline |
Gets pseudo-rapidity.
Definition at line 254 of file BasicVector3D.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Gets magnitude of the vector.
Definition at line 195 of file BasicVector3D.h.
|
inline |
Gets magnitude squared of the vector.
Definition at line 192 of file BasicVector3D.h.
|
inline |
Conversion (cast) to CLHEP::Hep3Vector. This operator is needed only for backward compatibility and in principle should not exit.
Definition at line 85 of file BasicVector3D.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Gets transverse component.
Definition at line 172 of file BasicVector3D.h.
|
inline |
|
inline |
Gets transverse component squared.
Definition at line 169 of file BasicVector3D.h.
|
inline |
Returns transverse component w.r.t. given axis squared.
Definition at line 283 of file BasicVector3D.h.
|
inline |
Gets azimuth angle.
Definition at line 201 of file BasicVector3D.h.
float HepGeom::BasicVector3D< float >::pseudoRapidity | ( | ) | const |
Definition at line 13 of file BasicVector3D.cc.
double HepGeom::BasicVector3D< double >::pseudoRapidity | ( | ) | const |
Definition at line 169 of file BasicVector3D.cc.
T HepGeom::BasicVector3D< T >::pseudoRapidity | ( | ) | const |
Gets pseudo-rapidity: -ln(tan(theta/2))
|
inline |
Gets r-component in spherical coordinate system
Definition at line 198 of file BasicVector3D.h.
|
inline |
Gets rho-component in cylindrical coordinate system
Definition at line 175 of file BasicVector3D.h.
BasicVector3D< float > & HepGeom::BasicVector3D< float >::rotate | ( | float | a, |
const BasicVector3D< float > & | v | ||
) |
BasicVector3D< double > & HepGeom::BasicVector3D< double >::rotate | ( | double | a, |
const BasicVector3D< double > & | v | ||
) |
BasicVector3D<T>& HepGeom::BasicVector3D< T >::rotate | ( | T | a, |
const BasicVector3D< T > & | v | ||
) |
Rotates around the axis specified by another vector.
BasicVector3D< float > & HepGeom::BasicVector3D< float >::rotateX | ( | float | a | ) |
Definition at line 49 of file BasicVector3D.cc.
BasicVector3D< double > & HepGeom::BasicVector3D< double >::rotateX | ( | double | a | ) |
Definition at line 205 of file BasicVector3D.cc.
BasicVector3D<T>& HepGeom::BasicVector3D< T >::rotateX | ( | T | a | ) |
Rotates around x-axis.
BasicVector3D< float > & HepGeom::BasicVector3D< float >::rotateY | ( | float | a | ) |
Definition at line 58 of file BasicVector3D.cc.
BasicVector3D< double > & HepGeom::BasicVector3D< double >::rotateY | ( | double | a | ) |
Definition at line 214 of file BasicVector3D.cc.
BasicVector3D<T>& HepGeom::BasicVector3D< T >::rotateY | ( | T | a | ) |
Rotates around y-axis.
BasicVector3D< float > & HepGeom::BasicVector3D< float >::rotateZ | ( | float | a | ) |
Definition at line 67 of file BasicVector3D.cc.
BasicVector3D< double > & HepGeom::BasicVector3D< double >::rotateZ | ( | double | a | ) |
Definition at line 223 of file BasicVector3D.cc.
BasicVector3D<T>& HepGeom::BasicVector3D< T >::rotateZ | ( | T | a | ) |
Rotates around z-axis.
|
inline |
Sets components in cartesian coordinate system.
Definition at line 161 of file BasicVector3D.h.
void HepGeom::BasicVector3D< float >::setEta | ( | float | a | ) |
Definition at line 23 of file BasicVector3D.cc.
void HepGeom::BasicVector3D< double >::setEta | ( | double | a | ) |
Definition at line 179 of file BasicVector3D.cc.
void HepGeom::BasicVector3D< T >::setEta | ( | T | a | ) |
Sets pseudo-rapidity, keeping magnitude and phi fixed.
|
inline |
Sets magnitude.
Definition at line 225 of file BasicVector3D.h.
|
inline |
Sets transverse component keeping phi and z constant.
Definition at line 179 of file BasicVector3D.h.
|
inline |
|
inline |
|
inline |
Sets theta-component in spherical coordinate system.
Definition at line 239 of file BasicVector3D.h.
|
inline |
Sets x-component in cartesian coordinate system.
Definition at line 151 of file BasicVector3D.h.
|
inline |
Sets y-component in cartesian coordinate system.
Definition at line 154 of file BasicVector3D.h.
|
inline |
Sets z-component in cartesian coordinate system.
Definition at line 157 of file BasicVector3D.h.
|
inline |
Gets polar angle.
Definition at line 206 of file BasicVector3D.h.
|
inline |
Returns unit vector parallel to this.
Definition at line 304 of file BasicVector3D.h.
|
inline |
|
inline |
|
inline |
|
related |
Comparison of two vectors for inequality.
Definition at line 447 of file BasicVector3D.h.
|
related |
Comparison of two vectors for inequality.
Definition at line 556 of file BasicVector3D.h.
|
related |
|
related |
Scalar product of two vectors.
Definition at line 411 of file BasicVector3D.h.
|
related |
|
related |
Multiplication vector by scalar.
Definition at line 510 of file BasicVector3D.h.
|
related |
Scalar product of two vectors.
Definition at line 519 of file BasicVector3D.h.
|
related |
Multiplication scalar by vector.
Definition at line 528 of file BasicVector3D.h.
|
related |
|
related |
Addition of two vectors.
Definition at line 375 of file BasicVector3D.h.
|
related |
|
related |
Addition of two vectors.
Definition at line 483 of file BasicVector3D.h.
|
related |
Unary minus.
Definition at line 384 of file BasicVector3D.h.
|
related |
Subtraction of two vectors.
Definition at line 393 of file BasicVector3D.h.
|
related |
Unary minus.
Definition at line 492 of file BasicVector3D.h.
|
related |
Subtraction of two vectors.
Definition at line 501 of file BasicVector3D.h.
|
related |
|
related |
Division vector by scalar.
Definition at line 537 of file BasicVector3D.h.
|
related |
|
related |
|
related |
Comparison of two vectors for equality.
Definition at line 438 of file BasicVector3D.h.
|
related |
Comparison of two vectors for equality.
Definition at line 546 of file BasicVector3D.h.
|
related |
|
related |
|
protected |
Definition at line 29 of file BasicVector3D.h.