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