thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
ThreeVector.h File Reference

contains the ThreeVector class. More...

#include "ThreeVector.fh"
#include "ThePEG/Config/ThePEG.h"
#include "ThePEG/Utilities/UnitIO.h"
#include <cassert>
#include <cmath>

Go to the source code of this file.

Classes

class  ThePEG::ThreeVector< Value >
 A 3-component vector. More...
 

Namespaces

 ThePEG
 This is the main namespace within which all identifiers in ThePEG are declared.
 

Functions

ostream & ThePEG::operator<< (ostream &os, const ThreeVector< double > &v)
 Stream output. Format $(x,y,z)$.
 
template<typename ValueA , typename ValueB >
auto ThePEG::operator* (const ThreeVector< ValueA > &a, const ThreeVector< ValueB > &b) -> decltype(a.x() *b.x())
 Vector dot product.
 
template<typename Value >
ThreeVector< double > ThePEG::unitVector (const ThreeVector< Value > &v)
 A parallel vector with unit length.
 
template<typename OStream , typename UT , typename Value >
void ThePEG::ounitstream (OStream &os, const ThreeVector< Value > &p, UT &u)
 Output a ThreeVector with units to a stream. More...
 
template<typename IStream , typename UT , typename Value >
void ThePEG::iunitstream (IStream &is, ThreeVector< Value > &p, UT &u)
 Input a ThreeVector with units from a stream. More...
 
Basic mathematical operations
template<typename Value >
ThreeVector< Value > ThePEG::operator+ (ThreeVector< Value > a, const ThreeVector< Value > &b)
 
template<typename Value >
ThreeVector< Value > ThePEG::operator- (ThreeVector< Value > a, const ThreeVector< Value > &b)
 
template<typename Value >
ThreeVector< Value > ThePEG::operator- (const ThreeVector< Value > &v)
 
template<typename Value >
ThreeVector< Value > ThePEG::operator* (ThreeVector< Value > v, double a)
 
template<typename Value >
ThreeVector< Value > ThePEG::operator* (double a, ThreeVector< Value > v)
 
template<typename ValueA , typename ValueB >
auto ThePEG::operator* (ValueB a, ThreeVector< ValueA > v) -> ThreeVector< decltype(a *v.x())>
 
template<typename ValueA , typename ValueB >
auto ThePEG::operator* (ThreeVector< ValueA > v, ValueB a) -> ThreeVector< decltype(v.x() *a)>
 

Detailed Description

contains the ThreeVector class.

ThreeVector can be created with any unit type as template parameter. All basic mathematical operations are supported, as well as a subset of the CLHEP Vector3 functionality.

Definition in file ThreeVector.h.