Geant4  10.01.p03
G4RIsotopeTable.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 G4RIsotopeTable_h
27 #define G4RIsotopeTable_h 1
28 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
29 //
30 // MODULE: G4RIsotopeTable.hh
31 //
32 // Version: 0.b.4
33 // Date: 14/04/00
34 // Author: F Lei & P R Truscott
35 // Organisation: DERA UK
36 // Customer: ESA/ESTEC, NOORDWIJK
37 // Contract: 12115/96/JG/NL Work Order No. 3
38 //
39 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
40 //
41 // CHANGE HISTORY
42 // --------------
43 //
44 // 29 February 2000, P R Truscott, DERA UK
45 // 0.b.3 release.
46 //
47 // 13 April 2000, F Lei, DERA UK
48 // 0.b.4 release. No change to this file
49 //
50 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
52 //
53 #include "globals.hh"
54 #include "G4IsotopeProperty.hh"
55 #include "G4VIsotopeTable.hh"
56 #include "G4Ions.hh"
57 #include "G4IonTable.hh"
58 #include "G4DecayTable.hh"
59 
60 #include <vector>
61 
63 //
65 {
66  // class description
67  // G4RIsotopeTable is the table of pointers to G4IsotopeProperty.
68  // It is derived from the abstract base class G4VIsotopeTable
69  // class description - end
70 public:
71  //
72  typedef std::vector<G4IsotopeProperty*> G4IsotopeList;
73  typedef std::vector<G4String> G4IsotopeNameList;
74 
75 public:
76  // constructor
78 
79 protected:
80  // Hide copy constructor and assignment operator as protected
83 
84 public:
85  // destructor
86  virtual ~G4RIsotopeTable();
87 
88 public:
89  // with description
90  //
91  virtual G4bool FindIsotope(G4IsotopeProperty* property);
92  // The FindIsotope function will replace the pure virtual one defined in the
93  // abstract base class G4VIstopeTable. We don't use this fuction in this
94  // implementation, instead we use the next function.
95  //
97  //
98  // again it will replace the pure virtual one in the abstract base class.
99  //
100  // Z: Atomic Number
101  // A: Atomic Mass
102  // E: Excitaion energy
103 
104 
105  void AddUserDecayDataFile(G4int Z, G4int A,G4String filename);
106  //Allow the user to replace the radio-active decay data provided in Geant4
107  // by its own data file for a given isotope
108 
109 
110 private:
111 
113  //
114  // To generate a name for the isotope
116  // to get the mean life time and its decaytable from the database
117  //
118  G4IsotopeProperty* GetIsotope(G4int index) const;
119  // Return the pointer of index-th isotope in the table
120 
121  G4int GetVerboseLevel() const;
122  // get Verbose Level defined in G4ParticleTable
123 
124  G4int Entries() const;
125 
126 private:
127 
128  G4IsotopeList fIsotopeList;
129  G4IsotopeNameList fIsotopeNameList;
130  static const G4double levelTolerance;
131 
132  //User define radioactive decay data files replacing some files in the G4RADECAY database
133  std::map<G4int, G4String> theUserRadioactiveDataFiles;
134 
135 };
136 
138  {return fIsotopeNameList.size();}
139 
141 {
142  if ( (index >=0 ) && (index < Entries()) ){
143  return fIsotopeList[index];
144  } else {
145  return 0;
146  }
147 }
148 
149 #endif
150 
151 
152 
153 
154 
155 
virtual G4IsotopeProperty * GetIsotope(G4int Z, G4int A, G4double E)
virtual ~G4RIsotopeTable()
void AddUserDecayDataFile(G4int Z, G4int A, G4String filename)
virtual G4bool FindIsotope(G4IsotopeProperty *property)
std::vector< G4IsotopeProperty * > G4IsotopeList
static const G4double levelTolerance
int G4int
Definition: G4Types.hh:78
G4RIsotopeTable & operator=(const G4RIsotopeTable &right)
G4int GetVerboseLevel() const
std::vector< G4String > G4IsotopeNameList
bool G4bool
Definition: G4Types.hh:79
static const G4double A[nN]
G4int Entries() const
G4double GetMeanLifeTime(G4int Z, G4int A, G4double &E)
double G4double
Definition: G4Types.hh:76
G4IsotopeList fIsotopeList
std::map< G4int, G4String > theUserRadioactiveDataFiles
G4String GetIsotopeName(G4int Z, G4int A, G4double E)
G4IsotopeNameList fIsotopeNameList