Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
PoPI::ChemicalElement Class Reference

#include <PoPI.hpp>

Inheritance diagram for PoPI::ChemicalElement:

Public Member Functions

 ChemicalElement (HAPI::Node const &a_node, Database *a_DB, Database *a_parent)
virtual ~ChemicalElement ()
int Z (void) const
std::string const & name (void) const
Suite< Isotope, ChemicalElement > const & isotopes () const
void calculateNuclideGammaBranchStateInfos (PoPI::Database const &a_pops, NuclideGammaBranchStateInfos &a_nuclideGammaBranchStateInfos) const
void toXMLList (std::vector< std::string > &a_XMLList, std::string const &a_indent1) const
Public Member Functions inherited from PoPI::SymbolBase
 SymbolBase (HAPI::Node const &a_node, Particle_class a_class)
 ~SymbolBase ()
std::string const & symbol () const
std::size_t addToSymbols (Database *a_DB)
bool isParticle () const
Public Member Functions inherited from PoPI::Base
 Base (std::string const &a_id, Particle_class a_class)
 Base (HAPI::Node const &a_node, std::string const &a_label, Particle_class a_class)
virtual ~Base ()
std::string const & ID (void) const
std::size_t index (void) const
void setIndex (std::size_t a_index)
int intid () const
Particle_class Class (void) const
bool isAlias (void) const
bool isMetaStableAlias (void) const
bool isGaugeBoson () const
bool isLepton () const
bool isBaryon () const
bool isUnorthodox () const
bool isNucleus () const
bool isNuclide () const
bool isIsotope () const
bool isChemicalElement () const

Additional Inherited Members

Public Attributes inherited from PoPI::Base
friend MetaStable
friend Alias
friend Baryon
friend GaugeBoson
friend Lepton
friend Nucleus
friend Nuclide
friend Unorthodox

Detailed Description

This class represents a PoPs chemicalElement instance.

Definition at line 1060 of file PoPI.hpp.

Constructor & Destructor Documentation

◆ ChemicalElement()

PoPI::ChemicalElement::ChemicalElement ( HAPI::Node const & a_node,
Database * a_DB,
Database * a_parent )

◆ ~ChemicalElement()

PoPI::ChemicalElement::~ChemicalElement ( )
virtual

Definition at line 62 of file PoPI_chemicalElement.cc.

62 {
63
64}

Referenced by ~ChemicalElement().

Member Function Documentation

◆ calculateNuclideGammaBranchStateInfos()

void PoPI::ChemicalElement::calculateNuclideGammaBranchStateInfos ( PoPI::Database const & a_pops,
NuclideGammaBranchStateInfos & a_nuclideGammaBranchStateInfos ) const

Definition at line 69 of file PoPI_chemicalElement.cc.

69 {
70
71 for( std::size_t i1 = 0; i1 < m_isotopes.size( ); ++i1 ) {
72 Isotope const &isotope = m_isotopes[i1];
73
74 isotope.calculateNuclideGammaBranchStateInfos( a_pops, a_nuclideGammaBranchStateInfos );
75 }
76}

Referenced by calculateNuclideGammaBranchStateInfos(), and PoPI::Database::calculateNuclideGammaBranchStateInfos2().

◆ isotopes()

Suite< Isotope, ChemicalElement > const & PoPI::ChemicalElement::isotopes ( ) const
inline

Returns a const reference to the m_isotopes member.

Definition at line 1074 of file PoPI.hpp.

◆ name()

std::string const & PoPI::ChemicalElement::name ( void ) const
inline

Returns the value of the m_name member.

Definition at line 1072 of file PoPI.hpp.

◆ toXMLList()

void PoPI::ChemicalElement::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.

Parameters
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 85 of file PoPI_chemicalElement.cc.

85 {
86
87 std::string::size_type size = m_isotopes.size( );
88 std::string ZStr = LUPI::Misc::argumentsToString( "%d", m_Z );
89
90 if( size == 0 ) return;
91
92 std::string header = a_indent1 + "<chemicalElement symbol=\"" + symbol( ) + "\" Z=\"" + ZStr + "\" name=\"" + m_name + "\">";
93 a_XMLList.push_back( std::move( header ) );
94
95 std::string indent2 = a_indent1 + " ";
96 std::string isotopeSuite = indent2 + "<" + PoPI_isotopesChars + ">";
97 a_XMLList.push_back( std::move( isotopeSuite ) );
98
99 std::string indent3 = indent2 + " ";
100 for( std::string::size_type i1 = 0; i1 < size; ++i1 ) m_isotopes[i1].toXMLList( a_XMLList, indent3 );
101
102 appendXMLEnd( a_XMLList, PoPI_isotopesChars );
104}
#define PoPI_isotopesChars
Definition PoPI.hpp:43
#define PoPI_chemicalElementChars
Definition PoPI.hpp:42
void toXMLList(std::vector< std::string > &a_XMLList, std::string const &a_indent1) const
std::string const & symbol() const
Definition PoPI.hpp:712
std::string argumentsToString(char const *a_format,...)
Definition LUPI_misc.cc:305
void appendXMLEnd(std::vector< std::string > &a_XMLList, std::string const &a_label)
Definition PoPI_misc.cc:53

Referenced by toXMLList().

◆ Z()

int PoPI::ChemicalElement::Z ( void ) const
inline

Returns the value of the m_Z member.

Definition at line 1071 of file PoPI.hpp.


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