GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 <c.andreopoulos \at cern.ch>
9  University of Liverpool
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-2024, 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  const NaturalIsotopeElementData * ElementDataPdg (int Z, int pdgcode) const;
41 
42 private:
45  virtual ~NaturalIsotopes();
46 
47  bool LoadTable(void);
48 
50 
51  map<int, vector<NaturalIsotopeElementData*> > fNaturalIsotopesTable;
52 
53  struct Cleaner {
59  }
60  }
61  };
62  friend struct Cleaner;
63 };
64 
66 public:
68  NaturalIsotopeElementData(int code, double abundance, double atomicmass) : fPdgCode(code), fAbundance(abundance), fAtomicMass(atomicmass) { }
70 
71  int PdgCode (void) const { return fPdgCode; }
72  double Abundance (void) const { return fAbundance; }
73  double AtomicMass (void) const { return fAtomicMass; }
74 
75 private:
76  int fPdgCode;
77  double fAbundance;
78  double fAtomicMass;
79 };
80 
81 } // genie namespace
82 #endif // _NATURAL_ISOTOPES_H_
NaturalIsotopeElementData(int code, double abundance, double atomicmass)
int NElements(int Z) const
static NaturalIsotopes * Instance(void)
map< int, vector< NaturalIsotopeElementData * > > fNaturalIsotopesTable
static NaturalIsotopes * fInstance
Singleton class to load &amp; serve tables of natural occurring isotopes.
const NaturalIsotopeElementData * ElementData(int Z, int ielement) const
const NaturalIsotopeElementData * ElementDataPdg(int Z, int pdgcode) const