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 | // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
51 | //////////////////////////////////////////////////////////////////////////////// |
---|
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 | |
---|
62 | //////////////////////////////////////////////////////////////////////////////// |
---|
63 | // |
---|
64 | class G4RIsotopeTable : public G4VIsotopeTable |
---|
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 |
---|
77 | // |
---|
78 | G4RIsotopeTable (); |
---|
79 | |
---|
80 | protected: |
---|
81 | // hide copy construictor as protected |
---|
82 | G4RIsotopeTable(const G4RIsotopeTable &right); |
---|
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 | // |
---|
96 | virtual G4IsotopeProperty* GetIsotope(G4int Z, G4int A, G4double E); |
---|
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 | private: |
---|
105 | |
---|
106 | G4String GetIsotopeName(G4int Z, G4int A, G4double E); |
---|
107 | // |
---|
108 | // To generate a name for the isotope |
---|
109 | G4double GetMeanLifeTime (G4int Z, G4int A, G4double& E); |
---|
110 | // to get the mean life time and its decaytable from the database |
---|
111 | // |
---|
112 | G4IsotopeProperty* GetIsotope(G4int index) const; |
---|
113 | // Return the pointer of index-th isotope in the table |
---|
114 | |
---|
115 | G4int GetVerboseLevel() const; |
---|
116 | // get Verbose Level defined in G4ParticleTable |
---|
117 | |
---|
118 | G4int Entries() const; |
---|
119 | |
---|
120 | private: |
---|
121 | |
---|
122 | G4IsotopeList fIsotopeList; |
---|
123 | G4IsotopeNameList fIsotopeNameList; |
---|
124 | static const G4double levelTolerance; |
---|
125 | }; |
---|
126 | |
---|
127 | inline G4int G4RIsotopeTable::Entries() const |
---|
128 | {return fIsotopeNameList.size();} |
---|
129 | |
---|
130 | inline G4IsotopeProperty* G4RIsotopeTable::GetIsotope(G4int index) const |
---|
131 | { |
---|
132 | if ( (index >=0 ) && (index < Entries()) ){ |
---|
133 | return fIsotopeList[index]; |
---|
134 | } else { |
---|
135 | return 0; |
---|
136 | } |
---|
137 | } |
---|
138 | |
---|
139 | #endif |
---|
140 | |
---|
141 | |
---|
142 | |
---|
143 | |
---|
144 | |
---|
145 | |
---|