Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MCGIDI_mass.cc File Reference
#include <string.h>
#include <statusMessageReporting.h>
#include "MCGIDI_mass.h"
Include dependency graph for MCGIDI_mass.cc:

Go to the source code of this file.

Classes

struct  ZAMass
 

Functions

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

Variables

static struct ZAMass ZAMasses []
 

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,...)
#define smr_unknownID
double mass
Definition: G4GIDI_mass.cc:44

Here is the caller graph for this function:

Variable Documentation

struct ZAMass ZAMasses[]
static

Definition at line 20 of file MCGIDI_mass.cc.