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 10.5)


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