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

#include <PoPI.hpp>

Inheritance diagram for PoPI::Isotope:

Public Member Functions

 Isotope (HAPI::Node const &a_node, Database *a_DB, ChemicalElement *a_parent)
virtual ~Isotope ()
ChemicalElement const * chemicalElement () const
int Z (void) const
int A (void) const
Suite< Nuclide, Isotope > const & nuclides () 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 PoPs isotope instance.

Definition at line 1033 of file PoPI.hpp.

Constructor & Destructor Documentation

◆ Isotope()

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

Constructor that parses an HAPI instance to create a PoPs isotope node.

Parameters
a_node[in] The HAPI::Node to be parsed.
a_DB[in] The PoPI::Database:: instance to add the constructed **Isotope to.
a_chemicalElement[in] The parent chemical element suite that will contain this.

Definition at line 28 of file PoPI_isotope.cc.

28 :
30 m_chemicalElement( a_chemicalElement ),
31 m_Z( a_chemicalElement->Z( ) ),
32 m_A( a_node.attribute( PoPI_A_Chars ).as_int( ) ),
33 m_nuclides( PoPI_nuclidesChars ) {
34
35 m_nuclides.appendFromParentNode( a_node.child( PoPI_nuclidesChars ), a_DB, this );
36}
#define PoPI_nuclidesChars
Definition PoPI.hpp:48
#define PoPI_A_Chars
SymbolBase(HAPI::Node const &a_node, Particle_class a_class)
Definition PoPI_base.cc:110

◆ ~Isotope()

PoPI::Isotope::~Isotope ( )
virtual

Definition at line 41 of file PoPI_isotope.cc.

41 {
42
43}

Member Function Documentation

◆ A()

int PoPI::Isotope::A ( void ) const
inline

Returns the value of the m_A member.

Definition at line 1047 of file PoPI.hpp.

◆ calculateNuclideGammaBranchStateInfos()

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

Definition at line 48 of file PoPI_isotope.cc.

48 {
49
50 NuclideGammaBranchStateInfo *info = nullptr, *priorInfo = nullptr;
51 std::string energyUnit = "MeV"; // FIXME, MeV needs to be a variable.
52 double width = 0.0;
53
54 for( std::size_t i1 = 0; i1 < m_nuclides.size( ); ++i1 ) {
55 std::size_t initialSize = a_nuclideGammaBranchStateInfos.size( );
56 Nuclide const &nuclide = m_nuclides[i1];
57 double levelEnergy = nuclide.levelEnergy( energyUnit );
58
59 nuclide.calculateNuclideGammaBranchStateInfos( a_pops, a_nuclideGammaBranchStateInfos );
60 if( a_nuclideGammaBranchStateInfos.size( ) > initialSize ) {
61 info = a_nuclideGammaBranchStateInfos[initialSize];
62 if( priorInfo != nullptr ) {
63 if( priorInfo->kind( ) == PoPI_continuumChars ) {
64 for( std::size_t i2 = i1 + 1; i2 < m_nuclides.size( ); ++i2 ) {
65 Nuclide const &nuclide2 = m_nuclides[i2];
66 if( nuclide2.levelEnergy( energyUnit ) > levelEnergy ) {
67 width = nuclide2.levelEnergy( energyUnit ) - levelEnergy;
68 break;
69 }
70 }
71 priorInfo->setNuclearLevelEnergyWidth( width );
72 }
73 }
74 }
75
76 priorInfo = info;
77 }
78}
#define PoPI_continuumChars
Definition PoPI.hpp:99
friend Nuclide
Definition PoPI.hpp:679

◆ chemicalElement()

ChemicalElement const * PoPI::Isotope::chemicalElement ( ) const
inline

Returns a const reference to the m_isotope member.

Definition at line 1045 of file PoPI.hpp.

◆ nuclides()

Suite< Nuclide, Isotope > const & PoPI::Isotope::nuclides ( ) const
inline

Returns a const reference to the m_nuclides member.

Definition at line 1048 of file PoPI.hpp.

◆ toXMLList()

void PoPI::Isotope::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 87 of file PoPI_isotope.cc.

87 {
88
89 std::string::size_type size = m_nuclides.size( );
90 std::string AStr = LUPI::Misc::argumentsToString( "%d", m_A );
91
92 std::string header = a_indent1 + "<isotope symbol=\"" + symbol( ) + "\" A=\"" + AStr + "\">";
93 a_XMLList.push_back( std::move( header ) );
94
95 std::string indent2 = a_indent1 + " ";
96 std::string nuclideSuite = indent2 + "<" + PoPI_nuclidesChars + ">";
97 a_XMLList.push_back( std::move( nuclideSuite ) );
98
99 std::string indent3 = indent2 + " ";
100 for( std::string::size_type i1 = 0; i1 < size; ++i1 ) m_nuclides[i1].toXMLList( a_XMLList, indent3 );
101
102 appendXMLEnd( a_XMLList, PoPI_nuclidesChars );
103 appendXMLEnd( a_XMLList, PoPI_isotopeChars );
104}
#define PoPI_isotopeChars
Definition PoPI.hpp:44
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::Isotope::Z ( void ) const
inline

Returns the value of the m_Z member.

Definition at line 1046 of file PoPI.hpp.

Referenced by Isotope().


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