Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 // G4IonTable << 27 // 26 // 28 // Class description: << 27 // $Id: G4IonTable.hh 99621 2016-09-29 10:14:44Z gcosmo $ 29 // 28 // 30 // G4IonTable stores all pointers to G4Particl << 29 // 31 << 30 // ------------------------------------------------------------ 32 // Author: H.Kurashige, 27 June 1998 << 31 // GEANT 4 class header file 33 // ------------------------------------------- << 32 // 34 #ifndef G4IonTable_hh << 33 // History: first implementation, 35 #define G4IonTable_hh 1 << 34 // based on object model of June 27, 98 H.Kurashige >> 35 // ------------------------------------------------------------ >> 36 // added clear() 20 Mar., 08 H.Kurashige >> 37 // modified GetIon 02 Aug., 98 H.Kurashige >> 38 // added Remove() 06 Nov.,98 H.Kurashige >> 39 // add GetNucleusMass 15 Mar. 99 H.Kurashige >> 40 // ----- >> 41 // Modified GetIon methods 17 Aug. 99 H.Kurashige >> 42 // New design using G4VIsotopeTable 5 Oct. 99 H.Kurashige >> 43 // Add GetNucleusEncoding according PDG 2006 9 Oct. 2006 H.Kurashige >> 44 // Use STL map 30 Jul. 2009 H.Kurashige >> 45 // Add GetIsomerMass 25 July 2013 H.Kurashige >> 46 // >> 47 #ifndef G4IonTable_h >> 48 #define G4IonTable_h 1 36 49 37 #include "G4Ions.hh" << 38 #include "G4ParticleDefinition.hh" << 39 #include "G4ParticleTable.hh" << 40 #include "G4ios.hh" 50 #include "G4ios.hh" 41 #include "globals.hh" 51 #include "globals.hh" >> 52 #include "G4ParticleDefinition.hh" >> 53 #include "G4ParticleTable.hh" >> 54 #include "G4Ions.hh" 42 55 43 #include <cmath> 56 #include <cmath> 44 #include <map> << 45 #include <vector> 57 #include <vector> >> 58 #include <map> 46 59 47 class G4ParticleTable; 60 class G4ParticleTable; 48 class G4VIsotopeTable; << 61 class G4VIsotopeTable; 49 class G4IsotopeProperty; 62 class G4IsotopeProperty; 50 class G4NuclideTable; << 63 class G4NuclideTable; 51 64 52 class G4IonTable 65 class G4IonTable 53 { 66 { 54 public: << 67 // Class Description 55 using G4IonList = std::multimap<G4int, con << 68 // G4IonTable is the table of pointer to G4ParticleDefinition 56 using G4IonListIterator = std::multimap<G4 << 69 // In G4IonTable, each G4ParticleDefinition pointer is stored 57 << 70 // 58 // Constructor, destructor << 71 59 G4IonTable(); << 72 public: 60 ~G4IonTable(); << 73 // Use STL map as list of ions 61 << 74 typedef std::multimap<G4int, const G4ParticleDefinition*> G4IonList; 62 // Forbidden copy constructor and assignme << 75 typedef std::multimap<G4int, const G4ParticleDefinition*>::iterator G4IonListIterator; 63 G4IonTable(const G4IonTable&) = delete; << 76 64 G4IonTable& operator=(const G4IonTable&) = << 77 public: 65 << 78 static G4IonTable* GetIonTable() 66 static G4IonTable* GetIonTable(); << 79 { return G4ParticleTable::GetParticleTable()->GetIonTable(); } 67 << 80 68 // Method is used by each worker thread to << 81 public: 69 // from the master thread. << 82 // constructor 70 void WorkerG4IonTable(); << 83 G4IonTable(); 71 << 84 72 // Destructor for worker << 85 void SlaveG4IonTable(); 73 void DestroyWorkerG4IonTable(); << 86 void WorkerG4IonTable(); 74 << 87 // Method is used by each worker thread to copy the content from the master 75 // Get number of elements defined in the I << 88 // thread. 76 G4int GetNumberOfElements() const; << 89 77 << 90 protected: 78 // Register Isotope table << 91 // hide copy construictor as protected 79 void RegisterIsotopeTable(G4VIsotopeTable* << 92 G4IonTable(const G4IonTable &right); 80 << 93 G4IonTable & operator = (const G4IonTable &) {return *this;} 81 // G4IonTable asks properties of isotopes << 94 82 // by using FindIsotope(G4IsotopeProperty* << 95 public: 83 G4VIsotopeTable* GetIsotopeTable(std::size << 96 // destructor 84 << 97 virtual ~G4IonTable(); 85 // All ground state ions are created. << 98 void DestroyWorkerG4IonTable(); 86 // Stable ground states are defined in G4N << 99 87 void CreateAllIon(); << 100 public: // With Description 88 << 101 G4int GetNumberOfElements() const; 89 // All excited ions with long life time (> << 102 // Get number of elements defined in the IonTable 90 // Isomers are defined in G4VIsotopeTable << 103 91 void CreateAllIsomer(); << 104 // Register Isotope table 92 << 105 void RegisterIsotopeTable(G4VIsotopeTable* table); 93 // All nuclide with a life time longer tha << 106 G4VIsotopeTable* GetIsotopeTable(size_t idx=0) const; 94 // prior to the event loop << 107 // G4IonTable asks properties of isotopes to this G4VIsotopeTable 95 void PrepareNuclideTable(); << 108 // by using FindIsotope(G4IsotopeProperty* property) method. 96 void PreloadNuclide(); << 109 97 << 110 // --------------------------- 98 // --------------------------------------- << 111 // FindIon/GetIon 99 // FindIon/GetIon << 112 // FindIon methods return pointer of ion if it exists 100 // FindIon() methods return pointer of i << 113 // GetIon methods also return pointer of ion. In GetIon 101 // GetIon() methods also return pointer << 114 // methods the designated ion will be created if it does not exist. 102 // ion is created if it does not exist. << 115 // 103 // << 116 // !! PDGCharge inG4ParticleDefinition of ions is !! 104 // !! PDGCharge in G4ParticleDefinition of << 117 // !! electric charge of nucleus (i.e. fully ionized ions) !! 105 // !! electric charge of nucleus (i.e. ful << 118 // ----------------------------- 106 // --------------------------------------- << 119 107 << 120 void CreateAllIon(); 108 // Find/Get "ground state" and "excited st << 121 // All ground state ions will be created 109 // << 122 // stabele ground states are defined in G4NuclearProperty 110 G4ParticleDefinition* GetIon(G4int Z, G4in << 123 111 G4ParticleDefinition* GetIon(G4int Z, G4in << 124 void CreateAllIsomer(); 112 G4ParticleDefinition* GetIon(G4int Z, G4in << 125 // All excited ions with long life time (>1.0*ns) will be created 113 G4ParticleDefinition* GetIon(G4int Z, G4in << 126 // isomers are defined in G4VIsotopeTable 114 G4int J = 0); << 127 115 G4ParticleDefinition* GetIon(G4int Z, G4in << 128 void PrepareNuclideTable(); 116 G4ParticleDefinition* GetIon(G4int Z, G4in << 129 void PreloadNuclide(); 117 G4ParticleDefinition* GetIon(G4int Z, G4in << 130 // All nuclide with a life time longer than certain value will be created 118 G4Ions::G4Flo << 131 // prior to the event loop. 119 G4ParticleDefinition* GetIon(G4int Z, G4in << 132 120 // Z: Atomic Number << 133 // Find/Get "ground state" and "excited state" 121 // A: Atomic Mass (nn + np +nlambda) << 134 G4ParticleDefinition* GetIon(G4int Z, G4int A, G4int lvl=0); 122 // nL: Number of Lambda << 135 G4ParticleDefinition* GetIon(G4int Z, G4int A, G4int L, G4int lvl); 123 // E: Excitation energy << 136 G4ParticleDefinition* GetIon(G4int Z, G4int A, G4double E, G4int J=0); 124 // lvl: Isomer Level 0: ground state) << 137 G4ParticleDefinition* GetIon(G4int Z, G4int A, G4double E, 125 // flb: Floating level base (enum defined << 138 G4Ions::G4FloatLevelBase flb, G4int J=0); 126 // flbChar: Floating level base denoted b << 139 G4ParticleDefinition* GetIon(G4int Z, G4int A, G4double E, 127 // (<null>,X,Y,Z,U,V,W,R,S,T,A,B << 140 char flbChar, G4int J=0); 128 // J: Total Angular momentum (in unit of 1 << 141 G4ParticleDefinition* GetIon(G4int Z, G4int A, G4int L, G4double E, 129 << 142 G4int J=0); 130 // The ion can be retrieved by using PDG e << 143 G4ParticleDefinition* GetIon(G4int Z, G4int A, G4int L, G4double E, 131 // !! Only ground state can be obtained .i << 144 G4Ions::G4FloatLevelBase flb, G4int J=0); 132 G4ParticleDefinition* GetIon(G4int encodin << 145 G4ParticleDefinition* GetIon(G4int Z, G4int A, G4int L, G4double E, 133 << 146 char flbChar, G4int J=0); 134 // Find/Get "excited state" << 147 // Z: Atomic Number 135 // << 148 // A: Atomic Mass (nn + np +nlambda) 136 G4ParticleDefinition* FindIon(G4int Z, G4i << 149 // L: Number of Lmabda 137 G4ParticleDefinition* FindIon(G4int Z, G4i << 150 // E: Excitaion energy 138 G4ParticleDefinition* FindIon(G4int Z, G4i << 151 // lvl: Isomer Level 0: ground state) 139 G4ParticleDefinition* FindIon(G4int Z, G4i << 152 // flb: Floating level base (enum defined in G4Ions.hh) 140 G4int J = 0) << 153 // flbChar: Floating level base denoted by a character 141 G4ParticleDefinition* FindIon(G4int Z, G4i << 154 // (<null>,X,Y,Z,U,V,W,R,S,T,A,B,C,D,E) 142 G4ParticleDefinition* FindIon(G4int Z, G4i << 155 // J: Total Angular momentum (in unit of 1/2) : not used 143 G4ParticleDefinition* FindIon(G4int Z, G4i << 156 144 G4Ions::G4Fl << 157 G4ParticleDefinition* GetIon(G4int encoding); 145 G4ParticleDefinition* FindIon(G4int Z, G4i << 158 // The ion can be get by using PDG encoding 146 G4int J = 0) << 159 // !! Only ground state can be obtained .i.e. Isomer = 0 147 // Z: Atomic Number << 160 148 // A: Atomic Mass (nn + np +nlambda) << 161 // Find/Get "excited state" 149 // nL: Number of Lambda << 162 G4ParticleDefinition* FindIon(G4int Z, G4int A, G4int lvl=0); 150 // E: Excitaion energy << 163 G4ParticleDefinition* FindIon(G4int Z, G4int A, G4int L, G4int lvl); 151 // lvl: Isomer Level 0: ground state) << 164 G4ParticleDefinition* FindIon(G4int Z, G4int A, G4double E, G4int J=0); 152 // flb: Floating level base (enum defined << 165 G4ParticleDefinition* FindIon(G4int Z, G4int A, G4double E, 153 // flbChar: Floating level base denoted b << 166 G4Ions::G4FloatLevelBase flb, G4int J=0); 154 // (<null>,X,Y,Z,U,V,W,R,S,T,A,B << 167 G4ParticleDefinition* FindIon(G4int Z, G4int A, G4double E, 155 // J: Total Angular momentum (in unit of 1 << 168 char flbChar, G4int J=0); 156 << 169 G4ParticleDefinition* FindIon(G4int Z, G4int A, G4int L, G4double E, 157 // Return true if the particle is ion << 170 G4int J=0); 158 static G4bool IsIon(const G4ParticleDefini << 171 G4ParticleDefinition* FindIon(G4int Z, G4int A, G4int L, G4double E, 159 << 172 G4Ions::G4FloatLevelBase flb, G4int J=0); 160 // Return true if the particle is anti_ion << 173 G4ParticleDefinition* FindIon(G4int Z, G4int A, G4int L, G4double E, 161 static G4bool IsAntiIon(const G4ParticleDe << 174 char flbChar, G4int J=0); 162 << 175 // Z: Atomic Number 163 // Get ion name << 176 // A: Atomic Mass (nn + np +nlambda) 164 G4String GetIonName(G4int Z, G4int A, G4in << 177 // L: Number of Lmabda 165 G4String GetIonName(G4int Z, G4int A, G4do << 178 // E: Excitaion energy 166 G4Ions::G4FloatLevelBa << 179 // lvl: Isomer Level 0: ground state) 167 G4String GetIonName(G4int Z, G4int A, G4in << 180 // flb: Floating level base (enum defined in G4Ions.hh) 168 G4Ions::G4FloatLevelBa << 181 // flbChar: Floating level base denoted by a character 169 G4String GetIonName(G4int Z, G4int A, G4in << 182 // (<null>,X,Y,Z,U,V,W,R,S,T,A,B,C,D,E) 170 << 183 // J: Total Angular momentum (in unit of 1/2) : not used 171 // Get PDG code for Ions. << 184 172 // Nuclear codes are given as 10-digit num << 185 static G4bool IsIon(const G4ParticleDefinition*); 173 // For a nucleus consisting of np protons << 186 // return true if the particle is ion 174 // A = np + nn and Z = np. << 187 175 // I gives the isomer level, with I = 0 co << 188 static G4bool IsAntiIon(const G4ParticleDefinition*); 176 // to the ground state and I >0 to excitat << 189 // return true if the particle is anti_ion 177 static G4int GetNucleusEncoding(G4int Z, G << 190 178 << 191 179 // Get PDG code for Hyper-Nucleus Ions. << 192 const G4String& GetIonName(G4int Z, G4int A, G4int lvl=0) const; 180 // Nuclear codes are given as 10-digit num << 193 const G4String& GetIonName(G4int Z, G4int A, G4double E, 181 // For a nucleus consisting of np protons << 194 G4Ions::G4FloatLevelBase flb=G4Ions::G4FloatLevelBase::no_Float) const; 182 // A = np + nn +nlambda and Z = np. << 195 const G4String& GetIonName(G4int Z, G4int A, G4int L, G4double E, 183 // nL = nlambda << 196 G4Ions::G4FloatLevelBase flb=G4Ions::G4FloatLevelBase::no_Float) const; 184 // I gives the isomer level, with I = 0 co << 197 const G4String& GetIonName(G4int Z, G4int A, G4int L, G4int lvl) const; 185 // to the ground state and I >0 to excitat << 198 // get ion name 186 static G4int GetNucleusEncoding(G4int Z, G << 199 187 << 200 static G4int GetNucleusEncoding(G4int Z, G4int A, 188 static G4bool GetNucleusByEncoding(G4int e << 201 G4double E=0.0, G4int lvl=0); 189 static G4bool GetNucleusByEncoding(G4int e << 202 // get PDG code for Ions 190 G4int& << 203 // Nuclear codes are given as 10-digit numbers +-100ZZZAAAI. 191 // Energy will not be given even for excit << 204 //For a nucleus consisting of np protons and nn neutrons 192 << 205 // A = np + nn and Z = np. 193 // These methods returns Nucleus (i.e. ful << 206 // I gives the isomer level, with I = 0 corresponding 194 // Z is Atomic Number (number of protons) << 207 // to the ground state and I >0 to excitations 195 // A is Atomic Number (number of nucleons << 208 196 // nL is number of lambda (A= nn + np + n << 209 static G4int GetNucleusEncoding(G4int Z, G4int A, G4int L, 197 // lvl is isomer level << 210 G4double E=0.0, G4int lvl=0); 198 G4double GetIonMass(G4int Z, G4int A, G4in << 211 // get PDG code for Hyper-Nucleus Ions 199 G4double GetNucleusMass(G4int Z, G4int A, << 212 // Nuclear codes are given as 10-digit numbers +-10LZZZAAAI. 200 G4double GetIsomerMass(G4int Z, G4int A, G << 213 //For a nucleus consisting of np protons and nn neutrons 201 << 214 // A = np + nn +nlambda and Z = np. 202 // Returns a life time of an ion. -1 for s << 215 // L = nlambda 203 // that is not listed in G4NuclideTable << 216 // I gives the isomer level, with I = 0 corresponding 204 G4double GetLifeTime(const G4ParticleDefin << 217 // to the ground state and I >0 to excitations 205 G4double GetLifeTime(G4int Z, G4int A, G4d << 218 206 G4Ions::G4FloatLevelB << 219 static G4bool GetNucleusByEncoding(G4int encoding, 207 G4double GetLifeTime(G4int Z, G4int A, G4d << 220 G4int &Z, G4int &A, 208 << 221 G4double &E, G4int &lvl); 209 G4ParticleDefinition* GetMuonicAtom(G4Ions << 222 static G4bool GetNucleusByEncoding(G4int encoding, 210 G4ParticleDefinition* GetMuonicAtom(G4int << 223 G4int &Z, G4int &A, G4int &L, 211 << 224 G4double &E, G4int &lvl); 212 // Return number of ions in the table << 225 // Energy will not be given even for excited state!! 213 G4int Entries() const; << 226 214 << 227 G4double GetIonMass(G4int Z, G4int A, G4int L=0, G4int lvl=0) const; 215 // Return the pointer of index-th ion in t << 228 G4double GetNucleusMass(G4int Z, G4int A, G4int L=0, G4int lvl=0) const; 216 G4ParticleDefinition* GetParticle(G4int in << 229 G4double GetIsomerMass(G4int Z, G4int A, G4int lvl=0) const; 217 << 230 // These methods returns Nucleus (i.e. full ionized atom) mass 218 // Return 'true' if the ion exists << 231 // ,where Z is Atomic Number (number of protons) and 219 G4bool Contains(const G4ParticleDefinition << 232 // A is Atomic Number (number of nucleons and hyperons) 220 << 233 // L is number of lambda (A= nn + np + nlambda) 221 // Insert/Remove an ion in the table << 234 // lvl is isomer level 222 void Insert(const G4ParticleDefinition* pa << 235 223 void Remove(const G4ParticleDefinition* pa << 236 G4double GetLifeTime(const G4ParticleDefinition*) const; 224 << 237 G4double GetLifeTime(G4int Z, G4int A, G4double E, 225 // Erase all contents in the list (not del << 238 G4Ions::G4FloatLevelBase flb=G4Ions::G4FloatLevelBase::no_Float) const; 226 void clear(); << 239 G4double GetLifeTime(G4int Z, G4int A, G4double E, char flbChar) const; 227 << 240 // Returns a life time of an ion. -1 for stable ion, and -1001 for ion 228 // Return number of ions in the table << 241 // that is not listed in G4NuclideTable. 229 G4int size() const; << 242 230 << 243 G4int Entries() const; 231 // Dump information of particles specified << 244 // Return number of ions in the table 232 void DumpTable(const G4String& particle_na << 245 233 << 246 G4ParticleDefinition* GetParticle(G4int index) const; 234 public: << 247 // Return the pointer of index-th ion in the table 235 // Needed for MT << 248 236 void InitializeLightIons(); << 249 G4bool Contains(const G4ParticleDefinition *particle) const; 237 << 250 // Return 'true' if the ion exists 238 // It is very important for multithreaded << 251 239 // the particle table pointer and the ion << 252 void Insert(const G4ParticleDefinition* particle); 240 // to let each worker thread hold its own << 253 void Remove(const G4ParticleDefinition* particle); 241 // and the ion list. This implementation i << 254 // Insert/Remove an ion in the table 242 // table thread private. The two shadow po << 255 243 // thread to copy the content from the mas << 256 void clear(); 244 static G4ThreadLocal G4IonList* fIonList; << 257 // erase all contents in the list (not delete just remove) 245 static G4ThreadLocal std::vector<G4VIsotop << 258 246 static G4IonList* fIonListShadow; << 259 G4int size() const; 247 static std::vector<G4VIsotopeTable*>* fIso << 260 // Return number of ions in the table 248 << 261 249 enum << 262 void DumpTable(const G4String &particle_name = "ALL") const; 250 { << 263 // dump information of particles specified by name 251 numberOfElements = 118 << 264 252 }; << 265 253 static const G4String elementName[numberOf << 266 protected: >> 267 G4ParticleDefinition* FindIonInMaster(G4int Z, G4int A, G4int lvl=0); >> 268 G4ParticleDefinition* FindIonInMaster(G4int Z, G4int A, G4int L, G4int lvl); >> 269 G4ParticleDefinition* FindIonInMaster(G4int Z, G4int A, G4double E, >> 270 G4Ions::G4FloatLevelBase flb, G4int J=0); >> 271 G4ParticleDefinition* FindIonInMaster(G4int Z, G4int A, G4int L, >> 272 G4double E, G4Ions::G4FloatLevelBase flb, G4int J=0); >> 273 >> 274 G4ParticleDefinition* CreateIon(G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb); >> 275 G4ParticleDefinition* CreateIon(G4int Z, G4int A, G4int L, G4double E, G4Ions::G4FloatLevelBase flb); >> 276 G4ParticleDefinition* CreateIon(G4int Z, G4int A, G4int lvl=0); >> 277 G4ParticleDefinition* CreateIon(G4int Z, G4int A, G4int L, G4int lvl); >> 278 >> 279 void InsertWorker(const G4ParticleDefinition* particle); >> 280 >> 281 // Obsolete >> 282 // G4ParticleDefinition* SlaveCreateIon(G4ParticleDefinition* ion, G4int Z, G4int A, G4double E); >> 283 // All threads share the particle table and particles including ions. This method >> 284 // is invoked by any work thread for ions that have been created by other threads >> 285 // to achieve the partial effect when ions are created by other threads. >> 286 // G4ParticleDefinition* SlaveCreateIon(G4ParticleDefinition* ion, G4int Z, G4int A, G4int L, G4double E); >> 287 // All threads share the particle table and particles including ions. This method >> 288 // is invoked by any work thread for ions that have been created by other threads >> 289 // to achieve the partial effect when ions are created by other threads. >> 290 >> 291 // Create Ion >> 292 >> 293 G4IsotopeProperty* FindIsotope(G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb) const; >> 294 G4IsotopeProperty* FindIsotope(G4int Z, G4int A, G4int lvl) const; >> 295 // Ask properties of isotopes to this G4VIsotopeTable >> 296 >> 297 G4ParticleDefinition* GetLightIon(G4int Z, G4int A) const; >> 298 G4ParticleDefinition* GetLightAntiIon(G4int Z, G4int A) const; >> 299 >> 300 G4bool IsLightIon(const G4ParticleDefinition*) const; >> 301 G4bool IsLightAntiIon(const G4ParticleDefinition*) const; >> 302 // return true if the particle is pre-defined ion >> 303 >> 304 void AddProcessManager(G4ParticleDefinition*); >> 305 // Add process manager to ions with name of 'ionName' >> 306 >> 307 G4int GetVerboseLevel() const; >> 308 // get Verbose Level defined in G4ParticleTable >> 309 >> 310 private: >> 311 G4NuclideTable* pNuclideTable; >> 312 G4bool isIsomerCreated; >> 313 // Isomer table and flag of creation >> 314 >> 315 public: >> 316 static G4ThreadLocal G4IonList* fIonList; >> 317 static G4ThreadLocal std::vector<G4VIsotopeTable*> *fIsotopeTableList; >> 318 static G4IonList* fIonListShadow; >> 319 static std::vector<G4VIsotopeTable*> *fIsotopeTableListShadow; >> 320 // It is very important for multithreaded Geant4 to keep only one copy of the >> 321 // particle table pointer and the ion table pointer. However, we try to let >> 322 // each worker thread hold its own copy of the particle dictionary and the >> 323 // ion list. This implementation is equivalent to make the ion table thread >> 324 // private. The two shadow ponters are used by each worker thread to copy the >> 325 // content from the master thread. >> 326 >> 327 enum { numberOfElements = 118}; >> 328 static const G4String elementName[numberOfElements]; >> 329 >> 330 //needed for MT >> 331 void InitializeLightIons(); >> 332 >> 333 private: >> 334 G4int n_error; >> 335 >> 336 public: >> 337 G4ParticleDefinition* GetMuonicAtom(G4Ions const*); >> 338 G4ParticleDefinition* GetMuonicAtom(G4int Z, G4int A); 254 339 255 #ifdef G4MULTITHREADED 340 #ifdef G4MULTITHREADED 256 static G4Mutex ionTableMutex; << 341 public: >> 342 static G4Mutex ionTableMutex; 257 #endif 343 #endif 258 << 259 protected: << 260 G4ParticleDefinition* FindIonInMaster(G4in << 261 G4ParticleDefinition* FindIonInMaster(G4in << 262 G4ParticleDefinition* FindIonInMaster(G4in << 263 G4Io << 264 G4ParticleDefinition* FindIonInMaster(G4in << 265 G4Io << 266 << 267 G4ParticleDefinition* CreateIon(G4int Z, G << 268 G4ParticleDefinition* CreateIon(G4int Z, G << 269 G4Ions::G4 << 270 G4ParticleDefinition* CreateIon(G4int Z, G << 271 G4ParticleDefinition* CreateIon(G4int Z, G << 272 << 273 void InsertWorker(const G4ParticleDefiniti << 274 << 275 // Create Ion << 276 << 277 G4IsotopeProperty* FindIsotope(G4int Z, G4 << 278 G4Ions::G4F << 279 G4IsotopeProperty* FindIsotope(G4int Z, G4 << 280 // Ask properties of isotopes << 281 << 282 G4ParticleDefinition* GetLightIon(G4int Z, << 283 G4ParticleDefinition* GetLightAntiIon(G4in << 284 << 285 // Return true if the particle is pre-defi << 286 G4bool IsLightIon(const G4ParticleDefiniti << 287 G4bool IsLightAntiIon(const G4ParticleDefi << 288 << 289 // Add process manager to ions with name o << 290 void AddProcessManager(G4ParticleDefinitio << 291 << 292 // Get Verbose Level defined in G4Particle << 293 G4int GetVerboseLevel() const; << 294 << 295 private: << 296 G4NuclideTable* pNuclideTable = nullptr; << 297 << 298 // Isomer table and flag of creation << 299 G4bool isIsomerCreated = false; << 300 }; 344 }; 301 345 302 // ------------------------ << 346 inline G4int G4IonTable::GetNumberOfElements() const 303 // Inline methods << 304 // ------------------------ << 305 << 306 inline G4int G4IonTable::GetNumberOfElements() << 307 { 347 { 308 return numberOfElements; 348 return numberOfElements; 309 } 349 } 310 350 311 #endif 351 #endif 312 352