ThePEG::ParticleTraits< PType > Struct Template Reference

ParticleTraits is a templated class defining a general interface to any particle class. More...

#include <ParticleTraits.h>

Inheritance diagram for ThePEG::ParticleTraits< PType >:

ThePEG::TraitsType

List of all members.

Static Public Member Functions

static PType & ref (PType &p)
 Return a reference to the particle.
static LorentzMomentum momentum (const PType &p)
 Return the momentum of particle p.
static Energy mass (const PType &p)
 Return the mass of particle p.
static void transform (PType &p, const LorentzRotation &r)
 Perform a Lorentz transformation on particle p.
static void set5Momentum (PType &p, const Lorentz5Momentum &q)
 Set the momentum and mass of a particle.
static void set3Momentum (PType &p, const Momentum3 &q)
 Set the 3-momentum of a particle.
static int iCharge (const PType &p)
 Return charge of particle p in units of e/3.


Detailed Description

template<typename PType>
struct ThePEG::ParticleTraits< PType >

ParticleTraits is a templated class defining a general interface to any particle class.

To make another particle type PType available to some general ThePEG routines, the ParticleTraits should be specialized to that class implementing relevant methods of the general ParticleTraits class below. Typically one needs specialisation both for the class itself and of pointers to the class.

See also:
Particle

Lorentz5Vector

Definition at line 33 of file ParticleTraits.h.


Member Function Documentation

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

Set the 3-momentum of a particle.

The energy is rescaled to preserve invariant mass.

Definition at line 74 of file ParticleTraits.h.


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

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