|
ThePEG
1.8.0
|
A 3-component vector. More...
#include <ThreeVector.h>
Public Member Functions | |
| Value2 | mag2 () const |
Squared magnitude . | |
| Value | mag () const |
Magnitude . | |
| Value2 | perp2 () const |
Squared transverse component . | |
| Value | perp () const |
Transverse component . | |
| template<typename U > | |
| BinaryOpTraits< Value, U >::MulT | dot (const ThreeVector< U > &a) const |
| Dot product. | |
| template<typename U > | |
| Value2 | perp2 (const ThreeVector< U > &p) const |
| Squared transverse component with respect to the given axis. | |
| template<typename U > | |
| Value | perp (const ThreeVector< U > &p) const |
| Transverse component with respect to the given axis. | |
| ThreeVector< double > | unit () const |
| Parallel vector with unit length. | |
| ThreeVector< Value > | orthogonal () const |
| Orthogonal vector. | |
| template<typename U > | |
| double | deltaPhi (const ThreeVector< U > &v2) const |
Azimuthal angle difference, brought into the range . | |
| template<typename U > | |
| ThreeVector< Value > & | rotate (double angle, const ThreeVector< U > &axis) |
| Apply a rotation. More... | |
| ThreeVector< Value > & | rotateUz (const Axis &axis) |
| Rotate the reference frame to a new z-axis. | |
| template<typename U > | |
| ThreeVector< typename BinaryOpTraits< Value, U >::MulT > | cross (const ThreeVector< U > &a) const |
| Vector cross-product. | |
| template<typename U > | |
| double | cosTheta (const ThreeVector< U > &q) const |
| Cosine of the azimuthal angle between two vectors. | |
| template<typename U > | |
| double | angle (const ThreeVector< U > &v) const |
| Angle between two vectors. | |
Constructors. | |
| ThreeVector () | |
| ThreeVector (Value x, Value y, Value z) | |
| template<typename ValueB > | |
| ThreeVector (const ThreeVector< ValueB > &v) | |
Component access methods. | |
| Value | x () const |
| Value | y () const |
| Value | z () const |
Component set methods. | |
| void | setX (Value x) |
| void | setY (Value y) |
| void | setZ (Value z) |
Spherical coordinates. | |
| double | theta () const |
| Polar angle. | |
| double | phi () const |
| Azimuthal angle. | |
| void | setTheta (double th) |
| Set the polar angle. | |
| void | setPhi (double ph) |
| Set the azimuthal angle. | |
Mathematical assignment operators. | |
| ThreeVector< Value > & | operator+= (const ThreeVector< Value > &a) |
| ThreeVector< Value > & | operator-= (const ThreeVector< Value > &a) |
| ThreeVector< Value > & | operator*= (double a) |
| ThreeVector< Value > & | operator/= (double a) |
Private Types | |
| typedef BinaryOpTraits< Value, Value >::MulT | Value2 |
| Value squared. | |
| typedef BinaryOpTraits< Value2, Value2 >::MulT | Value4 |
| Value to the 4th power. | |
Private Attributes | |
Vector components | |
| Value | theX |
| Value | theY |
| Value | theZ |
A 3-component vector.
It can be created with any unit type as template parameter. All basic mathematical operations are supported, as well as a subset of the CLHEP Vector3 functionality.
Definition at line 33 of file ThreeVector.h.
|
inline |
Apply a rotation.
| angle | Rotation angle in radians. |
| axis | Rotation axis. |
Definition at line 180 of file ThreeVector.h.
References ThePEG::ThreeVector< Value >::mag().
1.8.9.1