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

#include <PoPI.hpp>

Inheritance diagram for PoPI::Nuclide:

Public Member Functions

 Nuclide (HAPI::Node const &a_node, Database *a_DB, Isotope *a_parent)
virtual ~Nuclide ()
int Z (void) const
int A (void) const
std::string const & levelName (void) const
int levelIndex (void) const
std::string const & atomsID () const
std::string const & kind () const
GammaDecayData const & gammaDecayData () const
Isotope const * isotope () const
Nucleus const & nucleus () const
PQ_suite const & baseMass (void) const
double massValue (char const *a_unit) const
double levelEnergy (std::string const &a_unit) const
void calculateNuclideGammaBranchStateInfos (PoPI::Database const &a_pops, NuclideGammaBranchStateInfos &a_nuclideGammaBranchStateInfos, bool a_alwaysAdd=false) const
virtual void toXMLListExtraElements (std::vector< std::string > &a_XMLList, std::string const &a_indent1) const
Public Member Functions inherited from PoPI::Particle
 Particle (HAPI::Node const &a_node, Particle_class a_class, std::string const &a_family, int a_hasNucleus=0)
virtual ~Particle ()
std::string const & baseId (void) const
std::string const & family (void) const
bool isAnti () const
int hasNucleus (void) const
virtual PQ_suite const & mass (void) const
double massValue (std::string const &a_unit) const
PQ_suite const & spin () const
PQ_suite const & parity () const
PQ_suite const & charge () const
PQ_suite const & halflife () const
DecayData const & decayData () const
void toXMLList (std::vector< std::string > &a_XMLList, std::string const &a_indent1) const
virtual std::string toXMLListExtraAttributes (void) const
Public Member Functions inherited from PoPI::IDBase
 IDBase (std::string const &a_id, Particle_class a_class)
 IDBase (HAPI::Node const &a_node, Particle_class a_class)
virtual ~IDBase ()
std::size_t addToDatabase (Database *a_DB)
double massValue2 (Database const &a_DB, std::string const &a_unit) 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
virtual bool isParticle () 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 nuclide instance.

Definition at line 994 of file PoPI.hpp.

Constructor & Destructor Documentation

◆ Nuclide()

PoPI::Nuclide::Nuclide ( HAPI::Node const & a_node,
Database * a_DB,
Isotope * a_isotope )

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

Parameters
a_node[in] The HAPI::Node to be parsed.
a_DB[in] The PoPI::Database:: instance to add the constructed **Nuclide to.
a_isotope[in] This isotope instance that will contain this.

Definition at line 32 of file PoPI_nuclide.cc.

32 :
34 m_isotope( a_isotope ),
35 m_nucleus( a_node.child( PoPI_nucleusChars ), a_DB, this ),
36 m_gammaDecayData( a_node.child( PoPI_gammaDecayDataChars ) ) {
37
38 int sign = ( isAnti( ) ? -1 : 1 );
39 setIntid( sign * ( 1000 * ( 1000 * levelIndex( ) + Z( ) ) + A( ) ) );
40
41 addToDatabase( a_DB );
42}
#define PoPI_nucleusChars
Definition PoPI.hpp:50
#define PoPI_nuclideChars
Definition PoPI.hpp:49
#define PoPI_gammaDecayDataChars
Definition PoPI.hpp:85
std::size_t addToDatabase(Database *a_DB)
Definition PoPI_base.cc:95
int levelIndex(void) const
Definition PoPI.hpp:1009
int A(void) const
int Z(void) const
Particle(HAPI::Node const &a_node, Particle_class a_class, std::string const &a_family, int a_hasNucleus=0)
bool isAnti() const
Definition PoPI.hpp:875
G4int sign(const T t)

◆ ~Nuclide()

PoPI::Nuclide::~Nuclide ( )
virtual

Definition at line 47 of file PoPI_nuclide.cc.

47 {
48
49}

Member Function Documentation

◆ A()

int PoPI::Nuclide::A ( void ) const

Returns of atomic mass number of the parent isotope.

Returns
The atomic mass number of this.

Definition at line 68 of file PoPI_nuclide.cc.

68 {
69
70 return( m_isotope->A( ) );
71}

Referenced by Nuclide(), PoPI::particleA(), and GIDI::Map::Map::replacementTarget().

◆ atomsID()

std::string const & PoPI::Nuclide::atomsID ( void ) const

Returns of atomic symbol of the parent isotope.

Returns
The atomic symbol of this.

Definition at line 79 of file PoPI_nuclide.cc.

79 {
80
81 return( m_isotope->symbol( ) );
82}

◆ baseMass()

PQ_suite const & PoPI::Nuclide::baseMass ( void ) const

Returns the mass suite for the first nuclide in the isotope containing this.

Returns
A const reference to a PQ_suite.

Definition at line 90 of file PoPI_nuclide.cc.

90 {
91
92 return( (*m_isotope).nuclides( )[0].mass( ) );
93}

Referenced by massValue().

◆ calculateNuclideGammaBranchStateInfos()

void PoPI::Nuclide::calculateNuclideGammaBranchStateInfos ( PoPI::Database const & a_pops,
NuclideGammaBranchStateInfos & a_nuclideGammaBranchStateInfos,
bool a_alwaysAdd = false ) const

Definition at line 126 of file PoPI_nuclide.cc.

127 {
128
129 if( a_nuclideGammaBranchStateInfos.find( ID( ) ) != nullptr )
130 return;
131
132 NuclideGammaBranchStateInfo *nuclideGammaBranchStateInfo = new NuclideGammaBranchStateInfo( ID( ), intid( ), kind( ), m_nucleus.energy( "MeV" ) );
133
134 if( m_gammaDecayData.rows( ) > 0 ) {
135 m_gammaDecayData.calculateNuclideGammaBranchStateInfo( a_pops, *nuclideGammaBranchStateInfo ); }
136 else {
137 decayData( ).calculateNuclideGammaBranchStateInfo( a_pops, *nuclideGammaBranchStateInfo );
138 }
139
140 if( ( nuclideGammaBranchStateInfo->branches( ).size( ) > 0 ) || a_alwaysAdd ) {
141 a_nuclideGammaBranchStateInfos.add( nuclideGammaBranchStateInfo ); }
142 else {
143 delete nuclideGammaBranchStateInfo;
144 }
145}
int intid() const
Definition PoPI.hpp:655
std::string const & ID(void) const
Definition PoPI.hpp:652
void calculateNuclideGammaBranchStateInfo(PoPI::Database const &a_pops, NuclideGammaBranchStateInfo &a_nuclideGammaBranchStateInfo) const
std::string const & kind() const
Definition PoPI.hpp:1011
DecayData const & decayData() const
Definition PoPI.hpp:887

Referenced by PoPI::Database::calculateNuclideGammaBranchStateInfos().

◆ gammaDecayData()

GammaDecayData const & PoPI::Nuclide::gammaDecayData ( ) const
inline

Definition at line 1012 of file PoPI.hpp.

1012{ return( m_gammaDecayData ); }

◆ isotope()

Isotope const * PoPI::Nuclide::isotope ( ) const
inline

Returns a const reference to the m_isotope member.

Definition at line 1014 of file PoPI.hpp.

◆ kind()

std::string const & PoPI::Nuclide::kind ( ) const
inline

Definition at line 1011 of file PoPI.hpp.

1011{ return( m_gammaDecayData.kind( ) ); }

Referenced by calculateNuclideGammaBranchStateInfos().

◆ levelEnergy()

double PoPI::Nuclide::levelEnergy ( std::string const & a_unit) const
inline

Returns the result of calling m_nucleus.energy( a_unit ).

Definition at line 1019 of file PoPI.hpp.

Referenced by PoPI::Isotope::calculateNuclideGammaBranchStateInfos(), and massValue().

◆ levelIndex()

int PoPI::Nuclide::levelIndex ( void ) const
inline

Returns the result of calling m_nucleus.levelIndex( ).

Definition at line 1009 of file PoPI.hpp.

Referenced by Nuclide().

◆ levelName()

std::string const & PoPI::Nuclide::levelName ( void ) const
inline

Returns the result of calling m_nucleus.levelName( ).

Definition at line 1007 of file PoPI.hpp.

◆ massValue()

double PoPI::Nuclide::massValue ( char const * a_unit) const
virtual

Returns the mass of the nuclide in units of a_unit including the nucleus excitation energy. Currently not fully implement and does not support a_unit.

Parameters
a_unit[in] The unit to return the mass in.
Returns
The mass in unit of a_unit.

Reimplemented from PoPI::Particle.

Definition at line 104 of file PoPI_nuclide.cc.

104 {
105
106 std::string unit_c2( a_unit );
107 unit_c2 += " * c**2";
108 PQ_double const *pq_mass;
109
110 if( mass( ).size( ) > 0 ) {
111 pq_mass = static_cast<PQ_double const *>( mass( )[0] ); }
112 else {
113 if( baseMass( ).size( ) == 0 ) throw Exception( "nuclide::massValue: no mass in level 0 for particle '" + ID( ) + "'." );
114 pq_mass = static_cast<PQ_double const *>( baseMass( )[0] );
115 }
116 double _mass = pq_mass->value( a_unit );
117
118 double v_levelEnergy = levelEnergy( unit_c2 ) / AMU2MeV;
119
120 return( _mass + v_levelEnergy );
121}
#define AMU2MeV
PQ_suite const & baseMass(void) const
double levelEnergy(std::string const &a_unit) const
Definition PoPI.hpp:1019
virtual PQ_suite const & mass(void) const
Definition PoPI.hpp:878

◆ nucleus()

Nucleus const & PoPI::Nuclide::nucleus ( ) const
inline

Returns a const reference to the m_nucleus member.

Definition at line 1015 of file PoPI.hpp.

◆ toXMLListExtraElements()

void PoPI::Nuclide::toXMLListExtraElements ( std::vector< std::string > & a_XMLList,
std::string const & a_indent1 ) const
virtual

Added m_nucleus stuff to a_XMLList.

Reimplemented from PoPI::Particle.

Definition at line 151 of file PoPI_nuclide.cc.

151 {
152
153 m_nucleus.toXMLList( a_XMLList, a_indent1 );
154}

◆ Z()

int PoPI::Nuclide::Z ( void ) const

Returns of atomic number of the parent isotope.

Returns
The atomic number of this.

Definition at line 57 of file PoPI_nuclide.cc.

57 {
58
59 return( m_isotope->Z( ) );
60}

Referenced by Nuclide(), and PoPI::particleZ().


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