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

#include <PoPI.hpp>

Inheritance diagram for PoPI::MetaStable:

Public Member Functions

 MetaStable (HAPI::Node const &a_node, Database *a_DB)
virtual ~MetaStable ()
int metaStableIndex (void) const
void toXMLList (std::vector< std::string > &a_XMLList, std::string const &a_indent1) const
Public Member Functions inherited from PoPI::Alias
 Alias (HAPI::Node const &a_node, Database *a_DB, Particle_class a_class=Particle_class::alias)
virtual ~Alias ()
std::string const & pid (void) const
std::size_t pidIndex (void) const
void setPidIndex (std::size_t a_index)
void toXMLList (std::vector< std::string > &a_XMLList, std::string const &a_indent1) 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 metaStable instance.

Definition at line 1109 of file PoPI.hpp.

Constructor & Destructor Documentation

◆ MetaStable()

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

Constructor that parses an HAPI instance to create a GNDS metastable alias node.

Parameters
a_node[in] The HAPI::Node to be parsed.
a_DB[in] The PoPI::Database:: instance to add the constructed **MetaStable to.

Definition at line 72 of file PoPI_alias.cc.

72 :
73 Alias( a_node, a_DB, Particle_class::nuclideMetaStable ), // Initial guess. */
74 m_metaStableIndex( a_node.attribute( PoPI_metaStableIndexChars ).as_int( ) ) {
75
76 ParseIdInfo idInfo( ID( ) );
77 if( idInfo.isNuclear( ) ) {
79 int intid2 = intidHelper( false, m_class, 1000 * idInfo.Z( ) + idInfo.A( ) );
80 setIntid( intid2 + 1000000 * idInfo.index( ) );
81 }
82
83 addToDatabase( a_DB );
84}
#define PoPI_metaStableIndexChars
Definition PoPI_alias.cc:14
friend Alias
Definition PoPI.hpp:674
std::string const & ID(void) const
Definition PoPI.hpp:652
std::size_t addToDatabase(Database *a_DB)
Definition PoPI_base.cc:95
int intidHelper(bool a_isAnti, Particle_class a_family, int a_SSSSSSS)
Definition PoPI_intId.cc:47

◆ ~MetaStable()

PoPI::MetaStable::~MetaStable ( )
virtual

Definition at line 89 of file PoPI_alias.cc.

89 {
90
91}

Member Function Documentation

◆ metaStableIndex()

int PoPI::MetaStable::metaStableIndex ( void ) const
inline

Returns the value of the m_metaStableIndex member.

Definition at line 1118 of file PoPI.hpp.

◆ toXMLList()

void PoPI::MetaStable::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 100 of file PoPI_alias.cc.

100 {
101
102 std::string indexStr = LUPI::Misc::argumentsToString( "%d", m_metaStableIndex );
103 std::string header = a_indent1 + "<metaStable id=\"" + ID( ) + "\" pid=\"" + pid( ) + "\" metaStableIndex=\"" + indexStr + "\"/>";
104 a_XMLList.push_back( std::move( header ) );
105}
std::string const & pid(void) const
Definition PoPI.hpp:1096
std::string argumentsToString(char const *a_format,...)
Definition LUPI_misc.cc:305

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