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] [ 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/hadronic/models/radioactive_decay/src/G4ECDecay.cc (Version 11.3.0) and /processes/hadronic/models/radioactive_decay/src/G4ECDecay.cc (Version 7.0)


  1 //                                                  1 
  2 // *******************************************    
  3 // * License and Disclaimer                       
  4 // *                                              
  5 // * The  Geant4 software  is  copyright of th    
  6 // * the Geant4 Collaboration.  It is provided    
  7 // * conditions of the Geant4 Software License    
  8 // * LICENSE and available at  http://cern.ch/    
  9 // * include a list of copyright holders.         
 10 // *                                              
 11 // * Neither the authors of this software syst    
 12 // * institutes,nor the agencies providing fin    
 13 // * work  make  any representation or  warran    
 14 // * regarding  this  software system or assum    
 15 // * use.  Please see the license in the file     
 16 // * for the full disclaimer and the limitatio    
 17 // *                                              
 18 // * This  code  implementation is the result     
 19 // * technical work of the GEANT4 collaboratio    
 20 // * By using,  copying,  modifying or  distri    
 21 // * any work based  on the software)  you  ag    
 22 // * use  in  resulting  scientific  publicati    
 23 // * acceptance of all terms of the Geant4 Sof    
 24 // *******************************************    
 25 //                                                
 26 //////////////////////////////////////////////    
 27 //                                                
 28 //  File:   G4ECDecay.cc                          
 29 //  Author: D.H. Wright (SLAC)                    
 30 //  Date:   25 November 2014                      
 31 //                                                
 32 //////////////////////////////////////////////    
 33                                                   
 34 #include "G4ECDecay.hh"                           
 35 #include "G4IonTable.hh"                          
 36 #include "Randomize.hh"                           
 37 #include "G4ThreeVector.hh"                       
 38 #include "G4DynamicParticle.hh"                   
 39 #include "G4DecayProducts.hh"                     
 40 #include "G4VAtomDeexcitation.hh"                 
 41 #include "G4AtomicShells.hh"                      
 42 #include "G4Electron.hh"                          
 43 #include "G4LossTableManager.hh"                  
 44 #include "G4PhysicalConstants.hh"                 
 45 #include "G4SystemOfUnits.hh"                     
 46                                                   
 47 G4ECDecay::G4ECDecay(const G4ParticleDefinitio    
 48                      const G4double& branch, c    
 49                      const G4double& excitatio    
 50                      const G4Ions::G4FloatLeve    
 51                      const G4RadioactiveDecayM    
 52  : G4NuclearDecay("electron capture", mode, ex    
 53    applyARM(true)                                 
 54 {                                                 
 55   SetParent(theParentNucleus);  // Store name     
 56   SetBR(branch);                                  
 57                                                   
 58   SetNumberOfDaughters(2);                        
 59   G4IonTable* theIonTable =                       
 60     (G4IonTable*)(G4ParticleTable::GetParticle    
 61   G4int daughterZ = theParentNucleus->GetAtomi    
 62   G4int daughterA = theParentNucleus->GetAtomi    
 63   SetDaughter(0, theIonTable->GetIon(daughterZ    
 64   SetDaughter(1, "nu_e");                         
 65   DefineSubshellProbabilities(daughterZ, daugh    
 66 }                                                 
 67                                                   
 68                                                   
 69 G4ECDecay::~G4ECDecay()                           
 70 {}                                                
 71                                                   
 72                                                   
 73 G4DecayProducts* G4ECDecay::DecayIt(G4double)     
 74 {                                                 
 75   // Fill G4MT_parent with theParentNucleus (s    
 76   CheckAndFillParent();                           
 77                                                   
 78   // Fill G4MT_daughters with alpha and residu    
 79   CheckAndFillDaughters();                        
 80                                                   
 81   // Get shell number of captured electron        
 82   G4int shellIndex = -1;                          
 83   G4double ran;                                   
 84   switch (theMode)                                
 85     {                                             
 86     case KshellEC:                                
 87       shellIndex = 0;                             
 88       break;                                      
 89     case LshellEC: // PL1+PL2+PL3=1               
 90       ran=G4UniformRand();                        
 91       if (ran <= PL1) shellIndex =1;              
 92       else if (ran<= (PL1+PL2)) shellIndex =2;    
 93       else shellIndex =3;                         
 94       break;                                      
 95     case MshellEC:  // PM1+PM2+PM3=1              
 96       ran=G4UniformRand();                        
 97       if (ran < PM1) shellIndex =4;               
 98       else if (ran< (PM1+PM2)) shellIndex =5;     
 99       else shellIndex = 6;                        
100       break;                                      
101     case NshellEC: // PN1+PN2+PN3=1               
102       ran=G4UniformRand();                        
103       if (ran < PN1) shellIndex = 9;              
104       else if (ran<= (PN1+PN2)) shellIndex =2;    
105       else shellIndex =10;                        
106       break;                                      
107     default:                                      
108       G4Exception("G4ECDecay::DecayIt()", "HAD    
109                   FatalException, "Invalid ele    
110     }                                             
111                                                   
112   // Initialize decay products with parent nuc    
113   G4DynamicParticle parentParticle(G4MT_parent    
114   G4DecayProducts* products = new G4DecayProdu    
115   G4double eBind = 0.0;                           
116                                                   
117   // G4LossTableManager must already be initia    
118   // This is currently done in G4RadioactiveDe    
119   G4VAtomDeexcitation* atomDeex =                 
120           G4LossTableManager::Instance()->Atom    
121   std::vector<G4DynamicParticle*> armProducts;    
122                                                   
123   if (applyARM) {                                 
124     if (nullptr != atomDeex) {                    
125       G4int aZ = G4MT_daughters[0]->GetAtomicN    
126       G4int nShells = G4AtomicShells::GetNumbe    
127       if (shellIndex >= nShells) shellIndex =     
128       G4AtomicShellEnumerator as = G4AtomicShe    
129       const G4AtomicShell* shell = atomDeex->G    
130       eBind = shell->BindingEnergy();             
131       if (atomDeex->IsFluoActive() && aZ > 5 &    
132         // Do atomic relaxation                   
133   // VI, SI                                       
134   // Allows fixing of Bugzilla 1727               
135   //const G4double deexLimit = 0.1*keV;           
136   G4double deexLimit = 0.1*keV;                   
137   if (G4EmParameters::Instance()->Deexcitation    
138                                                   
139         atomDeex->GenerateParticles(&armProduc    
140       }                                           
141                                                   
142       G4double productEnergy = 0.;                
143       for (std::size_t i = 0; i < armProducts.    
144         productEnergy += armProducts[i]->GetKi    
145       }                                           
146       G4double deficit = shell->BindingEnergy(    
147       if (deficit > 0.0) {                        
148         // Add a dummy electron to make up ext    
149         G4double cosTh = 1.-2.*G4UniformRand()    
150         G4double sinTh = std::sqrt(1.- cosTh*c    
151         G4double phi = twopi*G4UniformRand();     
152                                                   
153         G4ThreeVector electronDirection(sinTh*    
154                                         sinTh*    
155         G4DynamicParticle* extra =                
156           new G4DynamicParticle(G4Electron::El    
157                                 deficit);         
158         armProducts.push_back(extra);             
159       }                                           
160     } // atomDeex                                 
161   }  // applyARM                                  
162                                                   
163   G4double daughterMass = G4MT_daughters[0]->G    
164                                                   
165   // CM momentum using Q value corrected for b    
166   G4double Q = transitionQ - eBind;               
167                                                   
168   // Negative transitionQ values for some rare    
169   // Absolute values in these cases are small     
170   if (Q < 0.0) Q = 0.0;                           
171                                                   
172   G4double cmMomentum = Q*(Q + 2.*daughterMass    
173                                                   
174   G4double costheta = 2.*G4UniformRand() - 1.0    
175   G4double sintheta = std::sqrt(1.0 - costheta    
176   G4double phi  = twopi*G4UniformRand()*rad;      
177   G4ThreeVector direction(sintheta*std::cos(ph    
178                           costheta);              
179   G4double KE = cmMomentum;                       
180   G4DynamicParticle* daughterParticle =           
181     new G4DynamicParticle(G4MT_daughters[1], d    
182   products->PushProducts(daughterParticle);       
183                                                   
184   KE = std::sqrt(cmMomentum*cmMomentum + daugh    
185   daughterParticle =                              
186     new G4DynamicParticle(G4MT_daughters[0], -    
187   products->PushProducts(daughterParticle);       
188                                                   
189   std::size_t nArm = armProducts.size();          
190   if (nArm > 0) {                                 
191     G4ThreeVector bst = daughterParticle->Get4    
192     for (std::size_t i = 0; i < nArm; ++i) {      
193       G4DynamicParticle* dp = armProducts[i];     
194       G4LorentzVector lv = dp->Get4Momentum().    
195       dp->Set4Momentum(lv);                       
196       products->PushProducts(dp);                 
197     }                                             
198   }                                               
199                                                   
200   // Energy conservation check                    
201   /*                                              
202   G4int newSize = products->entries();            
203   G4DynamicParticle* temp = 0;                    
204   G4double KEsum = 0.0;                           
205   for (G4int i = 0; i < newSize; i++) {           
206     temp = products->operator[](i);               
207     KEsum += temp->GetKineticEnergy();            
208   }                                               
209                                                   
210   G4double eCons = (transitionQ - KEsum)/keV;     
211   G4cout << " EC check: Ediff (keV) = " << eCo    
212   */                                              
213   return products;                                
214 }                                                 
215                                                   
216                                                   
217 void G4ECDecay::DumpNuclearInfo()                 
218 {                                                 
219   G4cout << " G4ECDecay of parent nucleus " <<    
220   if (theMode == 3) {                             
221     G4cout << "K shell";                          
222   } else if (theMode == 4) {                      
223     G4cout << "L shell";                          
224   } else if (theMode == 5) {                      
225     G4cout << "M shell";                          
226   }                                               
227   else if (theMode == 6) {                        
228     G4cout << "N shell";                          
229   }                                               
230   G4cout << G4endl;                               
231   G4cout << " to " << GetDaughterName(0) << "     
232          << " with branching ratio " << GetBR(    
233          << transitionQ << G4endl;                
234 }                                                 
235 void G4ECDecay::DefineSubshellProbabilities(G4    
236 { //Implementation for the case of allowed tra    
237   //PL1+PL2=1. , PM1+PM2=1., PN1+PN2=1.           
238   PL1 = 1./(1+PL2overPL1[Z-1]);                   
239   PL2 = PL1*PL2overPL1[Z-1];                      
240   PM1 = 1./(1+PM2overPM1[Z-1]);                   
241   PM2 = PM1*PM2overPM1[Z-1];                      
242   PN1 = 1./(1+PN2overPN1[Z-1]);                   
243   PN2 = PN1*PN2overPN1[Z-1];                      
244 }                                                 
245 //////////////////////////////////////////////    
246 // Table of subshell ratio probability PL2/PL1    
247 // PL2/PL1 = (fL2/gL1)^2                          
248 // with gL1 and fL2 the bound electron radial     
249 //            Bambynek et al., Rev. Modern Phy    
250 // For Z=18 interpolation  between Z=17 and Z=    
251 //////////////////////////////////////////////    
252 const G4double G4ECDecay::PL2overPL1[100] = {     
253 0.0000e+00,   0.0000e+00,   0.0000e+00,   0.00    
254 2.6438e-04,   3.5456e-04,   4.5790e-04,   6.15    
255 1.4361e-03,   1.6886e-03,   1.9609e-03,   2.26    
256 3.6338e-03,   4.0310e-03,   4.4541e-03,   4.89    
257 6.9061e-03,   7.4607e-03,   8.0398e-03,   8.64    
258 1.1284e-02,   1.2004e-02,   1.2744e-02,   1.35    
259 1.6857e-02,   1.7764e-02,   1.8696e-02,   1.96    
260 2.3788e-02,   2.4896e-02,   2.6036e-02,   2.72    
261 3.2220e-02,   3.3561e-02,   3.4937e-02,   3.63    
262 4.2399e-02,   4.4010e-02,   4.5668e-02,   4.73    
263 5.4625e-02,   5.6565e-02,   5.8547e-02,   6.05    
264 6.9336e-02,   7.1667e-02,   7.4075e-02,   7.65    
265 8.7135e-02,   8.9995e-02,   9.2919e-02,   9.59    
266 1.0899e-01,   1.1249e-01,   1.1613e-01,   1.19    
267 1.3627e-01,   1.4071e-01};                        
268 //////////////////////////////////////////////    
269 // Table of subshell ratio probability PM2/PM1    
270 // PM2/PM1 = (fM2/gM1)^2                          
271 // with gM1 and fM2 the bound electron radial     
272 //            Bambynek et al., Rev. Modern Phy    
273 //////////////////////////////////////////////    
274 const G4double G4ECDecay::PM2overPM1[100] = {     
275 0.0000e+00,   0.0000e+00,   0.0000e+00,   0.00    
276 0.0000e+00,   0.0000e+00,   0.0000e+00,   0.00    
277 1.0210e-03,   1.2641e-03,   1.5231e-03,   1.79    
278 3.3637e-03,   3.7909e-03,   4.2049e-03,   4.70    
279 6.7045e-03,   7.2997e-03,   7.9438e-03,   8.62    
280 1.1594e-02,   1.2408e-02,   1.3244e-02,   1.41    
281 1.7910e-02,   1.8934e-02,   1.9986e-02,   2.10    
282 2.5750e-02,   2.7006e-02,   2.8302e-02,   2.96    
283 3.5328e-02,   3.6852e-02,   3.8414e-02,   4.00    
284 4.6909e-02,   4.8767e-02,   5.0662e-02,   5.26    
285 6.0930e-02,   6.3141e-02,   6.5413e-02,   6.77    
286 7.7721e-02,   8.0408e-02,   8.3128e-02,   8.59    
287 9.8025e-02,   1.0130e-01,   1.0463e-01,   1.08    
288 1.2290e-01,   1.2688e-01,   1.3101e-01,   1.35    
289 1.5384e-01,   1.5887e-01};                        
290 //////////////////////////////////////////////    
291 // Table of subshell ratio probability PN2/PN1    
292 // PN2/PN1 = (fN2/gN1)^2                          
293 // with gN1 and fN2 are the bound electron rad    
294 //            Bambynek et al., Rev. Modern Phy    
295 // For Z=44 interpolation  between Z=43 and Z=    
296 //////////////////////////////////////////////    
297 const G4double G4ECDecay::PN2overPN1[100] = {     
298 0.0000e+00,   0.0000e+00,   0.0000e+00,   0.00    
299 0.0000e+00,   0.0000e+00,   0.0000e+00,   0.00    
300 0.0000e+00,   0.0000e+00,   0.0000e+00,   0.00    
301 0.0000e+00,   0.0000e+00,   0.0000e+00,   0.00    
302 0.0000e+00,   0.0000e+00,   0.0000e+00,   0.00    
303 0.0000e+00,   9.6988e-03,   1.0797e-02,   1.17    
304 1.5511e-02,   1.6579e-02,   1.7646e-02,   1.87    
305 2.3710e-02,   2.5058e-02,   2.6438e-02,   2.78    
306 3.3843e-02,   3.5377e-02,   3.6886e-02,   3.85    
307 4.5470e-02,   4.7247e-02,   4.9138e-02,   5.10    
308 5.9366e-02,   6.1800e-02,   6.3945e-02,   6.63    
309 7.6538e-02,   7.9276e-02,   8.2070e-02,   8.49    
310 9.7337e-02,   1.0069e-01,   1.0410e-01,   1.07    
311 1.2282e-01,   1.2709e-01,   1.3114e-01,   1.35    
312 1.5443e-01,   1.5954e-01};                        
313                                                   
314