Geant4 11.1.1
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 875 of file G4GIDI_mass.cc.

875 {
876
877 int i, n = sizeof( ZAMasses ) / sizeof( ZAMasses[0] );
878 double mass = -1.0;
879
880 for( i = 0; i < n; i++ ) {
881 if( !strcmp( ZAMasses[i].symbol, targetSymbol ) ) {
882 mass = ZAMasses[i].mass;
883 break;
884 }
885 }
886 return( mass );
887}
double mass
Definition: G4GIDI_mass.cc:44

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

◆ G4GIDI_Z_AMass()

double G4GIDI_Z_AMass ( int  iZ,
int  iA 
)

Definition at line 891 of file G4GIDI_mass.cc.

891 {
892
893 char *name = G4GIDI_Misc_Z_A_m_ToName( iZ, iA );
894 double mass;
895
896 if( name == NULL ) return( -1.0 );
897 mass = G4GIDI_targetMass( name );
898 smr_freeMemory( (void **) &name );
899 return( mass );
900}
char * G4GIDI_Misc_Z_A_m_ToName(int iZ, int iA, int im=0)
Definition: G4GIDI_Misc.cc:44
double G4GIDI_targetMass(const char *targetSymbol)
Definition: G4GIDI_mass.cc:875
const char * name(G4int ptype)
void * smr_freeMemory(void **p)