Bayeux  3.4.1
Core Foundation library for SuperNEMO
chemical_symbol.h
Go to the documentation of this file.
1 /* Author(s): Benoit Guillon <guillon@lpccaen.in2p3.fr>
3  * François Mauger <mauger@lpccaen.in2p3.fr>
4  * Creation date: 2008-02-25
5  * Last modified: 2014-06-11
6  *
7  * License:
8  *
9  *
10  * Description:
11  * - Very simple header to handle equivalence between the chemical symbol and the number of proton.
12  * - 2 inline functions :
13  * > symbol_from_Z (int) : return the chemical symbol (string) corresponding to the number of protons (Z)
14  * > Z_from_symbol (string) : return the number of proton (Z) according to the chemical symbol (string)
15  * History:
16  *
17  *
18  * Authors:
19  * - Benoit Guillon <guillon@lpccaen.in2p3.fr>
20  * - François Mauger <mauger@lpccaen.in2p3.fr>
21  *
22  * Mainteners:
23  * - François Mauger <mauger@lpccaen.in2p3.fr>
24  *
25  */
26 
27 #ifndef MATERIALS_CHEMICAL_SYMBOL_H
28 #define MATERIALS_CHEMICAL_SYMBOL_H 1
29 
30 // Standard library:
31 #include <string>
32 #include <vector>
33 
35 namespace materials {
36 
39  {
40  public:
41 
43  static const int Z_UNDEFINED = -1;
44 
46  static const std::vector<std::string> & table_of_symbols();
47 
49  static unsigned int nb_chemical_symbols();
50 
52  static bool symbol_is_tabulated(const std::string & symbol_);
53 
55  static bool z_is_tabulated(int z_);
56 
58  static int z_from_symbol(const std::string & symbol_);
59 
61  static const std::string & symbol_from_z(int z_);
62 
63  };
64 
65 } // end of namespace materials
66 
67 #endif // MATERIALS_CHEMICAL_SYMBOL_H
68 
69 /*
70 ** Local Variables: --
71 ** mode: c++ --
72 ** c-file-style: "gnu" --
73 ** tab-width: 2 --
74 ** End: --
75 */
static const int Z_UNDEFINED
Invalid Z value.
Definition: chemical_symbol.h:43
Utilities for chemical symbols.
Definition: chemical_symbol.h:38
static const std::string & symbol_from_z(int z_)
Return the chemical symbol associated to a Z value.
static int z_from_symbol(const std::string &symbol_)
Return the Z value from a chemical symbol.
static bool z_is_tabulated(int z_)
Check is a Z value is tabulated.
static unsigned int nb_chemical_symbols()
Return the number of tabulated chemical symbols.
static bool symbol_is_tabulated(const std::string &symbol_)
Check is a chemical symbol is tabulated.
static const std::vector< std::string > & table_of_symbols()
Return the vector of tabulated chemical symbols.
Top-level namespace of the Bayeux/materials module library.
Definition: geom_manager_utils.h:14