![]() |
HepMC Reference DocumentationHepMC |
#include <SimpleVector.h>
Public Member Functions | |
FourVector (double xin, double yin, double zin, double tin=0) | |
constructor requiring at least x, y, and z | |
FourVector (double t) | |
constructor requiring only t | |
FourVector () | |
template<class T> | |
FourVector (const T &v, typename detail::disable_if< detail::is_arithmetic< T >::value, void >::type *=0) | |
FourVector (const FourVector &v) | |
copy constructor | |
void | swap (FourVector &other) |
swap | |
double | px () const |
return px | |
double | py () const |
return py | |
double | pz () const |
return pz | |
double | e () const |
return E | |
double | x () const |
return x | |
double | y () const |
return y | |
double | z () const |
return z | |
double | t () const |
return t | |
double | m2 () const |
Invariant mass squared. | |
double | m () const |
Invariant mass. If m2() is negative then -sqrt(-m2()) is returned. | |
double | perp2 () const |
Transverse component of the spatial vector squared. | |
double | perp () const |
Transverse component of the spatial vector (R in cylindrical system). | |
double | theta () const |
The polar angle. | |
double | phi () const |
The azimuth angle. | |
double | rho () const |
spatial vector component magnitude | |
FourVector & | operator= (const FourVector &) |
make a copy | |
bool | operator== (const FourVector &) const |
equality | |
bool | operator!= (const FourVector &) const |
inequality | |
double | pseudoRapidity () const |
Returns the pseudo-rapidity, i.e. -ln(tan(theta/2)). | |
double | eta () const |
Pseudorapidity (of the space part). | |
void | set (double x, double y, double z, double t) |
set x, y, z, and t | |
void | setX (double x) |
set x | |
void | setY (double y) |
set y | |
void | setZ (double z) |
set z | |
void | setT (double t) |
set t | |
void | setPx (double x) |
set px | |
void | setPy (double y) |
set py | |
void | setPz (double z) |
set pz | |
void | setE (double t) |
set E |
For compatibility with existing code, the basic expected geometrical access methods are povided. Also, there is a templated constructor that will take another vector (HepLorentzVector, GenVector, ...) which must have the following methods: x(), y(), z(), t().
testFlow.cc, testPrintBug.cc, testSimpleVector.cc, and VectorConversion.h.
Definition at line 42 of file SimpleVector.h.
HepMC::FourVector::FourVector | ( | double | xin, | |
double | yin, | |||
double | zin, | |||
double | tin = 0 | |||
) | [inline] |
HepMC::FourVector::FourVector | ( | double | t | ) | [inline] |
HepMC::FourVector::FourVector | ( | ) | [inline] |
Definition at line 54 of file SimpleVector.h.
HepMC::FourVector::FourVector | ( | const T & | v, | |
typename detail::disable_if< detail::is_arithmetic< T >::value, void >::type * | = 0 | |||
) | [inline] |
templated constructor this is used ONLY if T is not arithmetic
Definition at line 60 of file SimpleVector.h.
HepMC::FourVector::FourVector | ( | const FourVector & | v | ) | [inline] |
double HepMC::FourVector::e | ( | ) | const [inline] |
return E
Definition at line 73 of file SimpleVector.h.
Referenced by HepMC::GenParticle::convert_momentum(), main(), HepMC::operator<<(), HepMC::GenParticle::print(), and HepMC::IO_HEPEVT::write_event().
double HepMC::FourVector::eta | ( | ) | const |
double HepMC::FourVector::m | ( | ) | const |
Invariant mass. If m2() is negative then -sqrt(-m2()) is returned.
Referenced by main().
double HepMC::FourVector::m2 | ( | ) | const |
bool HepMC::FourVector::operator!= | ( | const FourVector & | ) | const |
inequality
FourVector& HepMC::FourVector::operator= | ( | const FourVector & | ) |
make a copy
bool HepMC::FourVector::operator== | ( | const FourVector & | ) | const |
equality
double HepMC::FourVector::perp | ( | ) | const |
Transverse component of the spatial vector (R in cylindrical system).
Referenced by main().
double HepMC::FourVector::perp2 | ( | ) | const |
Transverse component of the spatial vector squared.
Referenced by main().
double HepMC::FourVector::phi | ( | ) | const |
double HepMC::FourVector::pseudoRapidity | ( | ) | const |
Returns the pseudo-rapidity, i.e. -ln(tan(theta/2)).
Referenced by main().
double HepMC::FourVector::px | ( | ) | const [inline] |
return px
Definition at line 70 of file SimpleVector.h.
Referenced by HepMC::GenParticle::convert_momentum(), main(), HepMC::operator<<(), HepMC::GenParticle::print(), and HepMC::IO_HEPEVT::write_event().
double HepMC::FourVector::py | ( | ) | const [inline] |
return py
Definition at line 71 of file SimpleVector.h.
Referenced by HepMC::GenParticle::convert_momentum(), main(), HepMC::operator<<(), HepMC::GenParticle::print(), and HepMC::IO_HEPEVT::write_event().
double HepMC::FourVector::pz | ( | ) | const [inline] |
return pz
Definition at line 72 of file SimpleVector.h.
Referenced by HepMC::GenParticle::convert_momentum(), main(), HepMC::operator<<(), HepMC::GenParticle::print(), and HepMC::IO_HEPEVT::write_event().
double HepMC::FourVector::rho | ( | ) | const |
void HepMC::FourVector::set | ( | double | x, | |
double | y, | |||
double | z, | |||
double | t | |||
) |
void HepMC::FourVector::setE | ( | double | t | ) | [inline] |
set E
Definition at line 110 of file SimpleVector.h.
Referenced by main().
void HepMC::FourVector::setPx | ( | double | x | ) | [inline] |
set px
Definition at line 107 of file SimpleVector.h.
Referenced by main().
void HepMC::FourVector::setPy | ( | double | y | ) | [inline] |
set py
Definition at line 108 of file SimpleVector.h.
Referenced by main().
void HepMC::FourVector::setPz | ( | double | z | ) | [inline] |
set pz
Definition at line 109 of file SimpleVector.h.
Referenced by main().
void HepMC::FourVector::setT | ( | double | t | ) | [inline] |
set t
Definition at line 105 of file SimpleVector.h.
Referenced by main().
void HepMC::FourVector::setX | ( | double | x | ) | [inline] |
set x
Definition at line 102 of file SimpleVector.h.
Referenced by main().
void HepMC::FourVector::setY | ( | double | y | ) | [inline] |
set y
Definition at line 103 of file SimpleVector.h.
Referenced by main().
void HepMC::FourVector::setZ | ( | double | z | ) | [inline] |
set z
Definition at line 104 of file SimpleVector.h.
Referenced by main().
void HepMC::FourVector::swap | ( | FourVector & | other | ) |
double HepMC::FourVector::t | ( | ) | const [inline] |
return t
Definition at line 78 of file SimpleVector.h.
Referenced by HepMC::GenVertex::convert_position(), main(), and HepMC::GenVertex::print().
double HepMC::FourVector::theta | ( | ) | const |
double HepMC::FourVector::x | ( | ) | const [inline] |
return x
Definition at line 75 of file SimpleVector.h.
Referenced by HepMC::GenVertex::convert_position(), main(), HepMC::operator<<(), HepMC::GenVertex::point3d(), and HepMC::GenVertex::print().
double HepMC::FourVector::y | ( | ) | const [inline] |
return y
Definition at line 76 of file SimpleVector.h.
Referenced by HepMC::GenVertex::convert_position(), main(), HepMC::GenVertex::point3d(), and HepMC::GenVertex::print().
double HepMC::FourVector::z | ( | ) | const [inline] |
return z
Definition at line 77 of file SimpleVector.h.
Referenced by HepMC::GenVertex::convert_position(), main(), HepMC::GenVertex::point3d(), and HepMC::GenVertex::print().