Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
MCGIDI_mass.cc File Reference
#include <string.h>
#include <statusMessageReporting.h>
#include "MCGIDI_mass.h"

Go to the source code of this file.

Classes

struct  ZAMass
 

Functions

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

Function Documentation

◆ MCGIDI_particleMass_AMU()

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}
#define smr_setReportError2(smr, libraryID, code, fmt,...)
#define smr_unknownID
double mass
Definition: G4GIDI_mass.cc:44

Referenced by MCGIDI_particle_getInternalID().