Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
PoPs_mass.h File Reference

Go to the source code of this file.

Functions

double PoPs_particleMass_AMU (statusMessageReporting *smr, char const *name)
 

Function Documentation

◆ PoPs_particleMass_AMU()

double PoPs_particleMass_AMU ( statusMessageReporting smr,
char const *  name 
)

Definition at line 915 of file PoPs_mass.cc.

915 {
916
917 int i, n = sizeof( ZAMasses ) / sizeof( ZAMasses[0] );
918 double mass = -1.;
919
920 for( i = 0; i < n; i++ ) {
921 if( !strcmp( ZAMasses[i].symbol, name ) ) {
922 mass = ZAMasses[i].mass;
923 break;
924 }
925 }
926 if( mass == -1. ) smr_setReportError2( smr, smr_unknownID, 1, "particle %s not in mass table", name );
927 return( mass );
928}
#define smr_setReportError2(smr, libraryID, code, fmt,...)
#define smr_unknownID
double mass
Definition: G4GIDI_mass.cc:44