Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4GIDI_misc.cc File Reference
#include <g4gidi_version.hh>
#include <G4GIDI.hh>

Go to the source code of this file.

Functions

std::string G4GIDI_version ()
int G4GIDI_versionMajor ()
int G4GIDI_versionMinor ()
int G4GIDI_versionPatchLevel ()
std::string G4GIDI_GitHash ()
std::string G4GIDI_Misc_Z_toSymbol (int a_Z)
std::string G4GIDI_Misc_Z_A_m_ToName (int a_Z, int a_A, int a_M)

Function Documentation

◆ G4GIDI_GitHash()

std::string G4GIDI_GitHash ( )

Returns the git repo hash for the G4GIDI repo for this version..

Returns
A std::string.

Definition at line 82 of file G4GIDI_misc.cc.

82 {
83
84 return G4GIDI_GIT;
85}
#define G4GIDI_GIT

◆ G4GIDI_Misc_Z_A_m_ToName()

std::string G4GIDI_Misc_Z_A_m_ToName ( int a_Z,
int a_A,
int a_M )

Returns the PoPs for a specified atomic number a_Z, mass number a_A and meta-stable index a_M.

Parameters
a_Z[in] The Z of the chemical element.
a_A[in] The A of the isotope.
a_M[in] The meta-stable index of the nuclide.
Returns
The symbol as a std::string.

Definition at line 130 of file G4GIDI_misc.cc.

130 {
131
132 std::string id( G4GIDI_Misc_Z_toSymbol( a_Z ) + std::to_string( a_A ) );
133
134 if( a_M > 0 ) id += "_" + std::to_string( a_M );
135
136 return( id );
137}
std::string G4GIDI_Misc_Z_toSymbol(int a_Z)
std::string to_string(G4FermiAtomicMass mass)

Referenced by G4GIDI::dataFilename(), G4GIDI::freeTarget(), G4GIDI::getAlreadyReadTarget(), G4GIDI::getNamesOfAvailableLibraries(), G4GIDI::isThisDataAvailable(), and G4GIDI::readTarget().

◆ G4GIDI_Misc_Z_toSymbol()

std::string G4GIDI_Misc_Z_toSymbol ( int a_Z)

Returns the chemical elemental symbol for a specified atomic number a_Z.

Parameters
a_Z[in] The Z of the chemical element.
Returns
The symbol as a std::string.

Definition at line 109 of file G4GIDI_misc.cc.

109 {
110
111 int Zm1 = a_Z - 1;
112
113 if( ( Zm1 < 0 ) || ( Zm1 >= static_cast<int>( G4GIDI_chemicalElementSymbols.size( ) ) ) ) {
114 throw LUPI::Exception( "G4GIDI_Misc_Z_toSymbol: invalid Z = " + std::to_string( a_Z ) + "." );
115 }
116
117 return( std::string( G4GIDI_chemicalElementSymbols[Zm1] ) );
118}

Referenced by G4GIDI_Misc_Z_A_m_ToName().

◆ G4GIDI_version()

std::string G4GIDI_version ( )

Returns the version string for the version of G4GIDI.

Returns
A std::string.

Definition at line 36 of file G4GIDI_misc.cc.

36 {
37
38 std::string versionString( G4GIDI_VERSION );
39
40 return versionString;
41}
#define G4GIDI_VERSION

◆ G4GIDI_versionMajor()

int G4GIDI_versionMajor ( )

Returns the major version number for the version of G4GIDI.

Returns
An int.

Definition at line 49 of file G4GIDI_misc.cc.

49 {
50
51 return G4GIDI_MAJOR;
52}
#define G4GIDI_MAJOR

◆ G4GIDI_versionMinor()

int G4GIDI_versionMinor ( )

Returns the minor version number for the version of G4GIDI.

Returns
An int.

Definition at line 60 of file G4GIDI_misc.cc.

60 {
61
62 return G4GIDI_MINOR;
63}
#define G4GIDI_MINOR

◆ G4GIDI_versionPatchLevel()

int G4GIDI_versionPatchLevel ( )

Returns the patch level number for the version of G4GIDI.

Returns
An int.

Definition at line 71 of file G4GIDI_misc.cc.

71 {
72
73 return G4GIDI_PATCHLEVEL;
74}
#define G4GIDI_PATCHLEVEL