Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/electromagnetic/lowenergy/src/G4AugerData.cc

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 /processes/electromagnetic/lowenergy/src/G4AugerData.cc (Version 11.3.0) and /processes/electromagnetic/lowenergy/src/G4AugerData.cc (Version 6.2.p2)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                    <<   3 // * DISCLAIMER                                                       *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th <<   5 // * The following disclaimer summarizes all the specific disclaimers *
  6 // * the Geant4 Collaboration.  It is provided <<   6 // * of contributors to this software. The specific disclaimers,which *
  7 // * conditions of the Geant4 Software License <<   7 // * govern, are listed with their locations in:                      *
  8 // * LICENSE and available at  http://cern.ch/ <<   8 // *   http://cern.ch/geant4/license                                  *
  9 // * include a list of copyright holders.      << 
 10 // *                                                9 // *                                                                  *
 11 // * Neither the authors of this software syst     10 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     11 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     12 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     13 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file  <<  14 // * use.                                                             *
 16 // * for the full disclaimer and the limitatio << 
 17 // *                                               15 // *                                                                  *
 18 // * This  code  implementation is the result  <<  16 // * This  code  implementation is the  intellectual property  of the *
 19 // * technical work of the GEANT4 collaboratio <<  17 // * GEANT4 collaboration.                                            *
 20 // * By using,  copying,  modifying or  distri <<  18 // * By copying,  distributing  or modifying the Program (or any work *
 21 // * any work based  on the software)  you  ag <<  19 // * based  on  the Program)  you indicate  your  acceptance of  this *
 22 // * use  in  resulting  scientific  publicati <<  20 // * statement, and all its terms.                                    *
 23 // * acceptance of all terms of the Geant4 Sof << 
 24 // *******************************************     21 // ********************************************************************
 25 //                                                 22 //
 26 //                                                 23 //
 27 // Author: Alfonso Mantero (Alfonso.Mantero@ge <<  24 // $Id: G4AugerData.cc v1.0
                                                   >>  25 // 
                                                   >>  26 //
                                                   >>  27 // Author: Alfonso Mmantero (Alfonso.Mantero@ge.infn.it)
 28 //                                                 28 //
 29 // History:                                        29 // History:
 30 // -----------                                     30 // -----------
 31 // Based on G4FluoData by Elena Guardincerri       31 // Based on G4FluoData by Elena Guardincerri
 32 //                                                 32 // 
 33 // Modified:                                   <<  33 // Modified: 30.07.02 VI Add select active Z + clean up against pedantic compiler
 34 // 30.07.02 VI Add select active Z + clean up  << 
 35 //                                                 34 //
 36 // -------------------------------------------     35 // -------------------------------------------------------------------
 37                                                    36 
 38 #include <fstream>                             << 
 39 #include <sstream>                             << 
 40                                                << 
 41 #include "G4AugerData.hh"                          37 #include "G4AugerData.hh"
 42 #include "G4SystemOfUnits.hh"                  << 
 43 #include "G4DataVector.hh"                         38 #include "G4DataVector.hh"
 44 #include "G4Material.hh"                           39 #include "G4Material.hh"
 45 #include "G4Element.hh"                            40 #include "G4Element.hh"
 46 #include "G4ElementVector.hh"                      41 #include "G4ElementVector.hh"
 47                                                <<  42 #include <fstream>
 48 //....oooOO0OOooo........oooOO0OOooo........oo <<  43 #include <strstream>
 49                                                    44 
 50 G4AugerData::G4AugerData()                         45 G4AugerData::G4AugerData()
 51 {                                                  46 {
 52   numberOfVacancies.resize(105, 0);            <<  47 
                                                   >>  48   G4int n = 0;
                                                   >>  49   G4int pos = 0;
                                                   >>  50 
                                                   >>  51     for (pos = 0 ; pos < 100; pos++) 
                                                   >>  52       {
                                                   >>  53   numberOfVacancies.push_back(n);
                                                   >>  54       }
                                                   >>  55 
 53   BuildAugerTransitionTable();                     56   BuildAugerTransitionTable(); 
                                                   >>  57 
                                                   >>  58 
 54 }                                                  59 }
 55                                                    60 
 56 //....oooOO0OOooo........oooOO0OOooo........oo <<  61 G4AugerData::~G4AugerData()
                                                   >>  62 { 
                                                   >>  63   /*
                                                   >>  64   std::map<G4int,std::vector<G4AugerTransition>,std::less<G4int> >::iterator pos;
                                                   >>  65 
                                                   >>  66   for (pos = augerTransitionTable.begin(); pos != augerTransitionTable.end(); pos++)
                                                   >>  67     {
                                                   >>  68       std::vector<G4AugerTransition> dataSet = (*pos).second;
                                                   >>  69       delete dataSet;
                                                   >>  70     }
                                                   >>  71   for (pos = energyMap.begin(); pos != energyMap.end(); pos++)
                                                   >>  72     {
                                                   >>  73       std::map<G4Int,G4DataVector*,std::less<G4int>>* dataMap = (*pos).second;
                                                   >>  74       for (pos2 = newIdProbabilityMap.begin(); pos2 != idMap.end(); pos2++)
                                                   >>  75   {
                                                   >>  76     G4DataVector* dataSet = (*pos2).second;
                                                   >>  77     delete dataSet;
                                                   >>  78   }
                                                   >>  79     }
                                                   >>  80   for (pos = probabilityMap.begin(); pos != probabilityMap.end(); pos++)
                                                   >>  81     {
                                                   >>  82       std::map<G4Int,G4DataVector*,std::less<G4int>>* dataMap = (*pos).second;
                                                   >>  83       for (pos2 = newIdProbabilityMap.begin(); pos2 != idMap.end(); pos2++)
                                                   >>  84   {
                                                   >>  85     G4DataVector* dataSet = (*pos2).second;
                                                   >>  86     delete dataSet;
                                                   >>  87   }
                                                   >>  88     }
                                                   >>  89   for (pos2 = newIdMap.begin(); pos2 != idMap.end(); pos2++)
                                                   >>  90     {
                                                   >>  91       G4DataVector* dataSet = (*pos2).second;
                                                   >>  92       delete dataSet;
                                                   >>  93     }
                                                   >>  94   for (pos2 = newIdEnergyMap.begin(); pos2 != idMap.end(); pos2++)
                                                   >>  95     {
                                                   >>  96       G4DataVector* dataSet = (*pos2).second;
                                                   >>  97       delete dataSet;
                                                   >>  98     }
                                                   >>  99   for (pos2 = newIdProbabilityMap.begin(); pos2 != idMap.end(); pos2++)
                                                   >> 100     {
                                                   >> 101       G4DataVector* dataSet = (*pos2).second;
                                                   >> 102       delete dataSet;
                                                   >> 103     }
                                                   >> 104   */
                                                   >> 105 
                                                   >> 106 }
 57                                                   107 
 58 std::size_t G4AugerData::NumberOfVacancies(G4i << 108 size_t G4AugerData::NumberOfVacancies(G4int Z) const
 59 {                                                 109 {
 60   return numberOfVacancies[Z];                    110   return numberOfVacancies[Z];
 61 }                                                 111 }
 62                                                   112 
 63 //....oooOO0OOooo........oooOO0OOooo........oo << 
 64                                                << 
 65 G4int G4AugerData::VacancyId(G4int Z, G4int va    113 G4int G4AugerData::VacancyId(G4int Z, G4int vacancyIndex) const
 66 {                                                 114 {
                                                   >> 115 
 67   G4int n = 0;                                    116   G4int n = 0;
 68   if (vacancyIndex<0 || vacancyIndex>=numberOf    117   if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies[Z])
 69     {                                          << 118     {G4Exception("G4AugerData::vacancyIndex outside boundaries");}
 70       G4Exception("G4AugerData::VacancyId()"," << 
 71     }                                          << 
 72   else {                                          119   else {
 73     trans_Table::const_iterator element = auge    120     trans_Table::const_iterator element = augerTransitionTable.find(Z);
 74     if (element == augerTransitionTable.end()) << 121     if (element == augerTransitionTable.end()) {G4Exception("G4AugerData::augerTransitionTable: Data not Loaded");}
 75       G4Exception("G4AugerData::VacancyId()"," << 
 76       return 0;                                << 
 77     }                                          << 
 78     std::vector<G4AugerTransition> dataSet = (    122     std::vector<G4AugerTransition> dataSet = (*element).second;
 79     n = (G4int) dataSet[vacancyIndex].FinalShe    123     n = (G4int) dataSet[vacancyIndex].FinalShellId();
 80   }                                            << 124   }
                                                   >> 125   
 81   return n;                                       126   return n;
 82 }                                                 127 }
 83                                                   128 
 84 //....oooOO0OOooo........oooOO0OOooo........oo << 
 85                                                   129 
 86 // Attention: this method wants the vacancy in << 130 
 87 std::size_t G4AugerData::NumberOfTransitions(G << 131 // Attenzione: questa funzione vuole l'indice della vacanza, non l'Id
                                                   >> 132 
                                                   >> 133 
                                                   >> 134 size_t G4AugerData::NumberOfTransitions(G4int Z, G4int vacancyIndex) const
 88 {                                                 135 {
 89   std::size_t n = 0;                           << 136   G4int n = 0;
 90   if (vacancyIndex<0 || vacancyIndex>=numberOf    137   if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies[Z])
 91     {                                          << 138     {G4Exception("G4AugerData::vacancyIndex outside boundaries");}
 92       G4Exception("G4AugerData::VacancyId()"," << 
 93       return 0;                                << 
 94     }                                          << 
 95   else {                                          139   else {
 96     trans_Table::const_iterator element = auge    140     trans_Table::const_iterator element = augerTransitionTable.find(Z);
 97     if (element == augerTransitionTable.end()) << 141     if (element == augerTransitionTable.end()) {G4Exception("G4AugerData::augerTransitionTable: Data not Loaded");}
 98       {                                        << 
 99   G4Exception("G4AugerData::VacancyId()","de00 << 
100   return 0;                                    << 
101       }                                        << 
102     std::vector<G4AugerTransition> dataSet = (    142     std::vector<G4AugerTransition> dataSet = (*element).second;
103     n = dataSet[vacancyIndex].TransitionOrigin << 143     n = (G4int)dataSet[vacancyIndex].TransitionOriginatingShellIds()->size();
104   }                                               144   }
105   return  n;                                   << 145  return  n;
106 }                                                 146 }
107                                                   147 
108 //....oooOO0OOooo........oooOO0OOooo........oo << 
109                                                   148 
110 std::size_t G4AugerData::NumberOfAuger(G4int Z << 149 
                                                   >> 150 size_t G4AugerData::NumberOfAuger(G4int Z, G4int initIndex, G4int vacancyId) const
111 {                                                 151 {
112   std::size_t n = 0;                           << 152   size_t n = 0;
113   if (initIndex<0 || initIndex>=numberOfVacanc    153   if (initIndex<0 || initIndex>=numberOfVacancies[Z])
114     {                                          << 154     {G4Exception("G4AugerData::vacancyIndex outside boundaries");}
115       G4Exception("G4AugerData::VacancyId()"," << 
116       return 0;                                << 
117     }                                          << 
118   else {                                          155   else {
119     trans_Table::const_iterator element = auge    156     trans_Table::const_iterator element = augerTransitionTable.find(Z);
120     if (element == augerTransitionTable.end()) << 157     if (element == augerTransitionTable.end()) {G4Exception("G4AugerData::augerTransitionTable: Data not Loaded");}
121       G4Exception("G4AugerData::VacancyId()"," << 
122       return 0;                                << 
123     }                                          << 
124     std::vector<G4AugerTransition> dataSet = (    158     std::vector<G4AugerTransition> dataSet = (*element).second;
125     const std::vector<G4int>* temp =           << 159     const std::vector<G4int>* temp =  dataSet[initIndex].AugerOriginatingShellIds(vacancyId);
126       dataSet[initIndex].AugerOriginatingShell << 
127     n = temp->size();                             160     n = temp->size();
128   }                                               161   }
129   return n;                                       162   return n;
130 }                                                 163 }
131                                                   164 
132 //....oooOO0OOooo........oooOO0OOooo........oo << 165 size_t G4AugerData::AugerShellId(G4int Z, G4int vacancyIndex, G4int transId, G4int augerIndex) const
133                                                << 
134 std::size_t G4AugerData::AugerShellId(G4int Z, << 
135 {                                                 166 {
136   std::size_t n = 0;                           << 167   size_t n = 0;  
137   if (vacancyIndex<0 || vacancyIndex>=numberOf    168   if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies[Z])
138     {                                          << 169     {G4Exception("G4AugerData::vacancyIndex outside boundaries");}
139       G4Exception("G4AugerData::VacancyId()"," << 
140       return 0;                                << 
141     }                                          << 
142   else {                                          170   else {
143     trans_Table::const_iterator element = auge    171     trans_Table::const_iterator element = augerTransitionTable.find(Z);
144     if (element == augerTransitionTable.end()) << 172     if (element == augerTransitionTable.end()) {G4Exception("G4AugerData::augerTransitionTable: Data not Loaded");}
145       G4Exception("G4AugerData::VacancyId()"," << 
146       return 0;                                << 
147     }                                          << 
148     std::vector<G4AugerTransition> dataSet = (    173     std::vector<G4AugerTransition> dataSet = (*element).second;
149     n = dataSet[vacancyIndex].AugerOriginating    174     n = dataSet[vacancyIndex].AugerOriginatingShellId(augerIndex,transId);
150   }                                               175   }
151   return n;                                       176   return n;
152 }                                                 177 }
153                                                   178 
154 //....oooOO0OOooo........oooOO0OOooo........oo << 
155                                                << 
156 G4int G4AugerData::StartShellId(G4int Z, G4int    179 G4int G4AugerData::StartShellId(G4int Z, G4int vacancyIndex, G4int transitionShellIndex) const
157 {                                                 180 {
158   G4int n = 0;                                    181   G4int n = 0; 
159                                                   182 
160   if (vacancyIndex<0 || vacancyIndex>=numberOf << 183    if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies[Z]) 
161     G4Exception("G4AugerData::VacancyId()","de << 184      {G4Exception("G4AugerData::vacancyIndex outside boundaries");}
162     return 0;                                  << 
163   }                                            << 
164   else {                                          185   else {
165     trans_Table::const_iterator element = auge    186     trans_Table::const_iterator element = augerTransitionTable.find(Z);
166     if (element == augerTransitionTable.end()) << 187     if (element == augerTransitionTable.end()) {G4Exception("G4AugerData::augerTransitionTable: Data not Loaded");}
167       G4Exception("G4AugerData::VacancyId()"," << 
168       return 0;                                << 
169     }                                          << 
170     std::vector<G4AugerTransition> dataSet = (    188     std::vector<G4AugerTransition> dataSet = (*element).second;
171     n = dataSet[vacancyIndex].TransitionOrigin << 189      n = dataSet[vacancyIndex].TransitionOriginatingShellId(transitionShellIndex);
172   }                                            << 190   }
173   return n;                                    << 191    
                                                   >> 192  
                                                   >> 193  return n;
174 }                                                 194 }
175                                                   195 
176 //....oooOO0OOooo........oooOO0OOooo........oo << 
177                                                << 
178 G4double G4AugerData::StartShellEnergy(G4int Z    196 G4double G4AugerData::StartShellEnergy(G4int Z, G4int vacancyIndex, G4int transitionId, G4int augerIndex) const
179 {                                                 197 {
180   G4double energy = 0;                         << 198   G4double n = 0;
181                                                   199   
182   if (vacancyIndex<0 || vacancyIndex>=numberOf    200   if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies[Z])
183     {                                          << 201     {G4Exception("G4AugerData::vacancyIndex outside boundaries");}
184       G4Exception("G4AugerData::VacancyId()"," << 
185       return 0;                                << 
186     }                                          << 
187   else {                                          202   else {
188     trans_Table::const_iterator element = auge    203     trans_Table::const_iterator element = augerTransitionTable.find(Z);
189     if (element == augerTransitionTable.end()) << 204     if (element == augerTransitionTable.end()) {G4Exception("G4AugerData::augerTransitionTable: Data not Loaded");}
190       G4Exception("G4AugerData::VacancyId()"," << 
191       return 0;                                << 
192     }                                          << 
193     std::vector<G4AugerTransition> dataSet = (    205     std::vector<G4AugerTransition> dataSet = (*element).second;
194     energy = dataSet[vacancyIndex].AugerTransi << 206     n = dataSet[vacancyIndex].AugerTransitionEnergy(augerIndex,transitionId);
195                                                   207       
196   }                                               208   }
197   return energy;                               << 209   return n;
198 }                                                 210 }
199                                                   211 
200 //....oooOO0OOooo........oooOO0OOooo........oo << 
201                                                   212 
202 G4double G4AugerData::StartShellProb(G4int Z,     213 G4double G4AugerData::StartShellProb(G4int Z, G4int vacancyIndex,G4int transitionId,G4int augerIndex) const
203 {                                                 214 {
204   G4double prob = 0;                           << 215   G4double n = 0;
205                                                   216     
206   if (vacancyIndex<0 || vacancyIndex>=numberOf << 217     if (vacancyIndex<0 || vacancyIndex>=numberOfVacancies[Z]) 
207     {                                          << 218       {G4Exception("G4AugerData::vacancyIndex outside boundaries");}
208       G4Exception("G4AugerData::VacancyId()"," << 
209       return 0;                                << 
210     }                                          << 
211   else {                                          219   else {
212     trans_Table::const_iterator element = auge    220     trans_Table::const_iterator element = augerTransitionTable.find(Z);
213     if (element == augerTransitionTable.end()) << 221     if (element == augerTransitionTable.end()) {G4Exception("G4AugerData::augerTransitionTable: Data not Loaded");}
214       G4Exception("G4AugerData::VacancyId()"," << 
215       return 0;                                << 
216     }                                          << 
217     std::vector<G4AugerTransition> dataSet = (    222     std::vector<G4AugerTransition> dataSet = (*element).second;
218     prob = dataSet[vacancyIndex].AugerTransiti << 223     n = dataSet[vacancyIndex].AugerTransitionProbability(augerIndex, transitionId);
                                                   >> 224 
                                                   >> 225 
                                                   >> 226 
219   }                                               227   }
220   return prob;                                 << 228      return n;
221 }                                                 229 }
222                                                   230 
223 //....oooOO0OOooo........oooOO0OOooo........oo << 
224                                                << 
225 std::vector<G4AugerTransition> G4AugerData::Lo    231 std::vector<G4AugerTransition> G4AugerData::LoadData(G4int Z)
226 {                                                 232 { 
227   // Build the complete string identifying the    233   // Build the complete string identifying the file with the data set
228   std::ostringstream ost;                      << 234   
                                                   >> 235   char nameChar[100] = {""};
                                                   >> 236   std::ostrstream ost(nameChar, 100, std::ios::out);
229   if(Z != 0){                                     237   if(Z != 0){
230     ost << "au-tr-pr-"<< Z << ".dat";             238     ost << "au-tr-pr-"<< Z << ".dat";
231   }                                               239   }
232   else{                                           240   else{
233     ost << "au-tr-pr-"<<".dat";                   241     ost << "au-tr-pr-"<<".dat"; 
234   }                                               242   }
235   G4String name(ost.str());                    << 243   G4String name(nameChar);
236                                                   244   
237   const char* path = G4FindDataDir("G4LEDATA") << 245   char* path = getenv("G4LEDATA");
238   if (nullptr == path)                         << 246   if (!path)
239     {                                             247     { 
240       G4String excep = "G4AugerData::LoadData" << 248       G4String excep = "G4EMDataSet - G4LEDATA environment variable not set";
241       G4Exception(excep,"em0006", FatalExcepti << 249       G4Exception(excep);
242       std::vector<G4AugerTransition> a;        << 
243       return a;                                << 
244     }                                             250     }
245                                                   251   
246   G4String pathString(path);                      252   G4String pathString(path);
247   G4String dirFile = pathString + "/auger/" +     253   G4String dirFile = pathString + "/auger/" + name;
248   std::ifstream file(dirFile);                    254   std::ifstream file(dirFile);
249   std::filebuf* lsdp = file.rdbuf();              255   std::filebuf* lsdp = file.rdbuf();
250                                                   256   
251   if (! (lsdp->is_open()) )                       257   if (! (lsdp->is_open()) )
252     {                                             258     {
253       G4String excep = "G4AugerData::LoadData" << 259       G4String excep = "G4AugerData - data file: " + dirFile + " not found";
254       G4String msg = "Missing" + dirFile;      << 260       G4Exception(excep);
255       G4Exception(excep,"em0003", FatalExcepti << 
256     }                                             261     }
257                                                   262  
                                                   >> 263 
258   G4double a = 0;                                 264   G4double a = 0;
259   G4int k = 1;                                    265   G4int k = 1;
260   G4int sLocal = 0;                            << 266   G4int s = 0;
261                                                   267   
262   G4int vacId = 0;                                268   G4int vacId = 0;
263   std::vector<G4int>* initIds = new std::vecto    269   std::vector<G4int>* initIds = new std::vector<G4int>;
264   std::vector<G4int>* newIds = new std::vector    270   std::vector<G4int>* newIds = new std::vector<G4int>;
265   G4DataVector* transEnergies = new G4DataVect    271   G4DataVector* transEnergies = new G4DataVector;
266   G4DataVector* transProbabilities = new G4Dat    272   G4DataVector* transProbabilities = new G4DataVector;
267   std::vector<G4AugerTransition> augerTransiti    273   std::vector<G4AugerTransition> augerTransitionVector;
268   std::map<G4int,std::vector<G4int>,std::less<    274   std::map<G4int,std::vector<G4int>,std::less<G4int> >* newIdMap = 
269     new std::map<G4int,std::vector<G4int>,std:    275     new std::map<G4int,std::vector<G4int>,std::less<G4int> >;
270   std::map<G4int,G4DataVector,std::less<G4int>    276   std::map<G4int,G4DataVector,std::less<G4int> >* newEnergyMap =
271     new std::map<G4int,G4DataVector,std::less<    277     new std::map<G4int,G4DataVector,std::less<G4int> >;
272   std::map<G4int,G4DataVector,std::less<G4int>    278   std::map<G4int,G4DataVector,std::less<G4int> >* newProbabilityMap = 
273     new std::map<G4int,G4DataVector,std::less<    279     new std::map<G4int,G4DataVector,std::less<G4int> >;
                                                   >> 280 
274                                                   281   
275   do {                                            282   do {
276     file >> a;                                    283     file >> a;
                                                   >> 284 
                                                   >> 285 
277     G4int nColumns = 4;                           286     G4int nColumns = 4;
                                                   >> 287 
278     if (a == -1)                                  288     if (a == -1)
279       {                                           289       {
280   if (sLocal == 0)                             << 290 
                                                   >> 291 
                                                   >> 292 
                                                   >> 293   if (s == 0)
281     {                                             294     {
282       // End of a shell data set                  295       // End of a shell data set
283       std::vector<G4int>::iterator vectorIndex << 
284                                                   296       
                                                   >> 297       
                                                   >> 298       
                                                   >> 299       std::vector<G4int>::iterator vectorIndex = initIds->begin();
                                                   >> 300 
285       vacId = *vectorIndex;                       301       vacId = *vectorIndex;
                                                   >> 302       
                                                   >> 303             //initIds->erase(vectorIndex);
                                                   >> 304       
                                                   >> 305 
                                                   >> 306 
286       std::vector<G4int> identifiers;             307       std::vector<G4int> identifiers;
287       for (vectorIndex = initIds->begin()+1 ;     308       for (vectorIndex = initIds->begin()+1 ; vectorIndex != initIds->end(); ++vectorIndex){
288     identifiers.push_back(*vectorIndex);       << 309 
                                                   >> 310         identifiers.push_back(*vectorIndex);
289       }                                           311       }
                                                   >> 312 
290       vectorIndex = (initIds->end())-1;           313       vectorIndex = (initIds->end())-1;
                                                   >> 314 
291       G4int augerShellId = *(vectorIndex);        315       G4int augerShellId = *(vectorIndex);
292                                                << 316       
                                                   >> 317       
293       (*newIdMap)[augerShellId] = *newIds;        318       (*newIdMap)[augerShellId] = *newIds;
294       (*newEnergyMap)[augerShellId] = *transEn    319       (*newEnergyMap)[augerShellId] = *transEnergies;
295       (*newProbabilityMap)[augerShellId] = *tr    320       (*newProbabilityMap)[augerShellId] = *transProbabilities;
296                                                << 321 
297       augerTransitionVector.push_back(G4AugerT << 322       augerTransitionVector.push_back(G4AugerTransition(vacId, identifiers, newIdMap, newEnergyMap, newProbabilityMap));
298                     newIdMap, newEnergyMap, ne << 323 
299       // Now deleting all the variables I used    324       // Now deleting all the variables I used, and creating new ones for the next shell
                                                   >> 325 
300       delete newIdMap;                            326       delete newIdMap;
301       delete newEnergyMap;                        327       delete newEnergyMap;
302       delete newProbabilityMap;                   328       delete newProbabilityMap;
303                                                   329       
304       G4int n = (G4int)initIds->size();        << 330             G4int n = initIds->size();      
305       nInitShells.push_back(n);                   331       nInitShells.push_back(n);
306       numberOfVacancies[Z]++;                     332       numberOfVacancies[Z]++;
307       delete initIds;                             333       delete initIds;
308       delete newIds;                              334       delete newIds;
309       delete transEnergies;                       335       delete transEnergies;     
310       delete transProbabilities;                  336       delete transProbabilities;
311       initIds = new std::vector<G4int>;           337       initIds = new std::vector<G4int>;
312       newIds = new std::vector<G4int>;            338       newIds = new std::vector<G4int>;
313       transEnergies = new G4DataVector;        << 339             transEnergies = new G4DataVector;
314       transProbabilities = new G4DataVector;      340       transProbabilities = new G4DataVector;
315       newIdMap =                               << 341       newIdMap = new std::map<G4int,std::vector<G4int>,std::less<G4int> >;
316         new std::map<G4int,std::vector<G4int>, << 
317       newEnergyMap = new std::map<G4int,G4Data    342       newEnergyMap = new std::map<G4int,G4DataVector,std::less<G4int> >;
318       newProbabilityMap =                      << 343       newProbabilityMap = new std::map<G4int,G4DataVector,std::less<G4int> >; 
319         new std::map<G4int,G4DataVector,std::l << 344       
                                                   >> 345 
                                                   >> 346 
320     }                                             347     }      
321   ++sLocal;                                    << 348   s++;
322   if (sLocal == nColumns)                      << 349   if (s == nColumns)
323     {                                             350     {
324       sLocal = 0;                              << 351       s = 0;
325     }                                             352     }
326       }                                           353       }
                                                   >> 354     else if (a == -2)
                                                   >> 355       {
                                                   >> 356   // End of file; delete the empty vectors created 
                                                   >> 357   //when encountering the last -1 -1 row
                                                   >> 358   delete initIds;
                                                   >> 359   delete newIds;
                                                   >> 360   delete transEnergies;
                                                   >> 361   delete transProbabilities;
                                                   >> 362   delete newIdMap ;
                                                   >> 363   delete newEnergyMap;
                                                   >> 364   delete newProbabilityMap; 
                                                   >> 365       } 
327     else                                          366     else
328       {                                           367       {
329                                                   368   
330   if (k%nColumns == 3){                           369   if (k%nColumns == 3){
331     // 3rd column is the transition probabilit    370     // 3rd column is the transition probabilities
332     transProbabilities->push_back(a);          << 371     transProbabilities->push_back(a);
333     ++k;                                       << 372 
334   }                                            << 373     k++;}
335   else if(k%nColumns == 2){                       374   else if(k%nColumns == 2){  
336     // 2nd column is new auger vacancy         << 375     // 2nd column is new auger vacancy
                                                   >> 376 
                                                   >> 377     // 2nd column is new auger vacancy
                                                   >> 378 
337     G4int l = (G4int)a;                           379     G4int l = (G4int)a;
338     newIds->push_back(l);                         380     newIds->push_back(l);
339     ++k;                                       << 381 
340   }                                            << 382 
                                                   >> 383     k++;
                                                   >> 384     }
341   else if (k%nColumns == 1)                       385   else if (k%nColumns == 1)
342     {                                             386     {
343       // 1st column is shell id                   387       // 1st column is shell id
                                                   >> 388       
344       if(initIds->size() == 0) {                  389       if(initIds->size() == 0) {
345         // if this is the first data of the sh << 390         
346     // to the shell Id; so we skip the next co << 391         // if this is the first data of the shell, alla the colums are equal 
                                                   >> 392         // to the shell Id; so we skip the next colums ang go to the next row
                                                   >> 393         
347         initIds->push_back((G4int)a);             394         initIds->push_back((G4int)a);
348         // first line of initIds is the origin << 
349         file >> a;                                395         file >> a;
350         file >> a;                                396         file >> a;
351         file >> a;                                397         file >> a;
352         k = k+3;                                  398         k = k+3;
353       }                                           399       }
354       else {                                   << 400       else {
355         if((G4int)a != initIds->back()){       << 401 
                                                   >> 402         std::vector<G4int>::iterator vectorIndex = (initIds->end())-1;
                                                   >> 403         if((G4int)a != *vectorIndex){
                                                   >> 404 
                                                   >> 405 
356     if((initIds->size()) == 1) {                  406     if((initIds->size()) == 1) { 
357       initIds->push_back((G4int)a);               407       initIds->push_back((G4int)a);
358     }                                             408     }  
359     else {                                        409     else {
                                                   >> 410 
                                                   >> 411       initIds->push_back((G4int)a);
                                                   >> 412       G4int augerShellId = *vectorIndex;
360                                                   413       
361                                                   414       
362       G4int augerShellId = 0;                  << 
363       augerShellId = initIds->back();          << 
364                                                << 
365       (*newIdMap)[augerShellId] = *newIds;        415       (*newIdMap)[augerShellId] = *newIds;
366       (*newEnergyMap)[augerShellId] = *transEn    416       (*newEnergyMap)[augerShellId] = *transEnergies;
367       (*newProbabilityMap)[augerShellId] = *tr    417       (*newProbabilityMap)[augerShellId] = *transProbabilities;
368       delete newIds;                              418       delete newIds;
369       delete transEnergies;                       419       delete transEnergies;
370       delete transProbabilities;                  420       delete transProbabilities;
371       newIds = new std::vector<G4int>;            421       newIds = new std::vector<G4int>;
372       transEnergies = new G4DataVector;           422       transEnergies = new G4DataVector;
373       transProbabilities = new G4DataVector;      423       transProbabilities = new G4DataVector;
374       initIds->push_back((G4int)a);            << 
375     }                                             424     }
376         }                                         425         }
377       }                                           426       }
                                                   >> 427       
378       k++;                                        428       k++;    
                                                   >> 429      
379     }                                             430     }
380   else if (k%nColumns == 0)                       431   else if (k%nColumns == 0)
                                                   >> 432 
381     {//fourth column is transition energies       433     {//fourth column is transition energies
382       G4double e = a * MeV;                       434       G4double e = a * MeV; 
                                                   >> 435   
383       transEnergies->push_back(e);                436       transEnergies->push_back(e);
384       k=1;                                        437       k=1;
                                                   >> 438 
385     }                                             439     }
386       }                                           440       }
387   }                                               441   }
                                                   >> 442 
                                                   >> 443 
388   while (a != -2); // end of file                 444   while (a != -2); // end of file
389   file.close();                                   445   file.close();
390   delete initIds;                              << 446   return augerTransitionVector;   
391   delete newIds;                               << 
392   delete transEnergies;                        << 
393   delete transProbabilities;                   << 
394   delete newIdMap ;                            << 
395   delete newEnergyMap;                         << 
396   delete newProbabilityMap;                    << 
397   return augerTransitionVector;                << 
398 }                                                 447 }
399                                                   448 
400 //....oooOO0OOooo........oooOO0OOooo........oo << 
401                                                << 
402 void G4AugerData::BuildAugerTransitionTable()     449 void G4AugerData::BuildAugerTransitionTable()
403 {                                                 450 {
404   for (G4int element = 6; element < 105; ++ele << 451 
405     augerTransitionTable.insert(trans_Table::v << 452   //  trans_Table::iterator pos = augerTransitionTable.begin();
                                                   >> 453 
                                                   >> 454   const G4MaterialTable* materialTable = G4Material::GetMaterialTable();
                                                   >> 455 
                                                   >> 456   G4int nMaterials = G4Material::GetNumberOfMaterials();
                                                   >> 457 
                                                   >> 458   G4DataVector activeZ;
                                                   >> 459   activeZ.clear();
                                                   >> 460   
                                                   >> 461   for (G4int m=0; m<nMaterials; m++) {
                                                   >> 462 
                                                   >> 463     const G4Material* material= (*materialTable)[m];        
                                                   >> 464     const G4ElementVector* elementVector = material->GetElementVector();
                                                   >> 465     const size_t nElements = material->GetNumberOfElements();
                                                   >> 466       
                                                   >> 467     for (size_t iEl=0; iEl<nElements; iEl++) {
                                                   >> 468       G4Element* element = (*elementVector)[iEl];
                                                   >> 469       G4double Z = element->GetZ();
                                                   >> 470       if (!(activeZ.contains(Z))) {
                                                   >> 471   activeZ.push_back(Z);
                                                   >> 472       }
                                                   >> 473     }
406   }                                               474   }
407 }                                              << 
408                                                   475 
409 //....oooOO0OOooo........oooOO0OOooo........oo << 476 
                                                   >> 477   for (G4int element = 6; element < 99; element++)
                                                   >> 478     { 
                                                   >> 479       if(nMaterials == 0 || activeZ.contains(element)) {
                                                   >> 480         augerTransitionTable.insert(trans_Table::value_type(element,LoadData(element)));
                                                   >> 481       
                                                   >> 482         G4cout << "G4AugerData for Element no. " << element << " are loaded" << G4endl;
                                                   >> 483       //      PrintData(element);
                                                   >> 484       }    
                                                   >> 485     }
                                                   >> 486   
                                                   >> 487   G4cout << "AugerTransitionTable complete"<< G4endl;
                                                   >> 488 }
410                                                   489 
411 void G4AugerData::PrintData(G4int Z)              490 void G4AugerData::PrintData(G4int Z) 
412 {                                                 491 {
413   for (G4int i = 0; i < numberOfVacancies[Z];  << 492   
                                                   >> 493   for (G4int i = 0; i < numberOfVacancies[Z]; i++)
414     {                                             494     {
415       G4cout << "---- TransitionData for the v    495       G4cout << "---- TransitionData for the vacancy nb "
416        <<i                                        496        <<i
417        <<" of the atomic number elemnt "          497        <<" of the atomic number elemnt " 
418        << Z                                       498        << Z
419        <<"----- "                                 499        <<"----- "
420        <<G4endl;                                  500        <<G4endl;
421                                                   501       
422       for (G4int k = 0; k<=(G4int)NumberOfTran << 502       for (size_t k = 0; k<=NumberOfTransitions(Z,i); k++)
423   {                                               503   { 
424     G4int id = StartShellId(Z,i,k);               504     G4int id = StartShellId(Z,i,k);
425                                                   505     
426     for (G4int a = 0; a <= (G4int)NumberOfAuge << 506     for (size_t a = 0; a <= NumberOfAuger(Z,i,id); a++) {
427       G4double e = StartShellEnergy(Z,i,id,a)/ << 507       
                                                   >> 508       G4double e = StartShellEnergy(Z,i,id,a) /MeV;
428       G4double p = StartShellProb(Z,i,id,a);      509       G4double p = StartShellProb(Z,i,id,a);
429       std::size_t augerId = AugerShellId(Z, i, << 510       G4int augerId = AugerShellId(Z, i, id, a);
430       G4cout << k <<") Shell id: " << id <<G4e    511       G4cout << k <<") Shell id: " << id <<G4endl;
431       G4cout << "    Auger Originatig Shell Id    512       G4cout << "    Auger Originatig Shell Id :"<< augerId <<G4endl;
432       G4cout << " - Transition energy = " << e    513       G4cout << " - Transition energy = " << e << " MeV "<<G4endl;
433       G4cout << " - Transition probability = " << 514       G4cout   << " - Transition probability = " << p <<G4endl;
434     }                                             515     }
435   }                                               516   }
436       G4cout << "-----------------------------    517       G4cout << "-------------------------------------------------" 
437        << G4endl;                                 518        << G4endl;
438     }                                             519     }
439 }                                                 520 }
                                                   >> 521 G4AugerTransition* G4AugerData::GetAugerTransition(G4int Z,G4int vacancyShellIndex)
                                                   >> 522     {
                                                   >> 523       std::vector<G4AugerTransition>* dataSet = &augerTransitionTable[Z];
                                                   >> 524       std::vector<G4AugerTransition>::iterator vectorIndex = dataSet->begin() + vacancyShellIndex;
440                                                   525 
441 //....oooOO0OOooo........oooOO0OOooo........oo << 526       G4AugerTransition* augerTransition = &(*vectorIndex);
442                                                << 527       return augerTransition;
443 G4AugerTransition*                             << 528     }
444 G4AugerData::GetAugerTransition(G4int Z, G4int << 
445 {                                              << 
446   std::vector<G4AugerTransition>* dataSet = &a << 
447   std::vector<G4AugerTransition>::iterator vec << 
448     dataSet->begin() + vacancyShellIndex;      << 
449                                                   529   
450   G4AugerTransition* augerTransition = &(*vect << 
451   return augerTransition;                      << 
452 }                                              << 
453                                                << 
454 //....oooOO0OOooo........oooOO0OOooo........oo << 
455                                                << 
456 std::vector<G4AugerTransition>* G4AugerData::G    530 std::vector<G4AugerTransition>* G4AugerData::GetAugerTransitions(G4int Z)
457 {                                              << 531   {
458   std::vector<G4AugerTransition>* dataSet = &a << 532     std::vector<G4AugerTransition>* dataSet = &augerTransitionTable[Z];
459   return dataSet;                              << 533     return dataSet;
460 }                                              << 534   }
461                                                << 535  
462                                                   536 
463                                                   537 
464                                                   538 
465                                                   539 
466                                                   540 
467                                                   541 
468                                                   542 
469                                                   543 
470                                                   544 
471                                                   545 
472                                                   546 
473                                                   547 
474                                                   548 
475                                                   549 
476                                                   550 
477                                                   551 
478                                                   552 
479                                                   553 
480                                                   554 
481                                                   555 
482                                                   556