StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
HepMC::ThreeVector Class Reference

ThreeVector is a simple representation of a position or displacement 3 vector. More...

#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)
 
template<class T >
 ThreeVector (const T &v, typename detail::disable_if< detail::is_arithmetic< T >::value, void >::type *=0)
 
 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 xin)
 set x
 
void setY (double yin)
 set y
 
void setZ (double zin)
 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.
 
void setPhi (double)
 Set phi keeping magnitude and theta constant (BaBar).
 
void setTheta (double)
 Set theta keeping magnitude 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).
 
ThreeVectoroperator= (const ThreeVector &)
 make a copy
 
bool operator== (const ThreeVector &) const
 equality
 
bool operator!= (const ThreeVector &) const
 inequality
 

Detailed Description

ThreeVector is a simple representation of a position or displacement 3 vector.

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().

Definition at line 131 of file SimpleVector.h.

Constructor & Destructor Documentation

template<class T >
HepMC::ThreeVector::ThreeVector ( 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 145 of file SimpleVector.h.


The documentation for this class was generated from the following file: