HepMC Reference Documentation

HepMC

HepMC::ThreeVector Class Reference

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

#include <SimpleVector.h>

List of all members.

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

Examples:

testSimpleVector.cc, and VectorConversion.h.

Definition at line 131 of file SimpleVector.h.


Constructor & Destructor Documentation

HepMC::ThreeVector::ThreeVector ( double  xin,
double  yin = 0,
double  zin = 0 
) [inline]

construct using x, y, and z (only x is required)

Definition at line 136 of file SimpleVector.h.

HepMC::ThreeVector::ThreeVector (  )  [inline]

Definition at line 139 of file SimpleVector.h.

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.

HepMC::ThreeVector::ThreeVector ( const ThreeVector v  )  [inline]

copy constructor

Definition at line 150 of file SimpleVector.h.


Member Function Documentation

bool HepMC::ThreeVector::operator!= ( const ThreeVector  )  const

inequality

ThreeVector& HepMC::ThreeVector::operator= ( const ThreeVector  ) 

make a copy

bool HepMC::ThreeVector::operator== ( const ThreeVector  )  const

equality

double HepMC::ThreeVector::perp (  )  const

The transverse component (rho in cylindrical coordinate system).

Examples:
testSimpleVector.cc.

Referenced by main().

double HepMC::ThreeVector::perp2 (  )  const

The transverse component squared (rho^2 in cylindrical coordinate system).

Examples:
testSimpleVector.cc.

Referenced by main().

double HepMC::ThreeVector::phi (  )  const

The azimuth angle.

Examples:
testSimpleVector.cc.

Referenced by main(), and HepMC::Polarization::set_normal3d().

double HepMC::ThreeVector::r (  )  const

The magnitude.

Examples:
testSimpleVector.cc.

Referenced by main().

void HepMC::ThreeVector::set ( double  x,
double  y,
double  z 
)

set x, y, and z

Examples:
testSimpleVector.cc.

Referenced by main().

void HepMC::ThreeVector::setPhi ( double   ) 

Set phi keeping magnitude and theta constant (BaBar).

Examples:
testSimpleVector.cc.

Referenced by main(), and HepMC::Polarization::normal3d().

void HepMC::ThreeVector::setTheta ( double   ) 

Set theta keeping magnitude and phi constant (BaBar).

Examples:
testSimpleVector.cc.

Referenced by main(), and HepMC::Polarization::normal3d().

void HepMC::ThreeVector::setX ( double  x  )  [inline]

set x

Examples:
testSimpleVector.cc.

Definition at line 159 of file SimpleVector.h.

Referenced by main().

void HepMC::ThreeVector::setY ( double  y  )  [inline]

set y

Examples:
testSimpleVector.cc.

Definition at line 160 of file SimpleVector.h.

Referenced by main().

void HepMC::ThreeVector::setZ ( double  z  )  [inline]

set z

Examples:
testSimpleVector.cc.

Definition at line 161 of file SimpleVector.h.

Referenced by main().

void HepMC::ThreeVector::swap ( ThreeVector other  ) 

swap

double HepMC::ThreeVector::theta (  )  const

The polar angle.

Examples:
testSimpleVector.cc.

Referenced by main(), and HepMC::Polarization::set_normal3d().

double HepMC::ThreeVector::x (  )  const [inline]

return x

Examples:
testSimpleVector.cc.

Definition at line 155 of file SimpleVector.h.

Referenced by main().

double HepMC::ThreeVector::y (  )  const [inline]

return y

Examples:
testSimpleVector.cc.

Definition at line 156 of file SimpleVector.h.

Referenced by main().

double HepMC::ThreeVector::z (  )  const [inline]

return z

Examples:
testSimpleVector.cc.

Definition at line 157 of file SimpleVector.h.

Referenced by main().


The documentation for this class was generated from the following file:
Generated on Thu Jan 7 13:10:21 2010 for HepMC by  doxygen 1.4.7