Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MCGIDI_mass.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

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

Function Documentation

double MCGIDI_particleMass_AMU ( statusMessageReporting smr,
const char *  name 
)

Definition at line 853 of file MCGIDI_mass.cc.

853  {
854 
855  int i, n = sizeof( ZAMasses ) / sizeof( ZAMasses[0] );
856  double mass = -1.;
857 
858  for( i = 0; i < n; i++ ) {
859  if( strcmp( ZAMasses[i].symbol, name ) == 0 ) {
860  mass = ZAMasses[i].mass;
861  break;
862  }
863  }
864  if( mass == -1. ) smr_setReportError2( smr, smr_unknownID, 1, "particle %s not in mass table", name );
865  return( mass );
866 }
const XML_Char * name
Definition: expat.h:151
static struct ZAMass ZAMasses[]
Definition: MCGIDI_mass.cc:20
#define smr_setReportError2(smr, libraryID, code, fmt,...)
const G4int n
#define smr_unknownID
double mass
Definition: G4GIDI_mass.cc:44

Here is the caller graph for this function: