9 #ifndef ThePEG_ParticleTraits_H 10 #define ThePEG_ParticleTraits_H 13 #include "ThePEG/Config/ThePEG.h" 19 template <
typename PType>
38 static PType &
ref(PType & p) {
82 return p.data().iCharge();
104 return p->momentum();
140 return p->data().iCharge();
159 return p->momentum();
173 return p->data().iCharge();
192 return p->momentum();
228 return p->data().iCharge();
247 return p->momentum();
261 return p->data().iCharge();
266 template <
typename T>
322 template <
typename T>
349 static int iCharge(
const T * p) {
363 static LorentzMomentum &
ref(LorentzMomentum & p) {
370 static const LorentzMomentum &
momentum(
const LorentzMomentum & p) {
377 static Energy mass(
const LorentzMomentum & p) {
400 p = LorentzMomentum(q, sqrt(q.
mag2() + p.
m2()));
413 static Lorentz5Momentum &
ref(Lorentz5Momentum & p) {
420 static const LorentzMomentum &
momentum(
const Lorentz5Momentum & p) {
427 static Energy mass(
const Lorentz5Momentum & p) {
441 static void set5Momentum(Lorentz5Momentum & p,
const Lorentz5Momentum & q) {
450 p = Lorentz5Momentum(p.
mass(), q);
465 template <
typename PType>
476 #ifndef ThePEG_TEMPLATES_IN_CC_FILE
static Energy mass(const PType &p)
Return the mass of particle p.
static PType & ref(PType &p)
Return a reference to the particle.
The Particle class is used to describe an instance of a particle.
Value m() const
Magnitude (signed) .
static void transform(PType &p, const LorentzRotation &r)
Perform a Lorentz transformation on particle p.
static void set3Momentum(PType &p, const Momentum3 &q)
Set the 3-momentum of a particle.
TraitsType is an empty, non-polymorphic, base class.
static int iCharge(const PType &p)
Return charge of particle p in units of e/3.
Value2 mag2() const
Squared magnitude .
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
This is the main namespace within which all identifiers in ThePEG are declared.
QTY< 0, 1, 0 >::Type Energy
Energy.
Value mass() const
Mass/invariant length component.
static void set5Momentum(PType &p, const Lorentz5Momentum &q)
Set the momentum and mass of a particle.
Lorentz5Vector & transform(const LorentzRotation &r)
Perform a Lorentz transformation.
static LorentzMomentum momentum(const PType &p)
Return the momentum of particle p.
Value2 m2() const
Squared magnitude .
ParticleTraits is a templated class defining a general interface to any particle class.
LorentzVector< Value > & transform(const SpinOneLorentzRotation &m)
Rotate the vector. Resets .