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

Go to the source code of this file.

Functions

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

Function Documentation

◆ tpia_particleMass_AMU()

double tpia_particleMass_AMU ( statusMessageReporting smr,
const char *  name 
)

Definition at line 887 of file tpia_mass.cc.

887 {
888
889 int i, n = sizeof( ZAMasses ) / sizeof( ZAMasses[0] );
890 double mass = -1.;
891
892 //TK modified
893 std::string target(name);
894 for( i = 0; i < n; i++ ) {
895 //TK modified
896 //if( !strcmp( ZAMasses[i].symbol, name ) ) {
897 if( ZAMasses[i].symbol == target ) {
898 mass = ZAMasses[i].mass;
899 break;
900 }
901 }
902 if( mass == -1. ) smr_setMessageError( smr, NULL, __FILE__, __LINE__, 1, "particle %s not in mass table", name );
903 return( mass );
904}
int smr_setMessageError(statusMessageReporting *smr, void *userInterface, const char *file, int line, int code, const char *fmt,...)
double mass
Definition: G4GIDI_mass.cc:72

Referenced by tpia_particle_getInternalID().