Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4GIDI_mass.hh File Reference

Go to the source code of this file.

Functions

double G4GIDI_targetMass (const char *targetSymbol)
 
double G4GIDI_Z_AMass (int iZ, int iA)
 

Function Documentation

◆ G4GIDI_targetMass()

double G4GIDI_targetMass ( const char *  targetSymbol)

Definition at line 903 of file G4GIDI_mass.cc.

903 {
904
905 int i, n = sizeof( ZAMasses ) / sizeof( ZAMasses[0] );
906 double mass = -1.0;
907
908 //TK modified
909 std::string target(targetSymbol);
910 for( i = 0; i < n; i++ ) {
911 //TK modified
912 //if( !strcmp( ZAMasses[i].symbol, targetSymbol ) ) {
913 if( ZAMasses[i].symbol == target ) {
914 mass = ZAMasses[i].mass;
915 break;
916 }
917 }
918 return( mass );
919}
double mass
Definition: G4GIDI_mass.cc:72

Referenced by G4GIDI_Z_AMass(), and G4GIDI_target::init().

◆ G4GIDI_Z_AMass()

double G4GIDI_Z_AMass ( int  iZ,
int  iA 
)

Definition at line 923 of file G4GIDI_mass.cc.

923 {
924
925 char *name = G4GIDI_Misc_Z_A_m_ToName( iZ, iA );
926 double mass;
927
928 if( name == NULL ) return( -1.0 );
929 mass = G4GIDI_targetMass( name );
930 xData_free( NULL, name );
931 return( mass );
932}
char * G4GIDI_Misc_Z_A_m_ToName(int iZ, int iA, int im=0)
Definition: G4GIDI_Misc.cc:76
double G4GIDI_targetMass(const char *targetSymbol)
Definition: G4GIDI_mass.cc:903
void * xData_free(statusMessageReporting *smr, void *p)
Definition: xDataMisc.cc:89