|
Geant4
10.03.p02
|
Public Types | |
| enum | { X = 0, Y = 1, Z = 2, NUM_COORDINATES = 3, SIZE = NUM_COORDINATES } |
Protected Member Functions | |
| BasicVector3D () | |
Protected Attributes | |
| T | v_ [3] |
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.
| anonymous enum |
|
protected |
Default constructor. It is protected - this class should not be instantiated directly.
| BasicVector3D | ( | T | x1, |
| T | y1, | ||
| T | z1 | ||
| ) |
Constructor from three numbers.
| BasicVector3D | ( | const BasicVector3D< float > & | v | ) |
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.
|
virtual |
Destructor.
| operator T * | ( | ) |
Conversion (cast) to ordinary array.
References BasicVector3D< T >::v_.
| operator const T * | ( | ) | const |
Conversion (cast) to ordinary const array.
References BasicVector3D< T >::v_.
| operator CLHEP::Hep3Vector | ( | ) | const |
Conversion (cast) to CLHEP::Hep3Vector. This operator is needed only for backward compatibility and in principle should not exit.
| BasicVector3D<T>& operator= | ( | const BasicVector3D< T > & | v | ) |
Assignment.
| BasicVector3D<T>& operator+= | ( | const BasicVector3D< T > & | v | ) |
Addition.
| BasicVector3D<T>& operator-= | ( | const BasicVector3D< T > & | v | ) |
Subtraction.
| BasicVector3D<T>& operator*= | ( | double | a | ) |
Multiplication by scalar.
| BasicVector3D<T>& operator/= | ( | double | a | ) |
Division by scalar.
| T operator() | ( | int | i | ) | const |
Gets components by index.
| T operator[] | ( | int | i | ) | const |
Gets components by index.
| T& operator() | ( | int | i | ) |
Sets components by index.
| T& operator[] | ( | int | i | ) |
Sets components by index.
| T x | ( | ) | const |
Gets x-component in cartesian coordinate system.
Referenced by BasicVector3D< G4double >::BasicVector3D(), BasicVector3D< G4double >::cross(), Plane3D< G4double >::distance(), Point3D< float >::distance2(), Point3D< double >::distance2(), BasicVector3D< G4double >::dot(), BasicVector3D< G4double >::mag2(), BasicVector3D< G4double >::operator CLHEP::Hep3Vector(), Normal3D< double >::operator CLHEP::Hep3Vector(), Vector3D< double >::operator CLHEP::Hep3Vector(), Point3D< double >::operator CLHEP::Hep3Vector(), BasicVector3D< T >::operator!=(), BasicVector3D< T >::operator*(), BasicVector3D< T >::operator+(), BasicVector3D< T >::operator-(), BasicVector3D< T >::operator/(), Point3D< float >::operator=(), Normal3D< float >::operator=(), Vector3D< float >::operator=(), Normal3D< double >::operator=(), Vector3D< double >::operator=(), Point3D< double >::operator=(), BasicVector3D< T >::operator==(), BasicVector3D< G4double >::orthogonal(), BasicVector3D< G4double >::perp2(), BasicVector3D< G4double >::phi(), Plane3D< G4double >::Plane3D(), Plane3D< G4double >::point(), BasicVector3D< G4double >::theta(), Plane3D< G4double >::transform(), and BasicVector3D< G4double >::unit().
| T y | ( | ) | const |
Gets y-component in cartesian coordinate system.
Referenced by BasicVector3D< G4double >::BasicVector3D(), BasicVector3D< G4double >::cross(), Plane3D< G4double >::distance(), Point3D< float >::distance2(), Point3D< double >::distance2(), BasicVector3D< G4double >::dot(), BasicVector3D< G4double >::mag2(), BasicVector3D< G4double >::operator CLHEP::Hep3Vector(), Normal3D< double >::operator CLHEP::Hep3Vector(), Vector3D< double >::operator CLHEP::Hep3Vector(), Point3D< double >::operator CLHEP::Hep3Vector(), BasicVector3D< T >::operator!=(), BasicVector3D< T >::operator*(), BasicVector3D< T >::operator+(), BasicVector3D< T >::operator-(), BasicVector3D< T >::operator/(), Point3D< float >::operator=(), Normal3D< float >::operator=(), Vector3D< float >::operator=(), Normal3D< double >::operator=(), Vector3D< double >::operator=(), Point3D< double >::operator=(), BasicVector3D< T >::operator==(), BasicVector3D< G4double >::orthogonal(), BasicVector3D< G4double >::perp2(), BasicVector3D< G4double >::phi(), Plane3D< G4double >::Plane3D(), Plane3D< G4double >::point(), BasicVector3D< G4double >::theta(), Plane3D< G4double >::transform(), and BasicVector3D< G4double >::unit().
| T z | ( | ) | const |
Gets z-component in cartesian coordinate system.
Referenced by BasicVector3D< G4double >::BasicVector3D(), BasicVector3D< G4double >::cosTheta(), BasicVector3D< G4double >::cross(), Plane3D< G4double >::distance(), Point3D< float >::distance2(), Point3D< double >::distance2(), BasicVector3D< G4double >::dot(), BasicVector3D< G4double >::mag2(), BasicVector3D< G4double >::operator CLHEP::Hep3Vector(), Normal3D< double >::operator CLHEP::Hep3Vector(), Vector3D< double >::operator CLHEP::Hep3Vector(), Point3D< double >::operator CLHEP::Hep3Vector(), BasicVector3D< T >::operator!=(), BasicVector3D< T >::operator*(), BasicVector3D< T >::operator+(), BasicVector3D< T >::operator-(), BasicVector3D< T >::operator/(), Point3D< float >::operator=(), Normal3D< float >::operator=(), Vector3D< float >::operator=(), Normal3D< double >::operator=(), Vector3D< double >::operator=(), Point3D< double >::operator=(), BasicVector3D< T >::operator==(), BasicVector3D< G4double >::orthogonal(), Plane3D< G4double >::Plane3D(), Plane3D< G4double >::point(), BasicVector3D< G4double >::theta(), Plane3D< G4double >::transform(), and BasicVector3D< G4double >::unit().
| void setX | ( | T | a | ) |
Sets x-component in cartesian coordinate system.
Referenced by BasicVector3D< G4double >::setPhi().
| void setY | ( | T | a | ) |
Sets y-component in cartesian coordinate system.
Referenced by BasicVector3D< G4double >::setPhi().
| void setZ | ( | T | a | ) |
Sets z-component in cartesian coordinate system.
| void set | ( | T | x1, |
| T | y1, | ||
| T | z1 | ||
| ) |
Sets components in cartesian coordinate system.
Referenced by Normal3D< float >::operator=(), Point3D< float >::operator=(), Vector3D< float >::operator=(), Vector3D< double >::operator=(), Normal3D< double >::operator=(), Point3D< double >::operator=(), and BasicVector3D< G4double >::setTheta().
| T perp2 | ( | ) | const |
Gets transverse component squared.
Referenced by BasicVector3D< G4double >::perp().
| T perp | ( | ) | const |
Gets transverse component.
Referenced by BasicVector3D< G4double >::rho(), BasicVector3D< G4double >::setPerp(), BasicVector3D< G4double >::setPhi(), and BasicVector3D< G4double >::theta().
| T rho | ( | ) | const |
Gets rho-component in cylindrical coordinate system
| void setPerp | ( | T | rh | ) |
Sets transverse component keeping phi and z constant.
| T mag2 | ( | ) | const |
Gets magnitude squared of the vector.
Referenced by Point3D< float >::distance2(), Point3D< double >::distance2(), BasicVector3D< G4double >::mag(), and BasicVector3D< G4double >::perp2().
| T mag | ( | ) | const |
Gets magnitude of the vector.
Referenced by BasicVector3D< G4double >::cosTheta(), BasicVector3D< G4double >::r(), BasicVector3D< G4double >::setMag(), BasicVector3D< G4double >::setTheta(), and BasicVector3D< G4double >::unit().
| T r | ( | ) | const |
Gets r-component in spherical coordinate system
Referenced by BasicVector3D< G4double >::getR().
| T phi | ( | ) | const |
Gets azimuth angle.
Referenced by BasicVector3D< G4double >::getPhi(), and BasicVector3D< G4double >::setTheta().
| T theta | ( | ) | const |
Gets polar angle.
Referenced by BasicVector3D< G4double >::getTheta().
| T cosTheta | ( | ) | const |
Gets cosine of polar angle.
| T getR | ( | ) | const |
Gets r-component in spherical coordinate system
| T getPhi | ( | ) | const |
Gets phi-component in spherical coordinate system
| T getTheta | ( | ) | const |
Gets theta-component in spherical coordinate system
| void setMag | ( | T | ma | ) |
Sets magnitude.
Referenced by BasicVector3D< G4double >::setR().
| void setR | ( | T | ma | ) |
Sets r-component in spherical coordinate system.
| void setPhi | ( | T | ph | ) |
Sets phi-component in spherical coordinate system.
| void setTheta | ( | T | th | ) |
Sets theta-component in spherical coordinate system.
| T pseudoRapidity | ( | ) | const |
Gets pseudo-rapidity: -ln(tan(theta/2))
Referenced by BasicVector3D< G4double >::eta(), and BasicVector3D< G4double >::getEta().
| T eta | ( | ) | const |
Gets pseudo-rapidity.
| T getEta | ( | ) | const |
Gets pseudo-rapidity.
| void setEta | ( | T | a | ) |
Sets pseudo-rapidity, keeping magnitude and phi fixed.
| T dot | ( | const BasicVector3D< T > & | v | ) | const |
Scalar product.
Referenced by BasicVector3D< T >::operator*(), and BasicVector3D< G4double >::perp2().
| BasicVector3D<T> cross | ( | const BasicVector3D< T > & | v | ) | const |
Vector product.
Referenced by G4ErrorSurfaceTrajParam::GetPlaneNormal().
| T perp2 | ( | const BasicVector3D< T > & | v | ) | const |
Returns transverse component w.r.t. given axis squared.
| T perp | ( | const BasicVector3D< T > & | v | ) | const |
Returns transverse component w.r.t. given axis.
| T angle | ( | const BasicVector3D< T > & | v | ) | const |
Returns angle w.r.t. another vector.
| BasicVector3D<T> unit | ( | ) | const |
Returns unit vector parallel to this.
| BasicVector3D<T> orthogonal | ( | ) | const |
Returns orthogonal vector.
| BasicVector3D<T>& rotateX | ( | T | a | ) |
Rotates around x-axis.
| BasicVector3D<T>& rotateY | ( | T | a | ) |
Rotates around y-axis.
| BasicVector3D<T>& rotateZ | ( | T | a | ) |
Rotates around z-axis.
| BasicVector3D<T>& rotate | ( | T | a, |
| const BasicVector3D< T > & | v | ||
| ) |
Rotates around the axis specified by another vector.
|
related |
Output to stream.
|
related |
Input from stream.
|
related |
Unary plus.
|
related |
Addition of two vectors.
References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
|
related |
Unary minus.
References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
|
related |
Subtraction of two vectors.
References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
|
related |
Multiplication vector by scalar.
References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
|
related |
Scalar product of two vectors.
References BasicVector3D< T >::dot().
|
related |
Multiplication scalar by vector.
References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
|
related |
Division vector by scalar.
References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
|
related |
Comparison of two vectors for equality.
References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
|
related |
Comparison of two vectors for inequality.
References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
|
related |
Output to stream.
|
related |
Input from stream.
|
related |
Unary plus.
|
related |
Addition of two vectors.
References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
|
related |
Unary minus.
References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
|
related |
Subtraction of two vectors.
References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
|
related |
Multiplication vector by scalar.
References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
|
related |
Scalar product of two vectors.
References BasicVector3D< T >::dot().
|
related |
Multiplication scalar by vector.
References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
|
related |
Division vector by scalar.
References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
|
related |
Comparison of two vectors for equality.
References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
|
related |
Comparison of two vectors for inequality.
References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().
|
protected |
Referenced by BasicVector3D< G4double >::BasicVector3D(), BasicVector3D< T >::operator const T *(), BasicVector3D< T >::operator T *(), BasicVector3D< G4double >::operator()(), BasicVector3D< G4double >::operator*=(), BasicVector3D< G4double >::operator+=(), BasicVector3D< G4double >::operator-=(), BasicVector3D< G4double >::operator/=(), BasicVector3D< G4double >::operator=(), BasicVector3D< G4double >::operator[](), BasicVector3D< G4double >::set(), BasicVector3D< G4double >::setMag(), BasicVector3D< G4double >::setPerp(), BasicVector3D< G4double >::setX(), BasicVector3D< G4double >::setY(), BasicVector3D< G4double >::setZ(), BasicVector3D< G4double >::x(), BasicVector3D< G4double >::y(), and BasicVector3D< G4double >::z().