ROOTPWA
Public Types | Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
rpwa::particleDataTable Class Reference

#include <particleDataTable.h>

Public Types

typedef std::map< std::string,
particleProperties >
::const_iterator 
iterator

Static Public Member Functions

static particleDataTableinstance ()
 get singleton instance
static bool isInTable (const std::string &partName)
 returns, whether particle has a table entry
static const particlePropertiesentry (const std::string &partName, const bool warnIfNotExistent=true)
 access properties by particle name
static bool addEntry (const particleProperties &partProp)
 adds entry to particle data table
static std::vector< const
particleProperties * > 
entriesMatching (const particleProperties &prototype, const std::string &sel, const double minMass=0, const double minMassWidthFactor=0, const std::vector< std::string > &whiteList=std::vector< std::string >(), const std::vector< std::string > &blackList=std::vector< std::string >(), const particleProperties::decayMode &decay=particleProperties::decayMode(), const bool &forceDecayCheck=true)
 returns entries that have the same quantum numbers as prototype property; quantum numbers to be compared are selected by sel string; if minMass > 0 the isobar mass is limited; checks for allowed decays if they are defined; decay checks can be forced, then particles which have no specified decays will be discarded
static unsigned int nmbEntries ()
 returns number of entries in particle data table
static iterator begin ()
 returns iterator pointing at first entry of particle data table
static iterator end ()
 returns iterator pointing after last entry of particle data table
static std::ostream & print (std::ostream &out)
 prints particle data in human-readable form
static std::ostream & dump (std::ostream &out)
 dumps particle properties in format of data file
static bool readFile (const std::string &fileName="./particleDataTable.txt")
 reads in particle data from file
static bool read (std::istream &in)
 reads whitespace separated properties from stream
static bool readDecayModeFile (const std::string &fileName)
 reads in decay modes for list of particles from file; requires particle properties
static std::string particleNameFromGeantId (const int id)
static void geantIdAndChargeFromParticleName (const std::string &name, int &id, int &charge)
static unsigned int geantIdFromParticleName (const std::string &name)
static void clear ()
 deletes all entries in particle data table
static bool debug ()
 returns debug flag
static void setDebug (const bool debug=true)
 sets debug flag

Private Member Functions

 particleDataTable ()
 ~particleDataTable ()
 particleDataTable (const particleDataTable &)
particleDataTableoperator= (const particleDataTable &)

Static Private Attributes

static particleDataTable _instance
 singleton instance
static std::map< std::string,
particleProperties
_dataTable
 map with particle data
static boost::bimap
< std::string, unsigned int
_nameGeantIdMap = initNameGeantIdTranslator()
 bimap with translation particle name <> GeantId
static bool _debug = false
 if set to true, debug messages are printed

Detailed Description

Definition at line 55 of file particleDataTable.h.

Member Typedef Documentation

typedef std::map<std::string, particleProperties>::const_iterator rpwa::particleDataTable::iterator

Definition at line 80 of file particleDataTable.h.

Constructor & Destructor Documentation

rpwa::particleDataTable::particleDataTable ( )
inlineprivate

Definition at line 106 of file particleDataTable.h.

rpwa::particleDataTable::~particleDataTable ( )
inlineprivate

Definition at line 107 of file particleDataTable.h.

rpwa::particleDataTable::particleDataTable ( const particleDataTable )
private

Member Function Documentation

bool particleDataTable::addEntry ( const particleProperties partProp)
static

adds entry to particle data table

Definition at line 240 of file particleDataTable.cc.

References i, and rpwa::particleProperties::name().

static iterator rpwa::particleDataTable::begin ( )
inlinestatic

returns iterator pointing at first entry of particle data table

Definition at line 81 of file particleDataTable.h.

References _dataTable.

static void rpwa::particleDataTable::clear ( )
inlinestatic

deletes all entries in particle data table

Definition at line 98 of file particleDataTable.h.

References _dataTable.

static bool rpwa::particleDataTable::debug ( )
inlinestatic

returns debug flag

Definition at line 100 of file particleDataTable.h.

References _debug.

Referenced by setDebug().

ostream & particleDataTable::dump ( std::ostream &  out)
static

dumps particle properties in format of data file

Definition at line 273 of file particleDataTable.cc.

References i.

static iterator rpwa::particleDataTable::end ( )
inlinestatic

returns iterator pointing after last entry of particle data table

Definition at line 82 of file particleDataTable.h.

References _dataTable.

vector< const particleProperties * > particleDataTable::entriesMatching ( const particleProperties prototype,
const std::string &  sel,
const double  minMass = 0,
const double  minMassWidthFactor = 0,
const std::vector< std::string > &  whiteList = std::vector<std::string>(),
const std::vector< std::string > &  blackList = std::vector<std::string>(),
const particleProperties::decayMode decay = particleProperties::decayMode(),
const bool &  forceDecayCheck = true 
)
static

returns entries that have the same quantum numbers as prototype property; quantum numbers to be compared are selected by sel string; if minMass > 0 the isobar mass is limited; checks for allowed decays if they are defined; decay checks can be forced, then particles which have no specified decays will be discarded

Definition at line 165 of file particleDataTable.cc.

References rpwa::particleProperties::decayMode::_daughters, rpwa::particleProperties::bareName(), rpwa::particleProperties::hasDecay(), i, rpwa::particleProperties::mass(), rpwa::particleProperties::name(), rpwa::particleProperties::nmbDecays(), and rpwa::particleProperties::width().

Referenced by main().

const particleProperties * particleDataTable::entry ( const std::string &  partName,
const bool  warnIfNotExistent = true 
)
static
void particleDataTable::geantIdAndChargeFromParticleName ( const std::string &  name,
int id,
int charge 
)
static

Definition at line 113 of file particleDataTable.cc.

unsigned int particleDataTable::geantIdFromParticleName ( const std::string &  name)
static

Definition at line 132 of file particleDataTable.cc.

Referenced by rpwa::particleProperties::geantId().

static particleDataTable& rpwa::particleDataTable::instance ( )
inlinestatic
bool particleDataTable::isInTable ( const std::string &  partName)
static

returns, whether particle has a table entry

Definition at line 141 of file particleDataTable.cc.

Referenced by rpwa::getParticleMass(), and rpwa::piPiSWaveAuMorganPenningtonM::piPiSWaveAuMorganPenningtonM().

static unsigned int rpwa::particleDataTable::nmbEntries ( )
inlinestatic

returns number of entries in particle data table

Definition at line 78 of file particleDataTable.h.

References _dataTable.

particleDataTable& rpwa::particleDataTable::operator= ( const particleDataTable )
private
string particleDataTable::particleNameFromGeantId ( const int  id)
static

Definition at line 100 of file particleDataTable.cc.

ostream & particleDataTable::print ( std::ostream &  out)
static

prints particle data in human-readable form

Definition at line 261 of file particleDataTable.cc.

References i.

Referenced by rpwa::operator<<().

bool particleDataTable::read ( std::istream &  in)
static

reads whitespace separated properties from stream

Definition at line 297 of file particleDataTable.cc.

References rpwa::particleProperties::antiPartProperties(), and rpwa::particleProperties::isItsOwnAntiPart().

Referenced by rpwa::operator>>().

bool particleDataTable::readDecayModeFile ( const std::string &  fileName)
static

reads in decay modes for list of particles from file; requires particle properties

Definition at line 323 of file particleDataTable.cc.

References rpwa::particleProperties::decayMode::_L, rpwa::particleProperties::decayMode::_S, rpwa::particleProperties::addDecayMode(), and root.

Referenced by main().

bool particleDataTable::readFile ( const std::string &  fileName = "./particleDataTable.txt")
static

reads in particle data from file

Definition at line 284 of file particleDataTable.cc.

Referenced by convertTreeToEvt(), main(), and ReadoutTestKeyfile().

static void rpwa::particleDataTable::setDebug ( const bool  debug = true)
inlinestatic

sets debug flag

Definition at line 101 of file particleDataTable.h.

References _debug, and debug().

Member Data Documentation

map< string, particleProperties > particleDataTable::_dataTable
staticprivate

map with particle data

Definition at line 112 of file particleDataTable.h.

Referenced by begin(), clear(), end(), and nmbEntries().

bool particleDataTable::_debug = false
staticprivate

if set to true, debug messages are printed

Definition at line 116 of file particleDataTable.h.

Referenced by debug(), and setDebug().

particleDataTable particleDataTable::_instance
staticprivate

singleton instance

Definition at line 111 of file particleDataTable.h.

Referenced by instance().

nameGeantIdBimap particleDataTable::_nameGeantIdMap = initNameGeantIdTranslator()
staticprivate

bimap with translation particle name <> GeantId

Definition at line 114 of file particleDataTable.h.


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