Geant4  10.00.p02
G4NuclideTable.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 #ifndef G4NuclideTable_h
27 #define G4NuclideTable_h 1
28 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
29 //
30 // MODULE: G4NuclideTable.hh
31 //
32 // Date: 10/10/13
33 // Author: T.Koi
34 //
35 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
36 //
37 // HISTORY
38 // Based on G4IsomerTable
39 //
41 
42 //
43 #include "globals.hh"
44 #include "G4IsotopeProperty.hh"
45 #include "G4VIsotopeTable.hh"
46 #include "G4Ions.hh"
47 #include "G4ParticleTable.hh"
48 #include "G4IonTable.hh"
49 #include "G4DecayTable.hh"
50 
51 #include <vector>
52 
54 //
56 {
57  // class description
58  // G4NuclideTable is the table of pointers to G4IsotopeProperty,
59  // which has magnetic moment and spin.
60  // Data File name is given by G4ENSDFSTATEDATA
61  //
62  //
63  private:
65  //G4NuclideTable ( const G4NuclideTable& p ){};
66  //G4NuclideTable& operator=( const G4NuclideTable& p ){};
67 
68  public:
69  static G4NuclideTable* GetInstance();
70  static G4NuclideTable* GetNuclideTable() { return GetInstance(); };
71 public:
72  typedef std::vector<G4IsotopeProperty*> G4IsotopeList;
73 
74 protected:
75  void FillHardCodeList();
76 
77 public:
78  // destructor
79  virtual ~G4NuclideTable();
80 
81 public:
82 
83  //
84  void GenerateNuclide();
85 
88 
90 
91 
92  //G4bool Exists(G4double,G4double,G4double);
93 
94  //Use GetIsotope(G4int Z, G4int A, G4double E)
95  //void FillProperty(G4ParticleDefinition*);
96 
97  size_t GetSizeOfIsotopeList(){ return fIsotopeList->size(); };
98 
99  //
100  // with description
101  //
104  //
105  // again it will replace the pure virtual one in the abstract base class.
106  //
107  // Z: Atomic Number
108  // A: Atomic Mass
109  // E: Excitaion energy
110  // or
111  // lvl: isomer level
112  //
113 
114  size_t entries() const;
115  G4IsotopeProperty* GetIsotopeByIndex(size_t idx) const;
116 
117 public:
118  // utility methods
119  static inline G4double GetTrancationError( G4double eex )
120  { return eex - (G4long)(eex/levelTolerance)*levelTolerance; }
121  static inline G4double Round( G4double eex )
122  { return (G4long)(eex/levelTolerance)*levelTolerance; }
123  static inline G4long Trancate( G4double eex )
124  { return (G4long)(eex/levelTolerance); }
125  static inline G4double Tolerance()
126  { return levelTolerance; }
127 
128 private:
129 
131  G4IsotopeList* fUserDefinedList;
132 
133  std::map< G4int , std::multimap< G4double , G4IsotopeProperty* > > map_pre_load_list;
134  std::map< G4int , std::multimap< G4double , G4IsotopeProperty* > > map_hard_code_list;
135  std::map< G4int , std::multimap< G4double , G4IsotopeProperty* > > map_full_list;
136 
137  //enum {nEntries=3075,MaxA=260, MinZ=2, MaxZ=100};
140  //static const G4double isomerTable[nEntries][5];
143  // Table of Nuclide Property
144  // 0: Z
145  // 1: A
146  // 2: Energy [keV]
147  // 3: Life Time [ns]
148  // 4: Spin [h_bar/2]
149  // 5: Magnetic Moment [joule/tesla]
151 
152  G4IsotopeList* fIsotopeList;
153  static const G4double levelTolerance;
154 };
155 
156 
157 inline
158  size_t G4NuclideTable::entries() const
159 {
160  return fIsotopeList->size();
161 }
162 
163 inline
165 {
166  if (idx<fIsotopeList->size()) return (*fIsotopeList)[idx];
167  else return 0;
168 }
169 #endif
std::vector< G4IsotopeProperty * > G4IsotopeList
std::map< G4int, std::multimap< G4double, G4IsotopeProperty * > > map_full_list
static const G4double groundStateTable[nEntries_ground_state][6]
G4IsotopeList * fUserDefinedList
static G4double Tolerance()
long G4long
Definition: G4Types.hh:80
G4double GetThresholdOfHalfLife()
G4double threshold_of_half_life
G4IsotopeProperty * GetIsotopeByIndex(size_t idx) const
int G4int
Definition: G4Types.hh:78
size_t GetSizeOfIsotopeList()
virtual G4IsotopeProperty * GetIsotopeByIsoLvl(G4int Z, G4int A, G4int lvl=0)
G4IsotopeList * fIsotopeList
static G4long Trancate(G4double eex)
static const G4double exciteStateTable[nEntries_excite_state][6]
virtual G4IsotopeProperty * GetIsotope(G4int Z, G4int A, G4double E)
static const G4double A[nN]
std::map< G4int, std::multimap< G4double, G4IsotopeProperty * > > map_pre_load_list
static G4NuclideTable * GetNuclideTable()
void AddState(G4int, G4int, G4double, G4double, G4int, G4double)
static const G4double levelTolerance
static G4NuclideTable * GetInstance()
double G4double
Definition: G4Types.hh:76
void SetThresholdOfHalfLife(G4double t)
static G4double Round(G4double eex)
virtual ~G4NuclideTable()
static G4double GetTrancationError(G4double eex)
size_t entries() const
std::map< G4int, std::multimap< G4double, G4IsotopeProperty * > > map_hard_code_list