7 #ifndef PYNE_UWPOP4EE6BEB5CZK4BQQHYTCEI 8 #define PYNE_UWPOP4EE6BEB5CZK4BQQHYTCEI 14 #ifndef PYNE_IS_AMALGAMATED 19 #define NUM_PARTICLES 32 26 extern int _pdcids[NUM_PARTICLES];
27 extern std::string
_docs[NUM_PARTICLES];
30 extern std::string
_names[NUM_PARTICLES];
32 extern std::set<std::string>
names;
36 extern std::map<std::string,int>
name_id;
38 extern std::map<int,std::string>
id_name;
40 extern std::map<std::string,std::string>
docs;
42 extern std::map<std::string,int>
altnames;
62 bool is_hydrogen(
int n);
63 bool is_hydrogen(
char *s);
64 bool is_hydrogen(std::string s);
74 bool is_heavy_ion(
int s);
75 bool is_heavy_ion(
char *s);
76 bool is_heavy_ion(std::string s);
87 bool is_valid(
char *s);
88 bool is_valid(std::string s);
99 int id(std::string s);
109 std::string name(
int s);
110 std::string name(
char *s);
111 std::string name(std::string s);
118 std::string mcnp(
int s);
119 std::string mcnp(
char *s);
120 std::string mcnp(std::string s);
127 std::string mcnp6(
int s);
128 std::string mcnp6(
char *s);
129 std::string mcnp6(std::string s);
136 std::string fluka(
int s);
137 std::string fluka(
char *s);
138 std::string fluka(std::string s);
145 std::string geant4(
int s);
146 std::string geant4(
char *s);
147 std::string geant4(std::string s);
157 std::string describe(
int s);
158 std::string describe(
char *s);
159 std::string describe(std::string s);
180 part_name = particle_name;
184 virtual const char*
what()
const throw()
186 std::string pname (
"Not a valid particle name ");
187 if(!part_name.empty())
189 const char *pname_rtn = pname.c_str();
194 std::string part_name;
std::set< int > pdc_nums
set of valid names
Custom excpeption for failed particle types.
Definition: particle.h:167
virtual const char * what() const
raises error message
Definition: particle.h:184
std::map< std::string, int > altnames
map of name to doc string
Definition: particle.cpp:94
std::set< std::string > names
set of name strings that are the particle types
~NotAParticle()
Default destructor.
Definition: particle.h:174
std::string _docs[NUM_PARTICLES]
set of Particle Data Centre integer id numbers
std::map< std::string, std::string > part_to_mcnp
map of alternative name to pdc number
Definition: particle.cpp:100
std::map< std::string, std::string > docs
map of pdc number to name
Definition: particle.cpp:97
std::map< int, std::string > id_name
map of name to pdc number
Definition: particle.cpp:95
std::map< std::string, std::string > part_to_mcnp6
map of name to mcnp string
Definition: particle.cpp:101
NotAParticle()
Default constructor.
Definition: particle.h:171
void * filler
A dummy variable used when calling _fill_maps().
Definition: particle.cpp:256
NotAParticle(std::string particle_name)
Definition: particle.h:178
std::map< std::string, int > name_id
set of valid pdc numbers
Definition: particle.cpp:96
A container representing enrichment cascades.
Definition: _atomic_data.h:16
std::map< std::string, std::string > part_to_fluka
map of name to mcnp6 string
Definition: particle.cpp:99
std::map< std::string, std::string > part_to_geant4
map of name to fluka string
Definition: particle.cpp:102
void * _fill_maps()
A helper function to set the contents of the variables in this library.
Definition: particle.cpp:105
std::string _names[NUM_PARTICLES]
set of doc strings that describe the particle types
Definition: particle.cpp:5