Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PoPs_mass.h File Reference
Include dependency graph for PoPs_mass.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

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

Function Documentation

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 }
const XML_Char * name
Definition: expat.h:151
static struct ZAMass ZAMasses[]
Definition: PoPs_mass.cc:67
#define smr_setReportError2(smr, libraryID, code, fmt,...)
#define smr_unknownID
double mass
Definition: G4GIDI_mass.cc:44