|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
#include <PoPI.hpp>
Public Member Functions | |
| Database () | |
| Database (std::string const &a_fileName) | |
| Database (HAPI::Node const &a_database) | |
| ~Database () | |
| LUPI::FormatVersion const & | formatVersion (void) const |
| std::string const & | name (void) const |
| std::string const & | version (void) const |
| std::vector< Alias * > | unresolvedAliases () |
| std::size_t | numberOfUnresolvedAliases () |
| std::vector< std::string > | unresolvedAliasIds () const |
| std::vector< Alias * > & | aliases () |
| void | addFile (char const *a_fileName, bool a_warnIfDuplicate) |
| void | addFile (std::string const &a_fileName, bool a_warnIfDuplicate) |
| void | addDatabase (std::string const &a_string, bool a_warnIfDuplicate) |
| void | addDatabase (HAPI::Node const &a_database, bool a_warnIfDuplicate) |
| void | addAlias (Alias *a_alias) |
| std::string::size_type | size (void) const |
| ParticleList const & | list () |
| SymbolList const & | symbolList () |
| std::size_t | operator[] (std::string const &a_id) const |
| template<typename T> | |
| T const & | get (std::string const &a_id) const |
| template<typename T> | |
| T const & | get (std::size_t a_index) const |
| Particle const & | particle (std::string const &a_id) const |
| Particle const & | particle (std::size_t a_index) const |
| IDBase const & | idBase (std::string const &a_id) const |
| IDBase const & | idBase (std::size_t &a_index) const |
| ParticleList const & | particleList () const |
| SymbolList | symbolList () const |
| bool | exists (std::string const &a_id) const |
| bool | exists (std::size_t a_index) const |
| bool | existsIntid (int a_intid) const |
| Suite< ChemicalElement, Database > const & | chemicalElements () const |
| bool | isParticle (std::string const &a_id) const |
| bool | isParticle (std::size_t a_index) const |
| bool | isAlias (std::string const &a_id) const |
| bool | isAlias (std::size_t a_index) const |
| bool | isMetaStableAlias (std::string const &a_id) const |
| bool | isMetaStableAlias (std::size_t a_index) const |
| std::vector< std::string > | aliasReferences (std::string const &a_id) |
| std::string | final (std::string const &a_id, bool a_returnAtMetaStableAlias=false) const |
| std::size_t | final (std::size_t a_index, bool a_returnAtMetaStableAlias=false) const |
| std::string | chemicalElementSymbol (std::string const &a_id) const |
| std::string | isotopeSymbol (std::string const &a_id) const |
| int | intid (std::string const &a_id) const |
| int | intid (std::size_t a_index) const |
| std::size_t | indexFromIntid (int a_intid) const |
| std::size_t | add (Base *a_item) |
| std::size_t | addSymbol (SymbolBase *a_item) |
| void | calculateNuclideGammaBranchStateInfos (NuclideGammaBranchStateInfos &a_nuclideGammaBranchStateInfos, Database const *a_pops2, std::vector< std::string > &a_extraGammaBranchStates) const |
| void | calculateNuclideGammaBranchStateInfos2 (NuclideGammaBranchStateInfos &a_nuclideGammaBranchStateInfos) const |
| double | massValue (std::string const &a_id, std::string const &a_unit) const |
| void | saveAs (std::string const &a_fileName) const |
| void | toXMLList (std::vector< std::string > &a_XMLList, std::string const &a_indent1) const |
| void | print (bool a_printIndices) |
| template<typename T> | |
| T const & | get (std::size_t a_index) const |
| template<typename T> | |
| T const & | get (std::string const &a_id) const |
| PoPI::Database::Database | ( | ) |
Database constructor for an initial empty PoPs database.
Definition at line 37 of file PoPI_database.cc.
Referenced by calculateNuclideGammaBranchStateInfos().
| PoPI::Database::Database | ( | std::string const & | a_fileName | ) |
Database constructor for a PoPs database with data read from the file a_fileName.
| a_fileName | [in] The PoPs file to read in. |
Definition at line 52 of file PoPI_database.cc.
| PoPI::Database::Database | ( | HAPI::Node const & | a_database | ) |
Database constructor for a PoPs database with data read from a HAPI::Node instance. This method is mainly for internal use.
| a_database | [in] A HAPI::Node instance containing the data to parse. |
Definition at line 69 of file PoPI_database.cc.
| PoPI::Database::~Database | ( | ) |
Destructor for a PoPI::Database instance.
Definition at line 215 of file PoPI_database.cc.
| std::size_t PoPI::Database::add | ( | Base * | a_item | ) |
This method adds a PoPI::Base instance to this and returns the unique index for it.
| a_item | [in] The PoPI::Base instance to add to this. |
Definition at line 493 of file PoPI_database.cc.
Referenced by addSymbol(), and PoPI::IDBase::addToDatabase().
|
inline |
| void PoPI::Database::addDatabase | ( | HAPI::Node const & | a_database, |
| bool | a_warnIfDuplicate ) |
| void PoPI::Database::addDatabase | ( | std::string const & | a_string, |
| bool | a_warnIfDuplicate ) |
Adds the contents of the a_string to this. a_string must be an XML string starting with an PoPs XML node (i.e., element).
| a_string | [in] A std::string instance of PoPs data in an XML format. |
| a_warnIfDuplicate | [in] This argument is currently not used. |
Definition at line 114 of file PoPI_database.cc.
Referenced by addDatabase(), addFile(), and Database().
| void PoPI::Database::addFile | ( | char const * | a_fileName, |
| bool | a_warnIfDuplicate ) |
Adds the contents of the file a_fileName to this.
| a_fileName | [in] The PoPs file to get data from. |
| a_warnIfDuplicate | [in] This argument is currently not used. |
Definition at line 98 of file PoPI_database.cc.
Referenced by addFile(), and Database().
| void PoPI::Database::addFile | ( | std::string const & | a_fileName, |
| bool | a_warnIfDuplicate ) |
Adds the contents of the file a_fileName to this.
| a_fileName | [in] The PoPs file to get data from. |
| a_warnIfDuplicate | [in] This argument is currently not used. |
Definition at line 86 of file PoPI_database.cc.
| std::size_t PoPI::Database::addSymbol | ( | SymbolBase * | a_item | ) |
This method adds a PoPI::SymbolBase instance to this and returns the unique index for it.
| a_item | [in] The PoPI::SymbolBase instance to add to this. |
Definition at line 516 of file PoPI_database.cc.
Referenced by PoPI::SymbolBase::addToSymbols().
|
inline |
| std::vector< std::string > PoPI::Database::aliasReferences | ( | std::string const & | a_id | ) |
Returns a std::vector of std::string's of all aliases in this that resolve to a_id.
| a_id | [in] A particle's id whose. |
Definition at line 307 of file PoPI_database.cc.
| void PoPI::Database::calculateNuclideGammaBranchStateInfos | ( | NuclideGammaBranchStateInfos & | a_nuclideGammaBranchStateInfos, |
| Database const * | a_pops2, | ||
| std::vector< std::string > & | a_extraGammaBranchStates ) const |
This method calculates nuclide gamma branching infomation and adds it to a_nuclideGammaBranchStateInfos.
| a_nuclideGammaBranchStateInfos | [in] The NuclideGammaBranchStateInfos instance to added nuclide gamma branching infomation to. |
| a_pops2 | A second PoPs used for storing GRIN added particles. |
| a_extraGammaBranchStates | Any additional nuclide needed by GRIN. Currently, one the capture residual. |
Definition at line 537 of file PoPI_database.cc.
| void PoPI::Database::calculateNuclideGammaBranchStateInfos2 | ( | NuclideGammaBranchStateInfos & | a_nuclideGammaBranchStateInfos | ) | const |
This method calculates nuclide gamma branching infomation and adds it to a_nuclideGammaBranchStateInfos.
| a_nuclideGammaBranchStateInfos | [in] The NuclideGammaBranchStateInfos instance to added nuclide gamma branching infomation to. |
Definition at line 564 of file PoPI_database.cc.
Referenced by calculateNuclideGammaBranchStateInfos().
|
inline |
| std::string PoPI::Database::chemicalElementSymbol | ( | std::string const & | a_id | ) | const |
This method returns the chemical element symbol for a_id if it is a PoPs id for a chemicalElement, isotope, nuclide, or nucleus object. Otherwise, it returns an empty string. The PoPs id a_id must be in this.
| a_id | [in] A particle's id whose chemical element symbol is requested. |
Definition at line 365 of file PoPI_database.cc.
| bool PoPI::Database::exists | ( | std::size_t | a_index | ) | const |
Returns true if the specified index is value and false otherwise. This is, if a particle exists within this with index a_index.
| a_index | [in] A particle index to test. |
Definition at line 266 of file PoPI_database.cc.
| bool PoPI::Database::exists | ( | std::string const & | a_id | ) | const |
Returns true if the specified id exists within this and false otherwise.
| a_id | [in] A particle id to test. |
Definition at line 280 of file PoPI_database.cc.
Referenced by intid(), intid(), MCGIDI::MCGIDI_popsIndex(), GIDI::ParticleInfo::ParticleInfo(), and GIDI::Map::Map::replacementTarget().
| bool PoPI::Database::existsIntid | ( | int | a_intid | ) | const |
Returns true if the specified intid exists within this and false otherwise.
| a_intid | [in] A particle's intidd to test. |
Definition at line 294 of file PoPI_database.cc.
| std::size_t PoPI::Database::final | ( | std::size_t | a_index, |
| bool | a_returnAtMetaStableAlias = false ) const |
This method resolves aliases to return an actual particle specified by a_index. That is, if a_index is an alias, then its referenced particle is returned. However, if a_returnAtMetaStableAlias is true and a meta-stable is found while resolving a_index, the then meta-stable index will be returned.
| a_index | [in] A particle's index whose resolved particle index is requested. |
| a_returnAtMetaStableAlias | [in] If true, the resolving will stop if a meta-stable is found. |
Definition at line 347 of file PoPI_database.cc.
| std::string PoPI::Database::final | ( | std::string const & | a_id, |
| bool | a_returnAtMetaStableAlias = false ) const |
This method resolves aliases to return an actual particle specified by a_id. That is, if a_id is an alias, then its referenced particle is returned. However, if a_returnAtMetaStableAlias is true and a meta-stable is found while resolving a_id, then the meta-stable id will be returned.
| a_id | [in] A particle's id whose resolved particle id is requested. |
| a_returnAtMetaStableAlias | [in] If true, the resolving will stop if a meta-stable is found. |
Definition at line 329 of file PoPI_database.cc.
Referenced by PoPI::particleA(), PoPI::particleA(), PoPI::particleMetaStableIndex(), PoPI::particleMetaStableIndex(), PoPI::particleZ(), PoPI::particleZ(), PoPI::particleZA(), PoPI::particleZA(), and GIDI::Map::Map::replacementTarget().
|
inline |
| T const & PoPI::Database::get | ( | std::size_t | a_index | ) | const |
Returns the partile in this that has index a_index.
| a_index | [in] The index of the particle to return. |
Definition at line 1233 of file PoPI.hpp.
| T const & PoPI::Database::get | ( | std::size_t | a_index | ) | const |
| T const & PoPI::Database::get | ( | std::string const & | a_id | ) | const |
Returns the partile in this that has index a_index.
| a_id | [in] The PoPs id of the particle to return. |
| T const & PoPI::Database::get | ( | std::string const & | a_id | ) | const |
Referenced by PoPI::DecayMode::calculateNuclideGammaBranchStateInfo(), PoPI::GammaDecayData::calculateNuclideGammaBranchStateInfo(), calculateNuclideGammaBranchStateInfos(), G4GIDI_target::G4GIDI_target(), MCGIDI::GRIN_captureToCompound::GRIN_captureToCompound(), GIDI::GRIN::GRIN_continuumGammas::GRIN_continuumGammas(), MCGIDI::GRIN_levelsAndProbabilities::GRIN_levelsAndProbabilities(), idBase(), idBase(), intid(), intid(), isAlias(), isMetaStableAlias(), isParticle(), particle(), particle(), PoPI::particleA(), PoPI::particleA(), GIDI::ParticleInfo::ParticleInfo(), PoPI::particleMetaStableIndex(), PoPI::particleMetaStableIndex(), PoPI::particleZ(), PoPI::particleZ(), PoPI::particleZA(), PoPI::particleZA(), print(), GIDI::Map::Protare::Protare(), and GIDI::Map::Map::replacementTarget().
|
inline |
|
inline |
| std::size_t PoPI::Database::indexFromIntid | ( | int | a_intid | ) | const |
Returns the index for particle with intid a_intid or -1 if a_intid is not in this.
| a_index | [in] A particle's index whose index is requested. |
Definition at line 475 of file PoPI_database.cc.
| int PoPI::Database::intid | ( | std::size_t | a_index | ) | const |
Returns the intid for particle with index a_index or -1 if a_index is not in this.
| a_index | [in] A particle's index whose index is requested. |
Definition at line 451 of file PoPI_database.cc.
| int PoPI::Database::intid | ( | std::string const & | a_id | ) | const |
Returns the intid for particle a_id or -1 if a_id is not in this.
| a_id | [in] A particle's id whose intid is requested. |
Definition at line 431 of file PoPI_database.cc.
Referenced by MCGIDI::MCGIDI_popsIntid().
|
inline |
|
inline |
|
inline |
Returns true if a_index is a meta-stable and false otherwise.
Definition at line 1198 of file PoPI.hpp.
Referenced by isMetaStableAlias().
|
inline |
Returns true if a_id is a meta-stable and false otherwise.
Definition at line 1196 of file PoPI.hpp.
Referenced by final(), and isMetaStableAlias().
| std::string PoPI::Database::isotopeSymbol | ( | std::string const & | a_id | ) | const |
This method returns the isotope symbol for a_id if it is a PoPs id for an isotope, nuclide, or nucleus object. Otherwise, it returns an empty string. The PoPs id a_id must be in this.
| a_id | [in] A particle's id whose isotope symbol is requested. |
Definition at line 399 of file PoPI_database.cc.
|
inline |
Returns true if a_index is a particle and false otherwise.
Definition at line 1193 of file PoPI.hpp.
Referenced by isParticle().
|
inline |
Returns true if a_id is a particle and false otherwise.
Definition at line 1192 of file PoPI.hpp.
Referenced by isParticle(), and GIDI::Map::Map::replacementTarget().
|
inline |
| double PoPI::Database::massValue | ( | std::string const & | a_id, |
| std::string const & | a_unit ) const |
This method returns the mass of the particle/alias with id a_id. Currently, a_unit is ignored and the mass is returned in unit of amu.
| a_id | [in] The PoPs id of the particle/alias.file to write this to. |
| a_unit | [in] The unit of the returned mass. |
Definition at line 581 of file PoPI_database.cc.
|
inline |
|
inline |
| std::size_t PoPI::Database::operator[] | ( | std::string const & | a_id | ) | const |
Internally, PoPI::Database stores a unique integer (called an index) for each particle in this. This method returns the the index for the specified particle.
| a_id | [in] The PoPs id for the specified particle. |
Definition at line 246 of file PoPI_database.cc.
|
inline |
|
inline |
Returns a const reference to the particle with id a_id.
Definition at line 1178 of file PoPI.hpp.
Referenced by get(), get(), massValue(), print(), and GIDI::Map::Map::replacementTarget().
|
inline |
| void PoPI::Database::print | ( | bool | a_printIndices | ) |
Prints a brief outline of the contents of this.
| a_printIndices | [in] If true, each particles index is also printed. |
Definition at line 647 of file PoPI_database.cc.
| void PoPI::Database::saveAs | ( | std::string const & | a_fileName | ) | const |
Writes an XML version of this to the file a_fileName.
| a_fileName | [in] The file to write this to. |
Definition at line 594 of file PoPI_database.cc.
|
inline |
|
inline |
|
inline |
| void PoPI::Database::toXMLList | ( | std::vector< std::string > & | a_XMLList, |
| std::string const & | a_indent1 ) const |
Adds the contents of this to a_XMLList where each item in a_XMLList is one line (without linefeeds) to output as an XML representation of this.
| a_XMLList | [in] The list to add an XML output representation of this to. |
| a_indent1 | [in] The amount of indentation to added to each line added to a_XMLList. |
Definition at line 617 of file PoPI_database.cc.
Referenced by saveAs().
|
inline |
| std::vector< std::string > PoPI::Database::unresolvedAliasIds | ( | ) | const |
This method returns the list of ids for the aliases with unresolved pids.
Definition at line 226 of file PoPI_database.cc.
|
inline |