NaturalIsotopes.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::NaturalIsotopes
5 
6 \brief Singleton class to load & serve tables of natural occurring isotopes
7 
8 \author Costas Andreopoulos <constantinos.andreopoulos \at cern.ch>
9  University of Liverpool & STFC Rutherford Appleton Laboratory
10 
11  Jim Dobson <j.dobson07@imperial.ac.uk>
12  Imperial College London
13 
14 \created May 30, 2008
15 
16 \cpright Copyright (c) 2003-2020, The GENIE Collaboration
17  For the full text of the license visit http://copyright.genie-mc.org
18 */
19 //____________________________________________________________________________
20 
21 #ifndef _NATURAL_ISOTOPES_H_
22 #define _NATURAL_ISOTOPES_H_
23 
24 #include <map>
25 #include <vector>
26 
27 using std::map;
28 using std::vector;
29 
30 namespace genie {
31 
32 class NaturalIsotopeElementData;
34 {
35 public:
36  static NaturalIsotopes * Instance (void);
37 
38  int NElements(int Z) const;
39  const NaturalIsotopeElementData * ElementData (int Z, int ielement) const;
40 
41 private:
44  virtual ~NaturalIsotopes();
45 
46  bool LoadTable(void);
47 
49 
50  map<int, vector<NaturalIsotopeElementData*> > fNaturalIsotopesTable;
51 
52  struct Cleaner {
58  }
59  }
60  };
61  friend struct Cleaner;
62 };
63 
65 public:
66  NaturalIsotopeElementData() : fPdgCode(0), fAbundance(0) { }
67  NaturalIsotopeElementData(int code, double abundance) : fPdgCode(code), fAbundance(abundance) { }
69 
70  int PdgCode (void) const { return fPdgCode; }
71  double Abundance (void) const { return fAbundance; }
72 
73 private:
74  int fPdgCode;
75  double fAbundance;
76 };
77 
78 } // genie namespace
79 #endif // _NATURAL_ISOTOPES_H_
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
struct vector vector
NaturalIsotopeElementData(int code, double abundance)
int NElements(int Z) const
static NaturalIsotopes * Instance(void)
map< int, vector< NaturalIsotopeElementData * > > fNaturalIsotopesTable
CodeOutputInterface * code
static NaturalIsotopes * fInstance
Singleton class to load & serve tables of natural occurring isotopes.
const NaturalIsotopeElementData * ElementData(int Z, int ielement) const