nuclear_mass_info Class Reference

Nuclear mass info. More...

#include <nuclear_mass.h>

Inheritance diagram for nuclear_mass_info:

nuclear_mass nuclear_mass_cont nuclear_mass_disc nuclear_mass_fit ame_mass hfb_mass mnmsk_mass semi_empirical_mass mnmsk_mass_exp

Detailed Description

Nuclear mass info.

Definition at line 39 of file nuclear_mass.h.


Data Structures

struct  string_less_than
 String comparison operator for element_table. More...

Public Member Functions

int parse_elstring (std::string ela, int &Z, int &N, int &A)
 Parse a string representing an element.
int eltoZ (std::string el)
 Return Z given the element name.
std::string Ztoel (size_t Z)
 Return the element name given Z.
std::string tostring (size_t Z, size_t N)
 Return a string of the form "Pb208" for a given Z and N.

Protected Types

typedef std::map< std::string,
int, string_less_than >
::iterator 
table_it
 A convenient typedef for an iterator for element_table.

Protected Attributes

std::map< std::string, int,
string_less_than
element_table
 A map containing the proton numbers organized by element name.
std::string element_list [nelements]
 The list of elements organized by proton number.

Static Protected Attributes

static const int nelements = 119
 The number of elements (proton number).

Member Function Documentation

int eltoZ ( std::string  el  )  [inline]

Return Z given the element name.

If the string parameter el is invalid, the error handler is called and the value -1 is returned.

Definition at line 143 of file nuclear_mass.h.

int parse_elstring ( std::string  ela,
int &  Z,
int &  N,
int &  A 
) [inline]

Parse a string representing an element.

Accepts strings of one of the following forms:

  • Pb208
  • pb208
  • Pb 208
  • Pb-208
  • pb 208
  • pb-208 or one of the special strings n, p, d or t for the neutron, proton, deuteron, and triton, respectively.

Note:
At present, this allows nuclei which don't make sense because A<Z, such as Carbon-5.
Idea for future:
Allow A to precede Z.
Idea for future:
Right now, n4 is interpreted incorrectly as Nitrogen-4, rather than the tetraneutron.

Definition at line 66 of file nuclear_mass.h.

std::string tostring ( size_t  Z,
size_t  N 
) [inline]

Return a string of the form "Pb208" for a given Z and N.

Note that if Z is zero, then and 'n' is used to indicate the a nucleus composed entirely of neutrons and if the argument Z is greater than 118, an empty string is returned (independ.

Definition at line 176 of file nuclear_mass.h.

std::string Ztoel ( size_t  Z  )  [inline]

Return the element name given Z.

Note:
This function returns "n" indicating the neutron for Z=0, and if the argument Z is greater than 118, an empty string is returned after calling the error handler.

Definition at line 160 of file nuclear_mass.h.


The documentation for this class was generated from the following file:

Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page