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 <costas.andreopoulos \at stfc.ac.uk>
9  University of Liverpool & STFC Rutherford Appleton Lab
10 
11  Jim Dobson <j.dobson07@imperial.ac.uk>
12  Imperial College London
13 
14 \created May 30, 2008
15 
16 */
17 //____________________________________________________________________________
18 
19 #ifndef _NATURAL_ISOTOPES_H_
20 #define _NATURAL_ISOTOPES_H_
21 
22 #include <map>
23 #include <vector>
24 
25 using std::map;
26 using std::vector;
27 
28 namespace genie {
29 
30 class NaturalIsotopeElementData;
32 {
33 public:
34  static NaturalIsotopes * Instance (void);
35 
36  int NElements(int Z) const;
37  const NaturalIsotopeElementData * ElementData (int Z, int ielement) const;
38 
39 private:
42  virtual ~NaturalIsotopes();
43 
44  bool LoadTable(void);
45 
47 
48  map<int, vector<NaturalIsotopeElementData*> > fNaturalIsotopesTable;
49 
50  struct Cleaner {
56  }
57  }
58  };
59  friend struct Cleaner;
60 };
61 
63 public:
64  NaturalIsotopeElementData() : fPdgCode(0), fAbundance(0) { }
65  NaturalIsotopeElementData(int code, double abundance) : fPdgCode(code), fAbundance(abundance) { }
67 
68  int PdgCode (void) const { return fPdgCode; }
69  double Abundance (void) const { return fAbundance; }
70 
71 private:
72  int fPdgCode;
73  double fAbundance;
74 };
75 
76 } // genie namespace
77 #endif // _NATURAL_ISOTOPES_H_
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
NaturalIsotopeElementData(int code, double abundance)
Float_t Z
Definition: plot.C:38
int NElements(int Z) const
static NaturalIsotopes * Instance(void)
map< int, vector< NaturalIsotopeElementData * > > fNaturalIsotopesTable
static NaturalIsotopes * fInstance
Definition: inftrees.h:24
Singleton class to load & serve tables of natural occurring isotopes.
const NaturalIsotopeElementData * ElementData(int Z, int ielement) const