PROFASI
Version 1.5

A representation of three vectors. More...
#include <Vector3.hh>
Public Member Functions  
double  phi () const 
The azimuth angle.  
double  theta () const 
The polar angle.  
double  mag2 () const 
The magnitude squared.  
double  mag () const 
The magnitude.  
double  perp2 () const 
The transverse component squared..  
double  perp () const 
The transverse component.  
void  phi (double) 
Set phi keeping mag and theta constant.  
void  theta (double) 
Set theta keeping mag and phi constant.  
void  mag (double) 
Set magnitude keeping theta and phi constant.  
Vector3 &  operator= (const Vector3 &p) 
Assignment.  
Vector3 &  operator+= (const Vector3 &p) 
Addition.  
Vector3  operator+ (const Vector3 &p) const 
Addition.  
Vector3 &  operator= (const Vector3 &p) 
Subtraction.  
Vector3  operator (const Vector3 &p) const 
Subtraction.  
Vector3  operator () const 
Unary minus.  
Vector3 &  operator*= (double a) 
Scaling with real numbers.  
Vector3  operator* (double a) const 
Scaling with real numbers.  
double  dot (const Vector3 &p) const 
Scalar product.  
Vector3  cross (const Vector3 &p) const 
Cross product.  
Vector3  operator* (const Vector3 &p) const 
Cross product.  
double  angle (const Vector3 &) const 
The angle w.r.t. another 3vector.  
double  torsion (const Vector3 &prev, const Vector3 &next) 
Torsion angle about one vector.  
void  rotateX (double) 
Rotates the Vector3 around the xaxis.  
void  rotateY (double) 
Rotates the Vector3 around the yaxis.  
void  rotateZ (double) 
Rotates the Vector3 around the zaxis.  
void  rotate (double, const Vector3 &) 
Rotates around the axis specified by another Vector3.  
Components in cartesian coordinate system.  
Access and change the components in cartesian coordinates.  
double  x () const 
double  y () const 
double  z () const 
void  x (double gx) 
void  y (double gy) 
void  z (double gz) 
double  operator[] (int i) 
Friends  
Vector3  operator* (double a, const Vector3 &) 
Scaling of 3vectors with a real number.  
The code for this class originally comes from the HEP_THREE_VECTOR class from the CLHEP package. It's a small but very useful class.
The vectors prev, this and next can be thought of as leading from arbitrary points a>b, b>c, and c>d respectively. The torsion angle is defined as the angle on the plane perpendicular to the vector b>c (this), between the projections of the points. The sense of the angle is positive if the rotation vector from the projection of 'a' to the projection of 'd' is in the same direction as the vector "this".