9 #ifndef ThePEG_ParticleData_H
10 #define ThePEG_ParticleData_H
13 #include "ThePEG/Config/ThePEG.h"
14 #include "ThePEG/PDT/PDT.h"
15 #include "ThePEG/PDT/PID.h"
16 #include "ThePEG/Vectors/LorentzVector.h"
17 #include "ThePEG/Vectors/ThreeVector.h"
18 #include "ThePEG/Interface/Interfaced.h"
19 #include "ThePEG/Utilities/Selector.h"
20 #include "ThePEG/PDT/WidthGenerator.h"
21 #include "ThePEG/PDT/MassGenerator.h"
22 #include "ThePEG/PDT/DecayMode.fh"
23 #include "ThePEG/Utilities/ClassTraits.h"
24 #include "ThePEG/Utilities/ClassDescription.h"
78 static PDPair Create(
PID newId,
const string & newPDGName,
const string & newAntiPDGName);
372 void synchronized(
bool sync);
892 struct ClassTraits<ParticleData>:
public ClassTraitsBase<ParticleData> {
894 static string className() {
return "ThePEG::ParticleData"; }
AngularMomentum spin() const
Get the spin.The spin is returned in standard units.
bool hasAntiColour() const
Return true if anti coloured or colour-octet.
Energy getWidth() const
Utility function for the interface.
static PDPtr Create(PID newId, const string &newPDGName)
Create a Particle which is its own anti-particle.
Energy theWidthLoCut
Lower width cut.
PID is a helper class implementing the type of PDG particle ids.
PersistentIStream is used to read persistent objects from a stream where they were previously written...
bool coloured() const
Return true if coloured.
void setStable(long)
Utility function for the interface.
PID theId
Id number according to the STDHEP/PDG standard.
Energy theMass
Nominal mass.
const DecaySelector & decaySelector() const
Return the nominal decay selector for this particle.
int getCharge() const
Utility function for the interface.
Charge
Definition of enumerated values used for charge information.
The Particle class is used to describe an instance of a particle.
void setMass(Energy)
Utility function for the interface.
ClassTraitsType is an empty, non-polymorphic, base class.
Length getCTau() const
Utility function for the interface.
const QTY< 1, 1, 0 >::Type hbar_Planck
Planck's constant (PDG 2006 value 197.326968(17) MeV fm)
Energy widthLoCut() const
Get the lower width cut.
long getColour() const
Utility function for the interface.
static bool coloured(Colour c)
True if the argument corresponds to a non-zero colour charge.
static bool charged(Charge c)
True if the argument corresponds to a non-zero charge.
void removeDecayMode(tDMPtr)
Remove a decay mode for this particle.
DecaySet theDecayModes
The set of all decay modes.
DecaySelector theDecaySelector
A selector of decay modes weighted by the nominal branching ratios.
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
virtual void doinitrun()
Initialize this object.
PDT::Charge theDefCharge
Helper variable to keep track of the default charge.
tDMPtr selectMode(Particle &p) const
Selects a decay mode randomly according to the branching ratios.
PDT::Colour iColour() const
Get the colour of the particle in units of PDT::Colour.
string doSync(string)
Utility function for the interface.
Colour
Definition of enumerated values used for colour information.
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
const string & genericName() const
Return the generic PDG name.
Energy getLoCut() const
Utility function for the interface.
PDT::Spin iSpin() const
Get the spin.
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Repository inherits from the BaseRepository class.
Energy defWidth() const
Utility function for the interface.
Rebinder is a class associating pairs of pointers to objects.
virtual Energy constituentMass() const
Return the constituent mass of this particle if relevant.
void insDecayModes(DMPtr dm, int)
Utility function for the interface.
This is the main namespace within which all identifiers in ThePEG are declared.
Length theDefCTau
Helper variable to keep track of the default lifetime.
bool negative() const
Return true if negatively charged.
bool syncAnti
If syncAnti is true all changes to this object will be transfered to the antiParticle.
Energy massMax() const
Return the maximum possible mass of this particle type.
virtual void rebind(const TranslationMap &trans)
Rebind pointer to other Interfaced objects.
virtual ~ParticleData()
Destructor.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
Energy defMass() const
Utility function for the interface.
Length cTau() const
Get the life time cTau cTau.
int defCharge() const
Utility function for the interface.
bool charged() const
Return true if charged.
void delDecayModes(int i)
Utility function for the interface.
bool variableRatio() const
Return true if the branching ratio should vary with the mass of the Particle instance.
tWidthGeneratorPtr widthGenerator() const
Get the width generator object.
ParticleData inherits from InterfacedBase and represents the properties of a particle type...
void synchronize()
If there is an anti-partner, update this object to have correct anti-properties.
void setCut(Energy)
Utility function for the interface.
PDT::Spin theSpin
2 times the spin plus one.
void setColour(long)
Utility function for the interface.
bool hasColour(bool anti=false) const
Return true if (anti) coloured or colour-octet.
const Length MaxLength
A really large length.
PPtr produceParticle(const Lorentz5Momentum &) const
Produce a particle specifying momentum.
bool isStable
True if the particle is considered stable.
virtual void readSetup(istream &is)
Read setup info from a standard stream.
string thePDGName
Name and Id number according to the STDHEP/PDG standard.
QTY< 0, 1, 0 >::Type Energy
Energy.
tMassGenPtr massGenerator() const
Get the mass generator object.
PDT::Spin theDefSpin
Helper variable to keep track of the default spin.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
static ClassDescription< ParticleData > initParticleData
Describe a concrete class with persistent data.
PDT::Charge iCharge() const
Get the charge.
void setWidthGenerator(WidthGeneratorPtr)
Utility function for the interface.
Selector< tDMPtr > DecaySelector
A selector of DecayMode objects.
Spin
Definition of enumerated values used for spin information.
Energy getUpCut() const
Utility function for the interface.
long defColour() const
Utility function for the interface.
QTY< 1, 0, 0 >::Type Length
Length.
Energy theDefCut
Helper variable to keep track of the default width cut.
bool stable() const
Return true if particle is to be considered stable.
void addDecayMode(tDMPtr)
Add a decay mode for this particle.
int defSpin() const
Utility function for the interface.
pair< PDPtr, PDPtr > PDPair
A pair of pointers to ParticleData objects.
vector< DMPtr > getDecayModes() const
Utility function for the interface.
Energy mass() const
Return the nominal mass.
static bool negative(Charge c)
True if the argument corresponds to a negative charge.
const DecaySet & decayModes() const
Access all the decay modes, including those which are switched off, or have zero branching ratio...
void setSync(long)
Utility function for the interface.
RCPtr is a reference counted (smart) pointer.
PDT::Charge theCharge
Three times the charge.
string ssetCharge(string)
Utility function for the interface.
bool positive() const
Return true if positively charged.
const ZeroUnit ZERO
ZERO can be used as zero for any unitful quantity.
const string & PDGName() const
Return the generic PDG name.
Charge charge() const
Get the charge.
void setWidth(Energy)
Utility function for the interface.
The Interfaced class is derived from the InterfacedBase class adding a couple of things particular to...
long getSync() const
Utility function for the interface.
void setCTau(Length)
Utility function for the interface.
Energy generateMass() const
Generate a mass for an instance of this particle type.
PDT::Colour theDefColour
Helper variable to keep track of the default colour.
void setMassGenerator(MassGenPtr)
Utility function for the interface.
static bool positive(Charge c)
True if the argument corresponds to a positive charge.
Energy theWidthUpCut
Upper width cut.
Length generateLifeTime(Energy mass, Energy width) const
Generate a mass for an instance of this particle type.
static void antiSetup(const PDPair &pap)
Used by subclasses or by the Create method to setup anti-relationship.
tPDPtr CC() const
Get the pointer to the corresponding anti partner.
int getSpin() const
Utility function for the interface.
Length defCTau() const
Utility function for the interface.
PDT::Colour theColour
The colour for this particle.
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
void setLoCut(Energy)
Utility function for the interface.
Energy theDefMass
Helper variable to keep track of the default mass.
Energy defCut() const
Utility function for the interface.
ParticleData()
Default constructor.
string doSelectDecayModes(string)
Utility function for the interface.
The DecayMode class describes a decay channel of a particle.
void setUpCut(Energy)
Utility function for the interface.
long id() const
Return the PDG id number.
string doPrintDecayModes(string)
Utility function for the interface.
void setSpin(int)
Utility function for the interface.
long getStable() const
Utility function for the interface.
Energy width() const
Get the width.
static string className()
Return the name of class T.
void setVariableRatio(long)
Utility function for the interface.
This template class allows the compiler to check calculations with physical quantities for dimensiona...
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Energy generateWidth(Energy mass) const
Generate a width for an instance of this particle type.
long getVariableRatio() const
Utility function for the interface.
virtual IBPtr clone() const
Make a simple clone of this object.
vector< IBPtr > IVector
A vector of pointers to InterfacedBase objects.
MassGenPtr theMassGenerator
A pointer to an object capable to generate a mass for a particle of this type.
Energy massMin() const
Return the minimum possible mass of this particle type.
bool theVariableRatio
Determine whether the branching fractions are allowed to change on a particle-by-particle basis...
void setCharge(int)
Utility function for the interface.
Energy theDefWidth
Helper variable to keep track of the default width.
virtual IVector getReferences()
Return a vector of all pointers to Interfaced objects used in this object.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
BaseClassTraits describes the base classes of the templated class.
Energy widthCut(Energy wci)
Set the width cut.
virtual PDPtr pdclone() const
Special clone function used by the Repository.
tPDPtr theAntiPartner
Pointer to the object corresponding to the antiparticle.
WidthGeneratorPtr theWidthGenerator
A pointer to an object capable to generate the branching fractions for different decay modes for this...
Energy widthUpCut() const
Get the upper width cut.
The EventGenerator class manages a whole event generator run.
Energy getCut() const
Utility function for the interface.
virtual void doupdate()
Check sanity of the object during the setup phase.
const Energy MaxEnergy
A really large energy.
Energy widthCut() const
Get the width cut.
const QTY< 1, 1, 0 >::Type hbarc
Planck's constant times c (PDG 2006 value 197.326968(17) MeV fm)