thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
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 >:

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

◆ iCharge()

template<typename PType >
static int ThePEG::ParticleTraits< PType >::iCharge ( const PType &  p)
inlinestatic

Return charge of particle p in units of e/3.

Definition at line 81 of file ParticleTraits.h.

Referenced by ThePEG::ChargedSelector::Check().

◆ mass()

template<typename PType >
static Energy ThePEG::ParticleTraits< PType >::mass ( const PType &  p)
inlinestatic

Return the mass of particle p.

Definition at line 52 of file ParticleTraits.h.

◆ momentum()

template<typename PType >
static LorentzMomentum ThePEG::ParticleTraits< PType >::momentum ( const PType &  p)
inlinestatic

Return the momentum of particle p.

Definition at line 45 of file ParticleTraits.h.

◆ ref()

template<typename PType >
static PType & ThePEG::ParticleTraits< PType >::ref ( PType &  p)
inlinestatic

Return a reference to the particle.

Definition at line 38 of file ParticleTraits.h.

◆ set3Momentum()

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

Set the 3-momentum of a particle.

The energy is rescaled to preserve invariant mass.

Definition at line 74 of file ParticleTraits.h.

◆ set5Momentum()

template<typename PType >
static void ThePEG::ParticleTraits< PType >::set5Momentum ( PType &  p,
const Lorentz5Momentum q 
)
inlinestatic

Set the momentum and mass of a particle.

Definition at line 66 of file ParticleTraits.h.

◆ transform()

template<typename PType >
static void ThePEG::ParticleTraits< PType >::transform ( PType &  p,
const LorentzRotation r 
)
inlinestatic

Perform a Lorentz transformation on particle p.

Definition at line 59 of file ParticleTraits.h.

Referenced by ThePEG::Transformer::operator()().


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