9 #ifndef ThePEG_Transverse_H 10 #define ThePEG_Transverse_H 13 #include "ThePEG/Config/ThePEG.h" 14 #include "ThePEG/Vectors/Lorentz5Vector.h" 15 #include "Transverse.fh" 29 template <
typename Value>
80 BasePair::operator=(p);
88 BasePair::operator=(
BasePair(p.x(), p.y()));
96 BasePair::operator=(
BasePair(p.x(), p.y()));
104 BasePair::operator=(
BasePair(p.
x(), p.y()));
128 BasePair::first -= pt.
x();
129 BasePair::second -= pt.
y();
144 BasePair::first += pt.
x();
145 BasePair::second += pt.
y();
153 BasePair::first *= a;
154 BasePair::second *= a;
162 BasePair::first /= a;
163 BasePair::second /= a;
173 Value
x()
const {
return BasePair::first; }
178 Value
y()
const {
return BasePair::second; }
183 Value2
pt2()
const {
return sqr(
x()) + sqr(
y()); }
188 Value
pt()
const {
return sqrt(
pt2()); }
193 double phi()
const {
return atan2(
y(),
x()); }
199 template <
typename OStream,
typename T,
typename UT>
205 template <
typename IStream,
typename T,
typename UT>
213 template <
typename Value>
220 template <
typename Value>
227 template <
typename ValueA,
typename ValueB>
236 template <
typename ValueA,
typename ValueB>
245 template <
typename Value>
252 template <
typename ValueA,
typename ValueB>
A 4-component Lorentz vector.
Transverse & operator/=(double a)
Divide-assign with a scalar.
const Transverse & operator=(const BasePair &p)
Assignment from underlying representation.
Transverse(const BasePair &p)
Constructor from underlying representation.
void ounitstream(OStream &os, const vector< T, Alloc > &v, UT &u)
Ouput a vector of objects with the specified unit.
Transverse()
Default constructor.
Transverse & operator+=(const Transverse &pt)
Assign-add.
This is the main namespace within which all identifiers in ThePEG are declared.
Transverse & operator-=(const Transverse &pt)
Assign-subtract.
Transverse(const LorentzVector< Value > &p)
Constructor taking the transverse parts of a LorentzVector.
const Transverse & operator=(const LorentzVector< Value > &p)
Assignment taking the transverse parts of a LorentzVector.
double phi() const
The azimuth angle.
void iunitstream(IStream &is, vector< T, Alloc > &v, UT &u)
Input a vector of objects with the specified unit.
Transverse operator-(const Transverse &pt) const
Binary minus.
Transverse(const ThreeVector< Value > &p)
Constructor taking the transverse parts of a ThreeVector.
pair< Value, Value > BasePair
Template argument typedef.
Value x() const
The x-component.
Transverse operator-() const
Unary minus.
OUnit< T, UT > ounit(const T &t, const UT &ut)
Helper function creating a OUnit object given an object and a unit.
Transverse(Value x, Value y)
Constructor from x and y components.
Value y() const
The y-component.
BinaryOpTraits< Value, Value >::MulT Value2
Template argument typedef.
Transverse represents the transverse components of a LorentzVector.
const Transverse & operator=(const ThreeVector< Value > &p)
Assignment taking the transverse parts of a ThreeVector.
Value x() const
Component access.
Value pt() const
The magnitude.
Transverse(const Lorentz5Vector< Value > &p)
Constructor taking the transverse parts of a Lorentz5Vector.
The Lorentz5Vector inherits from the LorentzVector class.
Transverse operator+(const Transverse &pt) const
Addition.
Value2 pt2() const
The magnitude squared.
BinaryOpTraits should be specialized with typdefs called MulT and DivT which gives the type resulting...
Transverse & operator*=(double a)
Multiply-assign with a scalar.
const Transverse & operator=(const Lorentz5Vector< Value > &p)
Assignment taking the transverse parts of a Lorentz5Vector.
IUnit< T, UT > iunit(T &t, const UT &ut)
Helper function creating a IUnit object given an object and a unit.