#include <SimpleVector.h>
Public Member Functions | |
| ThreeVector (double xin, double yin=0, double zin=0) | |
| construct using x, y, and z (only x is required) | |
| ThreeVector () | |
| template<class T> | |
| ThreeVector (const T &v, typename detail::disable_if< detail::is_arithmetic< T >::value, void >::type *=0) | |
| templated constructor this is used ONLY if T is not arithmetic | |
| ThreeVector (const ThreeVector &v) | |
| copy constructor | |
| void | swap (ThreeVector &other) |
| swap | |
| double | x () const |
| return x | |
| double | y () const |
| return y | |
| double | z () const |
| return z | |
| void | setX (double x) |
| set x | |
| void | setY (double y) |
| set y | |
| void | setZ (double z) |
| set z | |
| void | set (double x, double y, double z) |
| set x, y, and z | |
| double | phi () const |
| The azimuth angle. | |
| double | theta () const |
| The polar angle. | |
| double | r () const |
| The magnitude. | |
| double | mag () const |
| The magnitude (r in spherical coordinate system). | |
| void | setPhi (double) |
| Set phi keeping mag and theta constant (BaBar). | |
| void | setTheta (double) |
| Set theta keeping mag and phi constant (BaBar). | |
| double | perp2 () const |
| The transverse component squared (rho^2 in cylindrical coordinate system). | |
| double | perp () const |
| The transverse component (rho in cylindrical coordinate system). | |
| ThreeVector & | operator= (const ThreeVector &) |
| make a copy | |
| bool | operator== (const ThreeVector &) const |
| equality | |
| bool | operator!= (const ThreeVector &) const |
| inequality | |
Private Attributes | |
| double | m_x |
| double | m_y |
| double | m_z |
Also, there is a templated constructor that will take another vector (HepLorentzVector, GenVector, ...) which must have the following methods: x(), y(), z().
Definition at line 132 of file SimpleVector.h.
| HepMC::ThreeVector::ThreeVector | ( | double | xin, | |
| double | yin = 0, |
|||
| double | zin = 0 | |||
| ) | [inline] |
| HepMC::ThreeVector::ThreeVector | ( | ) | [inline] |
| HepMC::ThreeVector::ThreeVector | ( | const T & | v, | |
| typename detail::disable_if< detail::is_arithmetic< T >::value, void >::type * | = 0 | |||
| ) | [inline] |
| HepMC::ThreeVector::ThreeVector | ( | const ThreeVector & | v | ) | [inline] |
| void HepMC::ThreeVector::swap | ( | ThreeVector & | other | ) | [inline] |
swap
Definition at line 94 of file SimpleVector.icc.
00094 { 00095 std::swap( m_x, other.m_x ); 00096 std::swap( m_y, other.m_y ); 00097 std::swap( m_z, other.m_z ); 00098 }
| double HepMC::ThreeVector::x | ( | ) | const [inline] |
| double HepMC::ThreeVector::y | ( | ) | const [inline] |
| double HepMC::ThreeVector::z | ( | ) | const [inline] |
| void HepMC::ThreeVector::setX | ( | double | x | ) | [inline] |
| void HepMC::ThreeVector::setY | ( | double | y | ) | [inline] |
| void HepMC::ThreeVector::setZ | ( | double | z | ) | [inline] |
| void HepMC::ThreeVector::set | ( | double | x, | |
| double | y, | |||
| double | z | |||
| ) | [inline] |
| double HepMC::ThreeVector::phi | ( | ) | const [inline] |
| double HepMC::ThreeVector::theta | ( | ) | const [inline] |
| double HepMC::ThreeVector::r | ( | ) | const [inline] |
| double HepMC::ThreeVector::mag | ( | ) | const [inline] |
| void HepMC::ThreeVector::setPhi | ( | double | ) | [inline] |
| void HepMC::ThreeVector::setTheta | ( | double | ) | [inline] |
| double HepMC::ThreeVector::perp2 | ( | ) | const [inline] |
| double HepMC::ThreeVector::perp | ( | ) | const [inline] |
The transverse component (rho in cylindrical coordinate system).
Definition at line 136 of file SimpleVector.icc.
00136 { return std::sqrt(perp2()); }
| ThreeVector & HepMC::ThreeVector::operator= | ( | const ThreeVector & | ) | [inline] |
| bool HepMC::ThreeVector::operator== | ( | const ThreeVector & | ) | const [inline] |
| bool HepMC::ThreeVector::operator!= | ( | const ThreeVector & | ) | const [inline] |
double HepMC::ThreeVector::m_x [private] |
Definition at line 184 of file SimpleVector.h.
double HepMC::ThreeVector::m_y [private] |
Definition at line 185 of file SimpleVector.h.
double HepMC::ThreeVector::m_z [private] |
Definition at line 186 of file SimpleVector.h.
1.4.7