Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/examples/advanced/eRosita/physics/src/G4RDAtomicTransitionManager.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 /examples/advanced/eRosita/physics/src/G4RDAtomicTransitionManager.cc (Version 11.3.0) and /examples/advanced/eRosita/physics/src/G4RDAtomicTransitionManager.cc (Version 9.5.p2)


  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 // $Id: G4RDAtomicTransitionManager.cc,v 1.2 ????
                                                   >>  28 // GEANT4 tag $Name: emlowen-V09-01-01 $
 27 //                                                 29 //
 28 // Authors: Elena Guardincerri (Elena.Guardinc     30 // Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
 29 //          Alfonso Mantero (Alfonso.Mantero@g     31 //          Alfonso Mantero (Alfonso.Mantero@ge.infn.it)
 30 //                                                 32 //
 31 // History:                                        33 // History:
 32 // -----------                                     34 // -----------
 33 // 16 Sep 2001 E. Guardincerri  First Committe     35 // 16 Sep 2001 E. Guardincerri  First Committed to cvs
 34 //                                                 36 //
 35 // -------------------------------------------     37 // -------------------------------------------------------------------
 36                                                    38 
 37 #include "G4RDAtomicTransitionManager.hh"          39 #include "G4RDAtomicTransitionManager.hh"
 38                                                    40 
 39 G4RDAtomicTransitionManager::G4RDAtomicTransit     41 G4RDAtomicTransitionManager::G4RDAtomicTransitionManager(G4int minZ, G4int maxZ, 
 40   G4int limitInfTable,G4int limitSupTable)         42   G4int limitInfTable,G4int limitSupTable)
 41   :zMin(minZ),                                     43   :zMin(minZ), 
 42   zMax(maxZ),                                      44   zMax(maxZ),
 43   infTableLimit(limitInfTable),                    45   infTableLimit(limitInfTable),
 44   supTableLimit(limitSupTable)                     46   supTableLimit(limitSupTable)
 45 {                                                  47 {
 46   // infTableLimit is initialized to 6 because     48   // infTableLimit is initialized to 6 because EADL lacks data for Z<=5
 47   G4RDShellData* shellManager = new G4RDShellD     49   G4RDShellData* shellManager = new G4RDShellData;
 48                                                    50 
 49   // initialization of the data for auger effe     51   // initialization of the data for auger effect
 50                                                    52   
 51   augerData = new G4RDAugerData;                   53   augerData = new G4RDAugerData;
 52                                                    54 
 53   shellManager->LoadData("/fluor/binding");        55   shellManager->LoadData("/fluor/binding");
 54                                                    56   
 55   // Fills shellTable with the data from EADL,     57   // Fills shellTable with the data from EADL, identities and binding 
 56   // energies of shells                            58   // energies of shells
 57   for (G4int Z = zMin; Z<= zMax; Z++)              59   for (G4int Z = zMin; Z<= zMax; Z++)
 58     {                                              60     {
 59       std::vector<G4RDAtomicShell*> vectorOfSh     61       std::vector<G4RDAtomicShell*> vectorOfShells;  
 60       size_t shellIndex = 0;                       62       size_t shellIndex = 0; 
 61                                                    63 
 62       size_t numberOfShells=shellManager->Numb     64       size_t numberOfShells=shellManager->NumberOfShells(Z);
 63       for (shellIndex = 0; shellIndex<numberOf     65       for (shellIndex = 0; shellIndex<numberOfShells; shellIndex++) 
 64   {                                                66   { 
 65     G4int shellId = shellManager->ShellId(Z,sh     67     G4int shellId = shellManager->ShellId(Z,shellIndex);
 66     G4double bindingEnergy = shellManager->Bin     68     G4double bindingEnergy = shellManager->BindingEnergy(Z,shellIndex);
 67                                                    69    
 68     G4RDAtomicShell * shell = new G4RDAtomicSh     70     G4RDAtomicShell * shell = new G4RDAtomicShell(shellId,bindingEnergy);
 69                                                    71   
 70     vectorOfShells.push_back(shell);               72     vectorOfShells.push_back(shell);
 71   }                                                73   }
 72                                                    74     
 73       //     shellTable.insert(std::make_pair(     75       //     shellTable.insert(std::make_pair(Z, vectorOfShells));
 74       shellTable[Z] = vectorOfShells;              76       shellTable[Z] = vectorOfShells;
 75     }                                              77     }
 76                                                    78   
 77   // Fills transitionTable with the data from      79   // Fills transitionTable with the data from EADL, identities, transition 
 78   // energies and transition probabilities         80   // energies and transition probabilities
 79   for (G4int Znum= infTableLimit; Znum<=supTab     81   for (G4int Znum= infTableLimit; Znum<=supTableLimit; Znum++)
 80     {  G4RDFluoData* fluoManager = new G4RDFlu     82     {  G4RDFluoData* fluoManager = new G4RDFluoData;
 81     std::vector<G4RDFluoTransition*> vectorOfT     83     std::vector<G4RDFluoTransition*> vectorOfTransitions;
 82     fluoManager->LoadData(Znum);                   84     fluoManager->LoadData(Znum);
 83                                                    85     
 84     size_t numberOfVacancies = fluoManager-> N     86     size_t numberOfVacancies = fluoManager-> NumberOfVacancies();
 85                                                    87     
 86     for (size_t vacancyIndex = 0; vacancyIndex     88     for (size_t vacancyIndex = 0; vacancyIndex<numberOfVacancies;  vacancyIndex++)
 87                                                    89       
 88       {                                            90       {
 89   std::vector<G4int>  vectorOfIds;                 91   std::vector<G4int>  vectorOfIds;
 90   G4DataVector vectorOfEnergies;                   92   G4DataVector vectorOfEnergies;
 91   G4DataVector vectorOfProbabilities;              93   G4DataVector vectorOfProbabilities;
 92                                                    94   
 93   G4int finalShell = fluoManager->VacancyId(va     95   G4int finalShell = fluoManager->VacancyId(vacancyIndex);
 94   size_t numberOfTransitions = fluoManager->Nu     96   size_t numberOfTransitions = fluoManager->NumberOfTransitions(vacancyIndex);
 95   for (size_t origShellIndex = 0; origShellInd     97   for (size_t origShellIndex = 0; origShellIndex < numberOfTransitions;
 96        origShellIndex++)                           98        origShellIndex++)
 97                                                    99       
 98     {                                             100     {
 99                                                   101       
100       G4int originatingShellId = fluoManager->    102       G4int originatingShellId = fluoManager->StartShellId(origShellIndex,vacancyIndex);
101                                                   103       
102       vectorOfIds.push_back(originatingShellId    104       vectorOfIds.push_back(originatingShellId);
103                                                   105       
104       G4double transitionEnergy = fluoManager-    106       G4double transitionEnergy = fluoManager->StartShellEnergy(origShellIndex,vacancyIndex);
105       vectorOfEnergies.push_back(transitionEne    107       vectorOfEnergies.push_back(transitionEnergy);
106       G4double transitionProbability = fluoMan    108       G4double transitionProbability = fluoManager->StartShellProb(origShellIndex,vacancyIndex);
107       vectorOfProbabilities.push_back(transiti    109       vectorOfProbabilities.push_back(transitionProbability);
108     }                                             110     }
109     G4RDFluoTransition * transition = new G4RD    111     G4RDFluoTransition * transition = new G4RDFluoTransition (finalShell,vectorOfIds,
110                     vectorOfEnergies,vectorOfP    112                     vectorOfEnergies,vectorOfProbabilities);
111     vectorOfTransitions.push_back(transition);    113     vectorOfTransitions.push_back(transition); 
112       }                                           114       }
113     //      transitionTable.insert(std::make_p    115     //      transitionTable.insert(std::make_pair(Znum, vectorOfTransitions));
114     transitionTable[Znum] = vectorOfTransition    116     transitionTable[Znum] = vectorOfTransitions;
115                                                   117       
116       delete fluoManager;                         118       delete fluoManager;
117     }                                             119     }
118   delete shellManager;                            120   delete shellManager;
119 }                                                 121 }
120                                                   122 
121 G4RDAtomicTransitionManager::~G4RDAtomicTransi    123 G4RDAtomicTransitionManager::~G4RDAtomicTransitionManager()
122                                                   124   
123 {                                                 125 { 
124                                                   126 
125   delete augerData;                               127   delete augerData;
126                                                   128 
127 std::map<G4int,std::vector<G4RDAtomicShell*>,s    129 std::map<G4int,std::vector<G4RDAtomicShell*>,std::less<G4int> >::iterator pos;
128                                                   130  
129  for (pos = shellTable.begin(); pos != shellTa    131  for (pos = shellTable.begin(); pos != shellTable.end(); pos++){
130                                                   132    
131    std::vector< G4RDAtomicShell*>vec = (*pos).    133    std::vector< G4RDAtomicShell*>vec = (*pos).second;
132                                                   134    
133    G4int vecSize=vec.size();                      135    G4int vecSize=vec.size();
134                                                   136    
135    for (G4int i=0; i< vecSize; i++){              137    for (G4int i=0; i< vecSize; i++){
136      G4RDAtomicShell* shell = vec[i];             138      G4RDAtomicShell* shell = vec[i];
137      delete shell;                                139      delete shell;     
138    }                                              140    }
139                                                   141    
140  }                                                142  }
141                                                   143  
142  std::map<G4int,std::vector<G4RDFluoTransition    144  std::map<G4int,std::vector<G4RDFluoTransition*>,std::less<G4int> >::iterator ppos;
143                                                   145  
144  for (ppos = transitionTable.begin(); ppos !=     146  for (ppos = transitionTable.begin(); ppos != transitionTable.end(); ppos++){
145                                                   147    
146    std::vector<G4RDFluoTransition*>vec = (*ppo    148    std::vector<G4RDFluoTransition*>vec = (*ppos).second;
147                                                   149    
148    G4int vecSize=vec.size();                      150    G4int vecSize=vec.size();
149                                                   151    
150    for (G4int i=0; i< vecSize; i++){              152    for (G4int i=0; i< vecSize; i++){
151    G4RDFluoTransition* transition = vec[i];       153    G4RDFluoTransition* transition = vec[i];
152    delete transition;                             154    delete transition;      
153    }                                              155    }
154                                                   156    
155  }                                                157  }   
156                                                   158  
157 }                                                 159 }
158                                                   160 
159 G4RDAtomicTransitionManager* G4RDAtomicTransit    161 G4RDAtomicTransitionManager* G4RDAtomicTransitionManager::instance = 0;
160                                                   162 
161 G4RDAtomicTransitionManager* G4RDAtomicTransit    163 G4RDAtomicTransitionManager* G4RDAtomicTransitionManager::Instance()
162 {                                                 164 {
163   if (instance == 0)                              165   if (instance == 0)
164     {                                             166     {
165       instance = new G4RDAtomicTransitionManag    167       instance = new G4RDAtomicTransitionManager;
166                                                   168      
167     }                                             169     }
168   return instance;                                170   return instance;
169 }                                                 171 }
170                                                   172 
171                                                   173 
172 G4RDAtomicShell* G4RDAtomicTransitionManager::    174 G4RDAtomicShell* G4RDAtomicTransitionManager::Shell(G4int Z, size_t shellIndex) const
173 {                                                 175 { 
174   std::map<G4int,std::vector<G4RDAtomicShell*>    176   std::map<G4int,std::vector<G4RDAtomicShell*>,std::less<G4int> >::const_iterator pos;
175                                                   177   
176   pos = shellTable.find(Z);                       178   pos = shellTable.find(Z);
177                                                   179   
178   if (pos!= shellTable.end())                     180   if (pos!= shellTable.end())
179     {                                             181     {
180       std::vector<G4RDAtomicShell*> v = (*pos)    182       std::vector<G4RDAtomicShell*> v = (*pos).second;
181       if (shellIndex<v.size())                    183       if (shellIndex<v.size())
182   {                                               184   {
183     return(v[shellIndex]);                        185     return(v[shellIndex]);
184   }                                               186   }
185       else                                        187       else 
186   {                                               188   {
187     size_t lastShell = v.size();                  189     size_t lastShell = v.size();
188     G4cout << "G4RDAtomicTransitionManager::Sh    190     G4cout << "G4RDAtomicTransitionManager::Shell - Z = " 
189      << Z << ", shellIndex = " << shellIndex      191      << Z << ", shellIndex = " << shellIndex 
190      << " not found; number of shells = " << l    192      << " not found; number of shells = " << lastShell << G4endl;
191     //  G4Exception("G4RDAtomicTransitionManag    193     //  G4Exception("G4RDAtomicTransitionManager:shell not found");
192     if (lastShell > 0)                            194     if (lastShell > 0)
193       {                                           195       {
194         return v[lastShell - 1];                  196         return v[lastShell - 1];
195       }                                           197       }
196     else                                          198     else
197       {                                           199       {     
198         return 0;                                 200         return 0;
199       }                                           201       }
200   }                                               202   }
201     }                                             203     }
202   else                                            204   else
203     {                                             205     {
204       G4Exception("G4RDAtomicTransitionManager    206       G4Exception("G4RDAtomicTransitionManager::Shell()",
205                   "InvalidSetup", FatalExcepti    207                   "InvalidSetup", FatalException, "Z not found!");
206       return 0;                                   208       return 0;
207     }                                             209     } 
208 }                                                 210 }
209                                                   211 
210 // This function gives, upon Z and the Index o    212 // This function gives, upon Z and the Index of the initial shell where te vacancy is, 
211 // the radiative transition that can happen (o    213 // the radiative transition that can happen (originating shell, energy, probability)
212                                                   214 
213 const G4RDFluoTransition* G4RDAtomicTransition    215 const G4RDFluoTransition* G4RDAtomicTransitionManager::ReachableShell(G4int Z,size_t shellIndex) const
214 {                                                 216 {
215   std::map<G4int,std::vector<G4RDFluoTransitio    217   std::map<G4int,std::vector<G4RDFluoTransition*>,std::less<G4int> >::const_iterator pos;
216   pos = transitionTable.find(Z);                  218   pos = transitionTable.find(Z);
217   if (pos!= transitionTable.end())                219   if (pos!= transitionTable.end())
218     {                                             220     {
219       std::vector<G4RDFluoTransition*> v = (*p    221       std::vector<G4RDFluoTransition*> v = (*pos).second;      
220       if (shellIndex < v.size()) return(v[shel    222       if (shellIndex < v.size()) return(v[shellIndex]);
221       else {                                      223       else {
222   G4Exception("G4RDAtomicTransitionManager::Re    224   G4Exception("G4RDAtomicTransitionManager::ReachableShell()",
223                     "InvalidCondition", FatalE    225                     "InvalidCondition", FatalException,
224                     "Reachable shell not found    226                     "Reachable shell not found!");
225   return 0;                                       227   return 0;
226       }                                           228       }
227   }                                               229   }
228   else{                                           230   else{
229     G4cout << "G4AtomicTransitionMagare warnin    231     G4cout << "G4AtomicTransitionMagare warning: No fluorescence or Auger for Z=" << Z << G4endl;
230     G4cout << "Absorbed enrgy deposited locall    232     G4cout << "Absorbed enrgy deposited locally" << G4endl;
231                                                   233 
232     //    G4Exception("G4RDAtomicTransitionMan    234     //    G4Exception("G4RDAtomicTransitionManager:Z not found");
233     return 0;                                     235     return 0;
234   }                                               236   } 
235 }                                                 237 }
236                                                   238 
237 const G4RDAugerTransition* G4RDAtomicTransitio    239 const G4RDAugerTransition* G4RDAtomicTransitionManager::ReachableAugerShell(G4int Z, G4int vacancyShellIndex) const
238 {                                                 240 {
239                                                   241   
240   G4RDAugerTransition* augerTransition = auger    242   G4RDAugerTransition* augerTransition = augerData->GetAugerTransition(Z,vacancyShellIndex);
241   return augerTransition;                         243   return augerTransition;
242 }                                                 244 }
243                                                   245 
244                                                   246 
245                                                   247 
246 G4int G4RDAtomicTransitionManager::NumberOfShe    248 G4int G4RDAtomicTransitionManager::NumberOfShells (G4int Z) const
247 {                                                 249 {
248                                                   250 
249 std::map<G4int,std::vector<G4RDAtomicShell*>,s    251 std::map<G4int,std::vector<G4RDAtomicShell*>,std::less<G4int> >::const_iterator pos;
250                                                   252 
251   pos = shellTable.find(Z);                       253   pos = shellTable.find(Z);
252                                                   254 
253   if (pos!= shellTable.end()){                    255   if (pos!= shellTable.end()){
254                                                   256 
255     std::vector<G4RDAtomicShell*> v = (*pos).s    257     std::vector<G4RDAtomicShell*> v = (*pos).second;
256                                                   258 
257     return v.size();                              259     return v.size();
258   }                                               260   }
259                                                   261 
260   else{                                           262   else{
261     G4cout << "G4AtomicTransitionMagare warnin    263     G4cout << "G4AtomicTransitionMagare warning: No fluorescence or Auger for Z=" << Z << G4endl;
262     G4cout << "Absorbed enrgy deposited locall    264     G4cout << "Absorbed enrgy deposited locally" << G4endl;
263                                                   265 
264     //    G4Exception("G4RDAtomicTransitionMan    266     //    G4Exception("G4RDAtomicTransitionManager:Z not found");
265     return 0;                                     267     return 0;
266   }                                               268   } 
267 }                                                 269 }
268                                                   270 
269 // This function returns the number of possibl    271 // This function returns the number of possible radiative transitions for the atom with atomic number Z
270 // i.e. the number of shell in wich a vacancy     272 // i.e. the number of shell in wich a vacancy can be filled with a radiative transition 
271                                                   273 
272 G4int G4RDAtomicTransitionManager::NumberOfRea    274 G4int G4RDAtomicTransitionManager::NumberOfReachableShells(G4int Z) const
273 {                                                 275 {
274 std::map<G4int,std::vector<G4RDFluoTransition*    276 std::map<G4int,std::vector<G4RDFluoTransition*>,std::less<G4int> >::const_iterator pos;
275                                                   277 
276   pos = transitionTable.find(Z);                  278   pos = transitionTable.find(Z);
277                                                   279 
278   if (pos!= transitionTable.end())                280   if (pos!= transitionTable.end())
279     {                                             281     {
280       std::vector<G4RDFluoTransition*> v = (*p    282       std::vector<G4RDFluoTransition*> v = (*pos).second;
281       return v.size();                            283       return v.size();
282     }                                             284     }
283   else                                            285   else
284     {                                             286     {
285       G4cout << "G4AtomicTransitionMagare warn    287       G4cout << "G4AtomicTransitionMagare warning: No fluorescence or Auger for Z=" << Z << G4endl;
286       G4cout << "Absorbed enrgy deposited loca    288       G4cout << "Absorbed enrgy deposited locally" << G4endl;
287                                                   289 
288       //    G4Exception("G4RDAtomicTransitionM    290       //    G4Exception("G4RDAtomicTransitionManager:Z not found");
289       return 0;                                   291       return 0;
290     }                                             292     } 
291 }                                                 293 }
292                                                   294 
293 // This function returns the number of possibl    295 // This function returns the number of possible NON-radiative transitions for the atom with atomic number Z
294 // i.e. the number of shell in wich a vacancy     296 // i.e. the number of shell in wich a vacancy can be filled with a NON-radiative transition 
295                                                   297 
296 G4int G4RDAtomicTransitionManager::NumberOfRea    298 G4int G4RDAtomicTransitionManager::NumberOfReachableAugerShells(G4int Z)const 
297 {                                                 299 {
298   G4int n = augerData->NumberOfVacancies(Z);      300   G4int n = augerData->NumberOfVacancies(Z);
299   return n;                                       301   return n;
300 }                                                 302 }
301                                                   303 
302                                                   304 
303                                                   305 
304 G4double G4RDAtomicTransitionManager::TotalRad    306 G4double G4RDAtomicTransitionManager::TotalRadiativeTransitionProbability(G4int Z, 
305                   size_t shellIndex)              307                   size_t shellIndex)
306                                                   308 
307 {                                                 309 {
308 std::map<G4int,std::vector<G4RDFluoTransition*    310 std::map<G4int,std::vector<G4RDFluoTransition*>,std::less<G4int> >::iterator pos;
309                                                   311 
310   pos = transitionTable.find(Z);                  312   pos = transitionTable.find(Z);
311                                                   313 
312   if (pos!= transitionTable.end())                314   if (pos!= transitionTable.end())
313     {                                             315     {
314       std::vector<G4RDFluoTransition*> v = (*p    316       std::vector<G4RDFluoTransition*> v = (*pos).second;
315                                                   317       
316     if (shellIndex < v.size())                    318     if (shellIndex < v.size())
317       {                                           319       {
318   G4RDFluoTransition* transition = v[shellInde    320   G4RDFluoTransition* transition = v[shellIndex];
319   G4DataVector transProb = transition->Transit    321   G4DataVector transProb = transition->TransitionProbabilities();
320   G4double totalRadTransProb = 0;                 322   G4double totalRadTransProb = 0;
321                                                   323   
322   for (size_t j = 0; j<transProb.size(); j++)     324   for (size_t j = 0; j<transProb.size(); j++) // AM -- corrected, it was 1
323   {                                               325   {
324     totalRadTransProb = totalRadTransProb + tr    326     totalRadTransProb = totalRadTransProb + transProb[j];
325   }                                               327   }
326       return totalRadTransProb;                   328       return totalRadTransProb;   
327                                                   329       
328     }                                             330     }
329     else {                                        331     else {
330       G4Exception("G4RDAtomicTransitionManager    332       G4Exception("G4RDAtomicTransitionManager::TotalRadiativeTransitionProbability()",
331                   "InvalidCondition", FatalExc    333                   "InvalidCondition", FatalException, "Shell not found!" );
332       return 0;                                   334       return 0;
333                                                   335       
334     }                                             336     }
335   }                                               337   }
336   else{                                           338   else{
337     G4cout << "G4AtomicTransitionMagare warnin    339     G4cout << "G4AtomicTransitionMagare warning: No fluorescence or Auger for Z=" << Z << G4endl;
338     G4cout << "Absorbed enrgy deposited locall    340     G4cout << "Absorbed enrgy deposited locally" << G4endl;
339                                                   341 
340     //    G4Exception("G4RDAtomicTransitionMan    342     //    G4Exception("G4RDAtomicTransitionManager:Z not found");
341                                                   343 
342     return 0;                                     344     return 0;
343   }                                               345   } 
344 }                                                 346 }
345                                                   347 
346 G4double G4RDAtomicTransitionManager::TotalNon    348 G4double G4RDAtomicTransitionManager::TotalNonRadiativeTransitionProbability(G4int Z, size_t shellIndex)
347                                                   349 
348 {                                                 350 {
349                                                   351 
350   std::map<G4int,std::vector<G4RDFluoTransitio    352   std::map<G4int,std::vector<G4RDFluoTransition*>,std::less<G4int> >::iterator pos;
351                                                   353   
352   pos = transitionTable.find(Z);                  354   pos = transitionTable.find(Z);
353                                                   355   
354   if (pos!= transitionTable.end()){               356   if (pos!= transitionTable.end()){
355                                                   357     
356     std::vector<G4RDFluoTransition*> v = (*pos    358     std::vector<G4RDFluoTransition*> v = (*pos).second;
357                                                   359   
358                                                   360     
359     if (shellIndex<v.size()){                     361     if (shellIndex<v.size()){
360                                                   362 
361       G4RDFluoTransition* transition=v[shellIn    363       G4RDFluoTransition* transition=v[shellIndex];
362       G4DataVector transProb = transition->Tra    364       G4DataVector transProb = transition->TransitionProbabilities();
363       G4double totalRadTransProb = 0;             365       G4double totalRadTransProb = 0;
364                                                   366       
365       for(size_t j = 0; j<transProb.size(); j+    367       for(size_t j = 0; j<transProb.size(); j++) // AM -- Corrected, was 1
366   {                                               368   {
367     totalRadTransProb = totalRadTransProb + tr    369     totalRadTransProb = totalRadTransProb + transProb[j];
368   }                                               370   }
369                                                   371       
370       G4double totalNonRadTransProb= (1 - tota    372       G4double totalNonRadTransProb= (1 - totalRadTransProb);
371                                                   373       
372       return totalNonRadTransProb;    }           374       return totalNonRadTransProb;    }
373                                                   375     
374     else {                                        376     else {
375       G4Exception("G4RDAtomicTransitionManager    377       G4Exception("G4RDAtomicTransitionManager::TotalNonRadiativeTransitionProbability()",
376                   "InvalidCondition", FatalExc    378                   "InvalidCondition", FatalException, "Shell not found!");
377       return 0;                                   379       return 0;
378     }                                             380     }
379   }                                               381   }
380   else{                                           382   else{
381     G4cout << "G4AtomicTransitionMagare warnin    383     G4cout << "G4AtomicTransitionMagare warning: No fluorescence or Auger for Z=" << Z << G4endl;
382     G4cout << "Absorbed enrgy deposited locall    384     G4cout << "Absorbed enrgy deposited locally" << G4endl;
383                                                   385 
384     //    G4Exception("G4RDAtomicTransitionMan    386     //    G4Exception("G4RDAtomicTransitionManager:Z not found");
385     return 0;                                     387     return 0;
386   }                                               388   } 
387 }                                                 389 }
388                                                   390 
389                                                   391 
390                                                   392 
391                                                   393 
392                                                   394 
393                                                   395 
394                                                   396 
395                                                   397 
396                                                   398 
397                                                   399 
398                                                   400