Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/particles/management/include/G4IonTable.hh

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /particles/management/include/G4IonTable.hh (Version 11.3.0) and /particles/management/include/G4IonTable.hh (Version 10.6.p3)


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