CLHEP 2.4.7.1
C++ Class Library for High Energy Physics
|
#include <CLHEP/Geometry/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< T > &)=default | |
template<typename U = T, typename = typename std::enable_if<!std::is_same<U,float>::value >::type> | |
BasicVector3D (const BasicVector3D< float > &v) | |
BasicVector3D (BasicVector3D< T > &&)=default | |
virtual | ~BasicVector3D ()=default |
operator T* () | |
operator const T * () const | |
operator CLHEP::Hep3Vector () const | |
BasicVector3D< T > & | operator= (const BasicVector3D< T > &)=default |
BasicVector3D< T > & | operator= (BasicVector3D< T > &&)=default |
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) |
Protected Member Functions | |
BasicVector3D () | |
Protected Attributes | |
T | v_ [3] |
Related Symbols | |
(Note that these are not member symbols.) | |
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 29 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 43 of file BasicVector3D.h.
|
inlineprotected |
Default constructor. It is protected - this class should not be instantiated directly.
Definition at line 37 of file BasicVector3D.h.
References v_.
Referenced by angle(), BasicVector3D(), BasicVector3D(), BasicVector3D(), cross(), dot(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), operator=(), orthogonal(), perp(), perp2(), rotate(), rotateX(), rotateY(), rotateZ(), and unit().
|
inline |
|
default |
Copy constructor.
References BasicVector3D().
|
inline |
Constructor for BasicVector3D<double> from BasicVector3D<float>.
Definition at line 63 of file BasicVector3D.h.
References BasicVector3D(), v_, x(), y(), and z().
|
default |
Move constructor.
References BasicVector3D().
|
virtualdefault |
Destructor.
T HepGeom::BasicVector3D< T >::angle | ( | const BasicVector3D< T > & | v | ) | const |
Returns angle w.r.t. another vector.
References BasicVector3D().
|
inline |
Gets cosine of polar angle.
Definition at line 219 of file BasicVector3D.h.
|
inline |
Vector product.
Definition at line 283 of file BasicVector3D.h.
References BasicVector3D(), x(), y(), and z().
|
inline |
Scalar product.
Definition at line 277 of file BasicVector3D.h.
References BasicVector3D(), x(), y(), and z().
Referenced by HepGeom::BasicVector3D< double >::operator*(), HepGeom::BasicVector3D< double >::operator*(), and perp2().
|
inline |
|
inline |
|
inline |
Gets phi-component in spherical coordinate system
Definition at line 226 of file BasicVector3D.h.
References phi().
|
inline |
Gets r-component in spherical coordinate system
Definition at line 223 of file BasicVector3D.h.
References r().
|
inline |
Gets theta-component in spherical coordinate system
Definition at line 229 of file BasicVector3D.h.
References theta().
|
inline |
Gets magnitude of the vector.
Definition at line 203 of file BasicVector3D.h.
References mag2().
Referenced by cosTheta(), r(), setMag(), setTheta(), and unit().
|
inline |
Gets magnitude squared of the vector.
Definition at line 200 of file BasicVector3D.h.
Referenced by HepGeom::Point3D< double >::distance2(), HepGeom::Point3D< float >::distance2(), mag(), and perp2().
|
inline |
Conversion (cast) to CLHEP::Hep3Vector. This operator is needed only for backward compatibility and in principle should not exit.
Definition at line 92 of file BasicVector3D.h.
|
inline |
Conversion (cast) to ordinary const array.
Definition at line 85 of file BasicVector3D.h.
|
inline |
Conversion (cast) to ordinary array.
Definition at line 81 of file BasicVector3D.h.
|
inline |
|
inline |
|
inline |
Multiplication by scalar.
Definition at line 116 of file BasicVector3D.h.
References BasicVector3D(), and v_.
|
inline |
|
inline |
|
inline |
Division by scalar.
Definition at line 121 of file BasicVector3D.h.
References BasicVector3D(), and v_.
|
default |
Move assignment.
References BasicVector3D().
|
default |
Assignment.
References BasicVector3D().
Referenced by HepGeom::Normal3D< double >::operator=(), HepGeom::Normal3D< double >::operator=(), HepGeom::Normal3D< float >::operator=(), HepGeom::Point3D< double >::operator=(), HepGeom::Point3D< double >::operator=(), HepGeom::Point3D< float >::operator=(), HepGeom::Vector3D< double >::operator=(), HepGeom::Vector3D< double >::operator=(), and HepGeom::Vector3D< float >::operator=().
|
inline |
|
inline |
|
inline |
Returns orthogonal vector.
Definition at line 320 of file BasicVector3D.h.
References BasicVector3D(), x(), y(), and z().
|
inline |
|
inline |
Returns transverse component w.r.t. given axis.
Definition at line 298 of file BasicVector3D.h.
References BasicVector3D(), and perp2().
|
inline |
|
inline |
Returns transverse component w.r.t. given axis squared.
Definition at line 291 of file BasicVector3D.h.
References BasicVector3D(), dot(), and mag2().
|
inline |
Gets azimuth angle.
Definition at line 209 of file BasicVector3D.h.
Referenced by getPhi(), and setTheta().
T HepGeom::BasicVector3D< T >::pseudoRapidity | ( | ) | const |
|
inline |
Gets r-component in spherical coordinate system
Definition at line 206 of file BasicVector3D.h.
References mag().
Referenced by getR().
|
inline |
Gets rho-component in cylindrical coordinate system
Definition at line 183 of file BasicVector3D.h.
References perp().
BasicVector3D< T > & HepGeom::BasicVector3D< T >::rotate | ( | T | a, |
const BasicVector3D< T > & | v ) |
Rotates around the axis specified by another vector.
References BasicVector3D().
BasicVector3D< T > & HepGeom::BasicVector3D< T >::rotateX | ( | T | a | ) |
Rotates around x-axis.
References BasicVector3D().
BasicVector3D< T > & HepGeom::BasicVector3D< T >::rotateY | ( | T | a | ) |
Rotates around y-axis.
References BasicVector3D().
BasicVector3D< T > & HepGeom::BasicVector3D< T >::rotateZ | ( | T | a | ) |
Rotates around z-axis.
References BasicVector3D().
|
inline |
Sets components in cartesian coordinate system.
Definition at line 169 of file BasicVector3D.h.
References v_.
Referenced by setTheta().
void HepGeom::BasicVector3D< T >::setEta | ( | T | a | ) |
Sets pseudo-rapidity, keeping magnitude and phi fixed.
|
inline |
|
inline |
Sets transverse component keeping phi and z constant.
Definition at line 187 of file BasicVector3D.h.
|
inline |
Sets phi-component in spherical coordinate system.
Definition at line 244 of file BasicVector3D.h.
|
inline |
Sets r-component in spherical coordinate system.
Definition at line 241 of file BasicVector3D.h.
References setMag().
|
inline |
Sets theta-component in spherical coordinate system.
Definition at line 247 of file BasicVector3D.h.
|
inline |
Sets x-component in cartesian coordinate system.
Definition at line 159 of file BasicVector3D.h.
References v_.
Referenced by setPhi().
|
inline |
Sets y-component in cartesian coordinate system.
Definition at line 162 of file BasicVector3D.h.
References v_.
Referenced by setPhi().
|
inline |
Sets z-component in cartesian coordinate system.
Definition at line 165 of file BasicVector3D.h.
References v_.
|
inline |
Gets polar angle.
Definition at line 214 of file BasicVector3D.h.
References perp(), x(), y(), and z().
Referenced by getTheta().
|
inline |
Returns unit vector parallel to this.
Definition at line 312 of file BasicVector3D.h.
References BasicVector3D(), mag(), x(), y(), and z().
|
inline |
Gets x-component in cartesian coordinate system.
Definition at line 149 of file BasicVector3D.h.
References v_.
Referenced by BasicVector3D(), cross(), HepGeom::Plane3D< T >::distance(), HepGeom::Point3D< double >::distance2(), HepGeom::Point3D< float >::distance2(), dot(), mag2(), operator CLHEP::Hep3Vector(), HepGeom::Normal3D< double >::operator CLHEP::Hep3Vector(), HepGeom::Point3D< double >::operator CLHEP::Hep3Vector(), HepGeom::Vector3D< double >::operator CLHEP::Hep3Vector(), HepGeom::BasicVector3D< double >::operator!=(), HepGeom::BasicVector3D< double >::operator!=(), HepGeom::BasicVector3D< double >::operator*(), HepGeom::BasicVector3D< double >::operator*(), HepGeom::BasicVector3D< double >::operator*(), HepGeom::BasicVector3D< double >::operator*(), HepGeom::BasicVector3D< double >::operator+(), HepGeom::BasicVector3D< double >::operator+(), HepGeom::BasicVector3D< double >::operator-(), HepGeom::BasicVector3D< double >::operator-(), HepGeom::BasicVector3D< double >::operator-(), HepGeom::BasicVector3D< double >::operator-(), HepGeom::BasicVector3D< double >::operator/(), HepGeom::BasicVector3D< double >::operator/(), HepGeom::BasicVector3D< double >::operator==(), HepGeom::BasicVector3D< double >::operator==(), orthogonal(), perp2(), phi(), HepGeom::Plane3D< T >::Plane3D(), HepGeom::Plane3D< T >::point(), HepGeom::Reflect3D::Reflect3D(), HepGeom::Rotate3D::Rotate3D(), theta(), HepGeom::Plane3D< T >::transform(), and unit().
|
inline |
Gets y-component in cartesian coordinate system.
Definition at line 152 of file BasicVector3D.h.
References v_.
Referenced by BasicVector3D(), cross(), HepGeom::Plane3D< T >::distance(), HepGeom::Point3D< double >::distance2(), HepGeom::Point3D< float >::distance2(), dot(), mag2(), operator CLHEP::Hep3Vector(), HepGeom::Normal3D< double >::operator CLHEP::Hep3Vector(), HepGeom::Point3D< double >::operator CLHEP::Hep3Vector(), HepGeom::Vector3D< double >::operator CLHEP::Hep3Vector(), HepGeom::BasicVector3D< double >::operator!=(), HepGeom::BasicVector3D< double >::operator!=(), HepGeom::BasicVector3D< double >::operator*(), HepGeom::BasicVector3D< double >::operator*(), HepGeom::BasicVector3D< double >::operator*(), HepGeom::BasicVector3D< double >::operator*(), HepGeom::BasicVector3D< double >::operator+(), HepGeom::BasicVector3D< double >::operator+(), HepGeom::BasicVector3D< double >::operator-(), HepGeom::BasicVector3D< double >::operator-(), HepGeom::BasicVector3D< double >::operator-(), HepGeom::BasicVector3D< double >::operator-(), HepGeom::BasicVector3D< double >::operator/(), HepGeom::BasicVector3D< double >::operator/(), HepGeom::BasicVector3D< double >::operator==(), HepGeom::BasicVector3D< double >::operator==(), orthogonal(), perp2(), phi(), HepGeom::Plane3D< T >::Plane3D(), HepGeom::Plane3D< T >::point(), HepGeom::Reflect3D::Reflect3D(), HepGeom::Rotate3D::Rotate3D(), theta(), HepGeom::Plane3D< T >::transform(), and unit().
|
inline |
Gets z-component in cartesian coordinate system.
Definition at line 155 of file BasicVector3D.h.
References v_.
Referenced by BasicVector3D(), cosTheta(), cross(), HepGeom::Plane3D< T >::distance(), HepGeom::Point3D< double >::distance2(), HepGeom::Point3D< float >::distance2(), dot(), mag2(), operator CLHEP::Hep3Vector(), HepGeom::Normal3D< double >::operator CLHEP::Hep3Vector(), HepGeom::Point3D< double >::operator CLHEP::Hep3Vector(), HepGeom::Vector3D< double >::operator CLHEP::Hep3Vector(), HepGeom::BasicVector3D< double >::operator!=(), HepGeom::BasicVector3D< double >::operator!=(), HepGeom::BasicVector3D< double >::operator*(), HepGeom::BasicVector3D< double >::operator*(), HepGeom::BasicVector3D< double >::operator*(), HepGeom::BasicVector3D< double >::operator*(), HepGeom::BasicVector3D< double >::operator+(), HepGeom::BasicVector3D< double >::operator+(), HepGeom::BasicVector3D< double >::operator-(), HepGeom::BasicVector3D< double >::operator-(), HepGeom::BasicVector3D< double >::operator-(), HepGeom::BasicVector3D< double >::operator-(), HepGeom::BasicVector3D< double >::operator/(), HepGeom::BasicVector3D< double >::operator/(), HepGeom::BasicVector3D< double >::operator==(), HepGeom::BasicVector3D< double >::operator==(), orthogonal(), HepGeom::Plane3D< T >::Plane3D(), HepGeom::Plane3D< T >::point(), HepGeom::Reflect3D::Reflect3D(), HepGeom::Rotate3D::Rotate3D(), theta(), HepGeom::Plane3D< T >::transform(), and unit().
|
Comparison of two vectors for inequality.
Definition at line 564 of file BasicVector3D.h.
|
Comparison of two vectors for inequality.
Definition at line 455 of file BasicVector3D.h.
|
Scalar product of two vectors.
Definition at line 527 of file BasicVector3D.h.
|
Multiplication vector by scalar.
Definition at line 518 of file BasicVector3D.h.
|
Scalar product of two vectors.
Definition at line 419 of file BasicVector3D.h.
|
Multiplication vector by scalar.
Definition at line 410 of file BasicVector3D.h.
|
Multiplication scalar by vector.
Definition at line 536 of file BasicVector3D.h.
|
Multiplication scalar by vector.
Definition at line 428 of file BasicVector3D.h.
|
Addition of two vectors.
Definition at line 491 of file BasicVector3D.h.
|
Unary plus.
Definition at line 484 of file BasicVector3D.h.
|
Addition of two vectors.
Definition at line 383 of file BasicVector3D.h.
|
Unary plus.
Definition at line 376 of file BasicVector3D.h.
|
Subtraction of two vectors.
Definition at line 509 of file BasicVector3D.h.
|
Unary minus.
Definition at line 500 of file BasicVector3D.h.
|
Subtraction of two vectors.
Definition at line 401 of file BasicVector3D.h.
|
Unary minus.
Definition at line 392 of file BasicVector3D.h.
|
Division vector by scalar.
Definition at line 545 of file BasicVector3D.h.
|
Division vector by scalar.
Definition at line 437 of file BasicVector3D.h.
|
Output to stream.
|
Output to stream.
|
Comparison of two vectors for equality.
Definition at line 554 of file BasicVector3D.h.
|
Comparison of two vectors for equality.
Definition at line 446 of file BasicVector3D.h.
|
Input from stream.
|
Input from stream.
|
protected |
Definition at line 31 of file BasicVector3D.h.
Referenced by BasicVector3D(), BasicVector3D(), BasicVector3D(), operator()(), operator()(), operator*=(), operator+=(), operator-=(), operator/=(), operator[](), operator[](), set(), setMag(), setPerp(), setX(), setY(), setZ(), x(), y(), and z().