YAP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Attributes | List of all members
ParticleFactory Class Reference

Factory class for easy creation of Particle objects from PDG codes. More...

#include <ParticleFactory.h>

Public Types

using value_type = ParticleTableEntry
 
using iterator = ParticleTableMap::iterator
 

Public Member Functions

std::shared_ptr
< FinalStateParticle
fsp (int PDG) const
 
std::shared_ptr< DecayingParticledecayingParticle (int PDG, double radialSize, std::shared_ptr< PhaseSpaceFactorFactory > phsp_factory=DefaultPHSPFactory) const
 
std::shared_ptr< Resonanceresonance (int PDG, double radialSize, std::shared_ptr< MassShape > massShape, std::shared_ptr< PhaseSpaceFactorFactory > phsp_factory=DefaultPHSPFactory) const
 
ParticleFactoryoperator+= (const ParticleFactory &rhs)
 

Private Attributes

ParticleTableMap ParticleTable_
 maps PDGCodes to ParticleTableEntry's
 

Particle table access

const ParticleTableEntryoperator[] (int PDG) const
 
const ParticleTableEntryoperator[] (std::string name) const
 
const QuantumNumbersquantumNumbers (int PDG) const
 
const QuantumNumbersquantumNumbers (std::string name) const
 
std::pair
< ParticleTableMap::iterator,
bool > 
insert (const ParticleTableEntry &entry)
 
ParticleTableMap::iterator insert (ParticleTableMap::iterator hint, const ParticleTableEntry &entry)
 convenience function to allow inserter() to be used in the std::copy algorithm
 
int pdgCode (std::string name) const
 
std::insert_iterator
< ParticleFactory
inserter (ParticleFactory &F)
 #ParticleFactory's own inserter
 

Detailed Description

Factory class for easy creation of Particle objects from PDG codes.

Author
Johannes Rauch, Daniel Greenwald

Member Typedef Documentation

Define this to allow std::inserter to use insert

Define this to allow std::inserter to use insert

Member Function Documentation

std::shared_ptr< DecayingParticle > decayingParticle ( int  PDG,
double  radialSize,
std::shared_ptr< PhaseSpaceFactorFactory phsp_factory = DefaultPHSPFactory 
) const

Create an decayingParticle from a PDG code

Parameters
PDGPDG code of particle to create
radialSizeradial size of particle to create [GeV^-1]
Returns
shared pointer to new DecayingParticle object
std::shared_ptr< FinalStateParticle > fsp ( int  PDG) const

Create a FinalStateParticle from a PDG code

Parameters
PDGPDG code of particle to create
Returns
shared pointer to new final state particle
std::pair< ParticleTableMap::iterator, bool > insert ( const ParticleTableEntry entry)

inserts the pair ParticleTableEntry::PDG and ParticleTableEntry to ParticleTable_

Parameters
entrya A ParticleTableEntry to add to ParticleTable_
ParticleFactory & operator+= ( const ParticleFactory rhs)

Adds content of rhs to this

Parameters
rhsParticleFactory to add into this
const ParticleTableEntry & operator[] ( int  PDG) const

get ParticleTableEntry from ParticleTable_ with safety checks

Parameters
PDGpdg code labeling particle table entry
const ParticleTableEntry& operator[] ( std::string  name) const
inline

get ParticleTableEntry from ParticleTable_ with safety checks

Parameters
nameName of particle in table
const QuantumNumbers& quantumNumbers ( int  PDG) const
inline

get #QuantumNumbers from ParticleTable_ with safety checks

Parameters
PDGpdg code labeling particle table entry
const QuantumNumbers& quantumNumbers ( std::string  name) const
inline

get #QuantumNumbers from ParticleTable_ with safety checks

Parameters
nameName of particle in table
std::shared_ptr< Resonance > resonance ( int  PDG,
double  radialSize,
std::shared_ptr< MassShape massShape,
std::shared_ptr< PhaseSpaceFactorFactory phsp_factory = DefaultPHSPFactory 
) const

Create a Resonance from a PDG code and a MassShape

Parameters
PDGPDG code of particle to create
radialSizeRadial size of particle to create [GeV^-1]
massShapePointer to MassShape object describing resonance
Returns
shared pointer to new Resonance object

The documentation for this class was generated from the following files: