ThePEG::UtilityBase Struct Reference

UtilityBase is a base class implementing a number of static utility functions. More...

#include <UtilityBase.h>

Inheritance diagram for ThePEG::UtilityBase:

ThePEG::Utilities

List of all members.

Static Public Member Functions

template<typename Cont>
static LorentzMomentum sumMomentum (const Cont &c)
 Sums the four-momentum of given container.
template<typename Iterator>
static LorentzMomentum sumMomentum (Iterator first, Iterator last)
 Sums the four-momentum of the entries between first and last.
template<typename Iterator>
static void transform (Iterator first, Iterator last, const LorentzRotation &boost)
 Transform the entries between first and last.
template<typename Cont>
static void transform (Cont &cont, const LorentzRotation &boost)
 Transform the entries in a container cont.
template<typename PType>
static LorentzRotation boostToCM (const pair< PType, PType > &pp)
 Boost the two objects in the pair to their CM system.
template<typename PType>
static LorentzRotation boostToCM (const Triplet< PType, PType, PType > &pt)
 Boost the three objects in the Triplet to their CM system.
template<typename PType>
static LorentzRotation getBoostToCM (const pair< PType, PType > &pp)
 Obtain the LorentzRotation needed to boost the two objects in the pair to their CM system.
template<typename PType>
static LorentzRotation getBoostToCM (const Triplet< PType, PType, PType > &pt)
 Obtain the LorentzRotation needed to boost the three objects in the Triplet to their CM system.
template<typename PType>
static LorentzRotation getBoostFromCM (const pair< PType, PType > &pp)
 Get the inverse boost as compared to getBoostToCM.
template<typename PType>
static LorentzRotation getBoostFromCM (const Triplet< PType, PType, PType > &pt)
 Get the inverse boost as compared to getBoostToCM.
template<typename Iterator>
static LorentzRotation boostToCM (Iterator first, Iterator last)
 Boost the entries between fisrt and last into their CM system.
template<typename Iterator>
static LorentzRotation boostToCM (Iterator first, Iterator last, Iterator zAxis)
 Boost the entries between fisrt and last into their CM system.
template<typename Iterator>
static LorentzRotation boostToCM (Iterator first, Iterator last, Iterator zAxis, Iterator xzPlane)
 Boost the entries between fisrt and last into their CM system.
template<typename PType>
static void setMomentum (PType &p, const Momentum3 &q)
 Rotate p to the z-axis and boost it to its CMS, then boost it along the z-axis and rotate it so that it ends up with momentum q.
template<typename PType>
static void setMomentumFromCMS (PType &p, const Momentum3 &q)
 Boost p along the z-axis and rotate it so that, if it was previously at rest, it ends up with momentum q.
template<typename Iter>
static void setMomentum (Iter first, Iter last, const Momentum3 &q)
 Rotate the range of particles so their sum is along z-axis and boost them to their CMS, then boost them along the z-axis and rotate them so that they end up with total momentum q.
template<typename Iter>
static void setMomentum (Iter first, Iter last, const Momentum3 &q, double eps)
 Rotate the range of particles so their sum is along z-axis then boost them along the z-axis and rotate them so that they end up with total momentum q.
template<typename Iter>
static void setMomentumFromCMS (Iter first, Iter last, Energy2 m2, const Momentum3 &q)
 Boost the range of particles along the z-axis and rotate them so that, if they were previously in their rest frame, they end up with total momentum q.
template<typename PType>
static LorentzRotation transformToMomentum (const PType &p, const Momentum3 &q)
 Return the transformation needed to rotate p to the z-axis and boost it to its CMS, then boost it along the z-axis and rotate it so that it ends up with momentum q.
template<typename PType>
static LorentzRotation transformToMomentum (const PType &p, const LorentzMomentum &q)
 Return the transformation needed to rotate p to the z-axis and boost it to its CMS, then boost it along the z-axis and rotate it so that it ends up with momentum q.
template<typename PType>
static LorentzRotation getTransformToMomentum (const PType &p, const LorentzMomentum &q, const LorentzMomentum &k)
 Return a transformation appropriate for transforming p to have the momentum q.
template<typename PType>
static LorentzRotation getTransformToMomentum (const PType &p, const Momentum3 &q, const LorentzMomentum &k)
 Return a transformation appropriate for transforming p to have the momentum q.
template<typename LV>
static LorentzRotation transformFromCMS (const LV &p)
 Create a rotation corresponding to transforming p to its current value from its CMS by first boosting along the z-axis and then rotating.
template<typename LV>
static LorentzRotation transformFromCMS (const LV &sum, LV zAxis)
 Create a rotation corresponding to transforming sum to its current value from its CMS, with zAxis along the z-axis in that CMS frame.
template<typename LV>
static LorentzRotation transformFromCMS (const LV &sum, const LV &zAxis, LV xyPlane)
 Create a rotation corresponding to transforming sum to its current value from its CMS, with zAxis along the z-axis and xyPlane in the x-y plane in that CMS frame.
template<typename LV>
static LorentzRotation transformToCMS (const LV &sum, LV zAxis)
 Create a rotation which would transform sum to its CMS frame with zAxis along the z-axis in that frame.
template<typename LV>
static LorentzRotation transformToCMS (const LV &p)
 Create a rotation which would transform sum to its CMS frame first rotating it to the z-axis and then boost it along the z-axis.
template<typename LV>
static LorentzRotation transformToCMS (const LV &sum, const LV &zAxis, LV xyPlane)
 Create a rotation which would transform sum to its CMS frame with zAxis along the z-axis and xyPlane in the x-y plane in that frame.
template<typename Cont1, typename Cont2>
static void add (Cont1 &c1, const Cont2 &c2)
 Add the elements in Cont2 to Cont1, appending them to the end if possible.


Detailed Description

UtilityBase is a base class implementing a number of static utility functions.

It should be used as a base class to give acces to these functions to a class. A class can safely multiply inherit from this class as it only contains static functions.

Definition at line 24 of file UtilityBase.h.


Member Function Documentation

template<typename Cont>
static LorentzMomentum ThePEG::UtilityBase::sumMomentum ( const Cont &  c  )  [inline, static]

Sums the four-momentum of given container.

The class Cont::value_type must be of a type T for which ParticleTraits<T>::momentum(const T&) is implemented correctly.

Definition at line 33 of file UtilityBase.h.

template<typename Iterator>
static LorentzMomentum ThePEG::UtilityBase::sumMomentum ( Iterator  first,
Iterator  last 
) [inline, static]

Sums the four-momentum of the entries between first and last.

The class Iterator::value_type must be of a type T for which ParticleTraits<T>::momentum(const T&) is implemented correctly.

Definition at line 44 of file UtilityBase.h.

template<typename Iterator>
static void ThePEG::UtilityBase::transform ( Iterator  first,
Iterator  last,
const LorentzRotation boost 
) [inline, static]

Transform the entries between first and last.

The class Iterator::value_type must be of a type T for which ParticleTraits<T>::momentum(const T&) is implemented correctly.

Definition at line 60 of file UtilityBase.h.

Referenced by transform().

template<typename Cont>
static void ThePEG::UtilityBase::transform ( Cont &  cont,
const LorentzRotation boost 
) [inline, static]

Transform the entries in a container cont.

The class Cont::value_type must be of a type T for which ParticleTraits<T>::momentum(const T&) is implemented correctly.

Definition at line 75 of file UtilityBase.h.

References transform().

template<typename PType>
static LorentzRotation ThePEG::UtilityBase::boostToCM ( const pair< PType, PType > &  pp  )  [inline, static]

Boost the two objects in the pair to their CM system.

Also rotate so that the first is along the z-axis. The class PType must have ParticleTraits<PType>::momentum(const PType&) and ParticleTraits<PType>::transform(PType&, const LorentzRotation&) implemented correctly.

Referenced by boostToCM().

template<typename PType>
static LorentzRotation ThePEG::UtilityBase::boostToCM ( const Triplet< PType, PType, PType > &  pt  )  [inline, static]

Boost the three objects in the Triplet to their CM system.

Also rotate so that the first is along the z-axis and the second is in the x-z plane with positive x. The class PType must have ParticleTraits<PType>::momentum(const PType&) and ParticleTraits<PType>::transform(PType&, const LorentzRotation&) implemented correctly.

template<typename PType>
static LorentzRotation ThePEG::UtilityBase::getBoostToCM ( const pair< PType, PType > &  pp  )  [inline, static]

Obtain the LorentzRotation needed to boost the two objects in the pair to their CM system.

Also rotate the LorentzRotation so that the first is along the z-axis. The class PType must have ParticleTraits<PType>::momentum(const PType&) implemented correctly.

Referenced by getTransformToMomentum().

template<typename PType>
static LorentzRotation ThePEG::UtilityBase::getBoostToCM ( const Triplet< PType, PType, PType > &  pt  )  [inline, static]

Obtain the LorentzRotation needed to boost the three objects in the Triplet to their CM system.

Also rotate the LorentzRotation so that the first is along the z-axis and the secons i in the x-z plane with positive x. The class PType must have ParticleTraits<PType>::momentum(const PType&) implemented correctly.

template<typename Iterator>
static LorentzRotation ThePEG::UtilityBase::boostToCM ( Iterator  first,
Iterator  last 
) [inline, static]

Boost the entries between fisrt and last into their CM system.

The class Iterator::value_type must be of a type T for which ParticleTraits<T>::momentum(const T&) and ParticleTraits<T>::transform(T&, const LorentzRotation&) are implemented correctly.

Definition at line 142 of file UtilityBase.h.

References boostToCM().

template<typename Iterator>
static LorentzRotation ThePEG::UtilityBase::boostToCM ( Iterator  first,
Iterator  last,
Iterator  zAxis 
) [inline, static]

Boost the entries between fisrt and last into their CM system.

If zAxis != last, also rotate the entries so that zAxis becomes paralell to the z-axis. The class Iterator::value_type must be of a type T for which ParticleTraits<T>::momentum(const T&) and ParticleTraits<T>::transform(T&, const LorentzRotation&) are implemented correctly.

Definition at line 156 of file UtilityBase.h.

References boostToCM().

template<typename Iterator>
static LorentzRotation ThePEG::UtilityBase::boostToCM ( Iterator  first,
Iterator  last,
Iterator  zAxis,
Iterator  xzPlane 
) [inline, static]

Boost the entries between fisrt and last into their CM system.

If zAxis != last, also rotate the entries so that zAxis becomes paralell to the z-axis. Also, if xzPlane != last, rotate the entries so that xzPlane is placed in the xz-plane. The class Iterator::value_type must be of a type T for which ParticleTraits<T>::momentum(const T&) and ParticleTraits<T>::transform(T&, const LorentzRotation&) are implemented correctly.

template<typename PType>
static void ThePEG::UtilityBase::setMomentum ( PType &  p,
const Momentum3 q 
) [inline, static]

Rotate p to the z-axis and boost it to its CMS, then boost it along the z-axis and rotate it so that it ends up with momentum q.

If p is massless - simply set its momentum. The class PType must have ParticleTraits<PType>::momentum(const PType&) implemented correctly.

template<typename PType>
static void ThePEG::UtilityBase::setMomentumFromCMS ( PType &  p,
const Momentum3 q 
) [inline, static]

Boost p along the z-axis and rotate it so that, if it was previously at rest, it ends up with momentum q.

If p is massless

template<typename Iter>
static void ThePEG::UtilityBase::setMomentum ( Iter  first,
Iter  last,
const Momentum3 q 
) [inline, static]

Rotate the range of particles so their sum is along z-axis and boost them to their CMS, then boost them along the z-axis and rotate them so that they end up with total momentum q.

The class Iter::value_type must be of a type T for which ParticleTraits<T>::momentum(const T&) and ParticleTraits<T>::transform(T&, const LorentzRotation&) are implemented correctly.

template<typename Iter>
static void ThePEG::UtilityBase::setMomentum ( Iter  first,
Iter  last,
const Momentum3 q,
double  eps 
) [inline, static]

Rotate the range of particles so their sum is along z-axis then boost them along the z-axis and rotate them so that they end up with total momentum q.

If a single boost does not succeed to obtain the required precision within eps times the total energy, the boost is redone. The class Iter::value_type must be of a type T for which ParticleTraits<T>::momentum(const T&) and ParticleTraits<T>::transform(T&, const LorentzRotation&) are implemented correctly.

template<typename Iter>
static void ThePEG::UtilityBase::setMomentumFromCMS ( Iter  first,
Iter  last,
Energy2  m2,
const Momentum3 q 
) [inline, static]

Boost the range of particles along the z-axis and rotate them so that, if they were previously in their rest frame, they end up with total momentum q.

The class Iter::value_type must be of a type T for which ParticleTraits<T>::momentum(const T&) and ParticleTraits<T>::transform(T&, const LorentzRotation&) are implemented correctly.

Parameters:
first iterator pointing to the first particle in the range.
last iterator indicating the end of the range.
m2 the invariant mass squared of the particles.
q final summed momentum of the particles.

template<typename PType>
static LorentzRotation ThePEG::UtilityBase::transformToMomentum ( const PType &  p,
const Momentum3 q 
) [inline, static]

Return the transformation needed to rotate p to the z-axis and boost it to its CMS, then boost it along the z-axis and rotate it so that it ends up with momentum q.

The class PType must have ParticleTraits<PType>::momentum(const PType&) implemented correctly. Warning This function only works properly if p has a well defined direction in both polar and azimuth angles.

Deprecated:
{Use getTransformToMomentum() instead.}

Definition at line 252 of file UtilityBase.h.

References ThePEG::ThreeVector< Value >::mag2().

template<typename PType>
static LorentzRotation ThePEG::UtilityBase::transformToMomentum ( const PType &  p,
const LorentzMomentum q 
) [inline, static]

Return the transformation needed to rotate p to the z-axis and boost it to its CMS, then boost it along the z-axis and rotate it so that it ends up with momentum q.

The class PType must have ParticleTraits<PType>::momentum(const PType&) implemented correctly. Warning This function only works properly if p has a well defined direction in both polar and azimuth angles.

Deprecated:
{Use getTransformToMomentum() instead.}

Definition at line 270 of file UtilityBase.h.

References transformFromCMS(), and transformToCMS().

template<typename PType>
static LorentzRotation ThePEG::UtilityBase::getTransformToMomentum ( const PType &  p,
const LorentzMomentum q,
const LorentzMomentum k 
) [inline, static]

Return a transformation appropriate for transforming p to have the momentum q.

The transformation is done so that the auxiliary vector k is left unchanged.

Definition at line 281 of file UtilityBase.h.

References getBoostFromCM(), and getBoostToCM().

Referenced by getTransformToMomentum().

template<typename PType>
static LorentzRotation ThePEG::UtilityBase::getTransformToMomentum ( const PType &  p,
const Momentum3 q,
const LorentzMomentum k 
) [inline, static]

Return a transformation appropriate for transforming p to have the momentum q.

The transformation is done so that the auxiliary vector k is left unchanged.

Definition at line 296 of file UtilityBase.h.

References getTransformToMomentum(), and ThePEG::ThreeVector< Value >::mag2().

template<typename LV>
static LorentzRotation ThePEG::UtilityBase::transformFromCMS ( const LV &  p  )  [inline, static]

Create a rotation corresponding to transforming p to its current value from its CMS by first boosting along the z-axis and then rotating.

The class LV must have methods rho() and e().

Referenced by transformToMomentum().

template<typename LV>
static LorentzRotation ThePEG::UtilityBase::transformFromCMS ( const LV &  sum,
LV  zAxis 
) [inline, static]

Create a rotation corresponding to transforming sum to its current value from its CMS, with zAxis along the z-axis in that CMS frame.

The class LV must have methods rho(), phi() theta() and e().

template<typename LV>
static LorentzRotation ThePEG::UtilityBase::transformFromCMS ( const LV &  sum,
const LV &  zAxis,
LV  xyPlane 
) [inline, static]

Create a rotation corresponding to transforming sum to its current value from its CMS, with zAxis along the z-axis and xyPlane in the x-y plane in that CMS frame.

The class LV must have methods rho(), phi() theta() and e().

template<typename LV>
static LorentzRotation ThePEG::UtilityBase::transformToCMS ( const LV &  sum,
LV  zAxis 
) [inline, static]

Create a rotation which would transform sum to its CMS frame with zAxis along the z-axis in that frame.

The class LV must have methods rho(), phi() theta() and e().

Referenced by transformToMomentum().

template<typename LV>
static LorentzRotation ThePEG::UtilityBase::transformToCMS ( const LV &  p  )  [inline, static]

Create a rotation which would transform sum to its CMS frame first rotating it to the z-axis and then boost it along the z-axis.

The class LV must have methods rho(), phi() theta() and e().

template<typename LV>
static LorentzRotation ThePEG::UtilityBase::transformToCMS ( const LV &  sum,
const LV &  zAxis,
LV  xyPlane 
) [inline, static]

Create a rotation which would transform sum to its CMS frame with zAxis along the z-axis and xyPlane in the x-y plane in that frame.

The class LV must have methods rho(), phi() theta() and e().


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

Generated on Thu Apr 29 12:43:25 2010 for ThePEG by  doxygen 1.5.5