Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/electromagnetic/lowenergy/src/G4LivermoreComptonModel.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/G4LivermoreComptonModel.cc (Version 11.3.0) and /processes/electromagnetic/lowenergy/src/G4LivermoreComptonModel.cc (Version 8.3)


  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 // Author: Alexander Bagulya                      
 29 //         11 March 2012                          
 30 //         on the base of G4LivermoreComptonMo    
 31 //                                                
 32 // History:                                       
 33 // --------                                       
 34 // 18 Apr 2009   V Ivanchenko Cleanup initiali    
 35 //                  - apply internal high-ener    
 36 //                  - do not apply low-energy     
 37 //                  - remove GetMeanFreePath m    
 38 //                  - added protection against    
 39 //                  - use G4ElementSelector       
 40 // 26 Dec 2010   V Ivanchenko Load data tables    
 41                                                   
 42 #include "G4LivermoreComptonModel.hh"             
 43                                                   
 44 #include "G4AtomicShell.hh"                       
 45 #include "G4AutoLock.hh"                          
 46 #include "G4DopplerProfile.hh"                    
 47 #include "G4Electron.hh"                          
 48 #include "G4Exp.hh"                               
 49 #include "G4Log.hh"                               
 50 #include "G4LossTableManager.hh"                  
 51 #include "G4ParticleChangeForGamma.hh"            
 52 #include "G4PhysicalConstants.hh"                 
 53 #include "G4ShellData.hh"                         
 54 #include "G4SystemOfUnits.hh"                     
 55 #include "G4VAtomDeexcitation.hh"                 
 56                                                   
 57 //....oooOO0OOooo........oooOO0OOooo........oo    
 58                                                   
 59 namespace                                         
 60 {                                                 
 61 G4Mutex LivermoreComptonModelMutex = G4MUTEX_I    
 62 }                                                 
 63 using namespace std;                              
 64                                                   
 65 G4PhysicsFreeVector* G4LivermoreComptonModel::    
 66 G4ShellData* G4LivermoreComptonModel::shellDat    
 67 G4DopplerProfile* G4LivermoreComptonModel::pro    
 68 G4String G4LivermoreComptonModel::gDataDirecto    
 69                                                   
 70 static const G4double ln10 = G4Log(10.);          
 71                                                   
 72 G4LivermoreComptonModel::G4LivermoreComptonMod    
 73   : G4VEmModel(nam)                               
 74 {                                                 
 75   fParticleChange = nullptr;                      
 76   verboseLevel = 1;                               
 77   // Verbosity scale:                             
 78   // 0 = nothing                                  
 79   // 1 = warning for energy non-conservation      
 80   // 2 = details of energy budget                 
 81   // 3 = calculation of cross sections, file o    
 82   // 4 = entering in methods                      
 83                                                   
 84   if (verboseLevel > 1) {                         
 85     G4cout << "Livermore Compton model is cons    
 86   }                                               
 87                                                   
 88   // Mark this model as "applicable" for atomi    
 89   SetDeexcitationFlag(true);                      
 90                                                   
 91   fParticleChange = nullptr;                      
 92   fAtomDeexcitation = nullptr;                    
 93 }                                                 
 94                                                   
 95 //....oooOO0OOooo........oooOO0OOooo........oo    
 96                                                   
 97 G4LivermoreComptonModel::~G4LivermoreComptonMo    
 98 {                                                 
 99   if (IsMaster()) {                               
100     delete shellData;                             
101     shellData = nullptr;                          
102     delete profileData;                           
103     profileData = nullptr;                        
104     for (G4int i = 0; i <= maxZ; ++i) {           
105       if (data[i]) {                              
106         delete data[i];                           
107         data[i] = nullptr;                        
108       }                                           
109     }                                             
110   }                                               
111 }                                                 
112                                                   
113 //....oooOO0OOooo........oooOO0OOooo........oo    
114                                                   
115 void G4LivermoreComptonModel::Initialise(const    
116                                          const    
117 {                                                 
118   if (verboseLevel > 1) {                         
119     G4cout << "Calling G4LivermoreComptonModel    
120   }                                               
121                                                   
122   // Initialise element selector                  
123   if (IsMaster()) {                               
124     // Initialise element selector                
125     InitialiseElementSelectors(particle, cuts)    
126                                                   
127     // Access to elements                         
128     const G4ElementTable* elemTable = G4Elemen    
129     size_t numElems = (*elemTable).size();        
130     for (size_t ie = 0; ie < numElems; ++ie) {    
131       const G4Element* elem = (*elemTable)[ie]    
132       const G4int Z = std::min(maxZ, elem->Get    
133       if (data[Z] == nullptr) {                   
134         ReadData(Z);                              
135       }                                           
136     }                                             
137                                                   
138     // For Doppler broadening                     
139     if (shellData == nullptr) {                   
140       shellData = new G4ShellData();              
141       shellData->SetOccupancyData();              
142       G4String file = "/doppler/shell-doppler"    
143       shellData->LoadData(file);                  
144     }                                             
145     if (profileData == nullptr) {                 
146       profileData = new G4DopplerProfile();       
147     }                                             
148   }                                               
149                                                   
150   if (verboseLevel > 2) {                         
151     G4cout << "Loaded cross section files" <<     
152   }                                               
153                                                   
154   if (verboseLevel > 1) {                         
155     G4cout << "G4LivermoreComptonModel is init    
156            << "Energy range: " << LowEnergyLim    
157            << " GeV" << G4endl;                   
158   }                                               
159   //                                              
160   if (isInitialised) {                            
161     return;                                       
162   }                                               
163                                                   
164   fParticleChange = GetParticleChangeForGamma(    
165   fAtomDeexcitation = G4LossTableManager::Inst    
166   isInitialised = true;                           
167 }                                                 
168                                                   
169 //....oooOO0OOooo........oooOO0OOooo........oo    
170                                                   
171 void G4LivermoreComptonModel::InitialiseLocal(    
172 {                                                 
173   SetElementSelectors(masterModel->GetElementS    
174 }                                                 
175                                                   
176 //....oooOO0OOooo........oooOO0OOooo........oo    
177                                                   
178 const G4String& G4LivermoreComptonModel::FindD    
179 {                                                 
180   // no check in this method - environment var    
181   if (gDataDirectory.empty()) {                   
182     auto param = G4EmParameters::Instance();      
183     std::ostringstream ost;                       
184     if (param->LivermoreDataDir() == "livermor    
185       ost << param->GetDirLEDATA() << "/liverm    
186     }                                             
187     else {                                        
188       ost << param->GetDirLEDATA() << "/epics2    
189     }                                             
190     gDataDirectory = ost.str();                   
191   }                                               
192   return gDataDirectory;                          
193 }                                                 
194                                                   
195 //....oooOO0OOooo........oooOO0OOooo........oo    
196                                                   
197 void G4LivermoreComptonModel::ReadData(const G    
198 {                                                 
199   if (verboseLevel > 1) {                         
200     G4cout << "G4LivermoreComptonModel::ReadDa    
201   }                                               
202   const G4int Z = std::min(ZZ, maxZ);             
203                                                   
204   if (data[Z] != nullptr) {                       
205     return;                                       
206   }                                               
207                                                   
208   data[Z] = new G4PhysicsFreeVector();            
209                                                   
210   std::ostringstream ost;                         
211   ost << FindDirectoryPath() << "ce-cs-" << Z     
212                                                   
213   std::ifstream fin(ost.str().c_str());           
214                                                   
215   if (!fin.is_open()) {                           
216     G4ExceptionDescription ed;                    
217     ed << "G4LivermoreComptonModel data file <    
218        << G4endl;                                 
219     G4Exception("G4LivermoreComptonModel::Read    
220                 "G4LEDATA version should be G4    
221     return;                                       
222   }                                               
223   else {                                          
224     if (verboseLevel > 3) {                       
225       G4cout << "File " << ost.str() << " is o    
226     }                                             
227     data[Z]->Retrieve(fin, true);                 
228     data[Z]->ScaleVector(MeV, MeV * barn);        
229   }                                               
230   fin.close();                                    
231 }                                                 
232                                                   
233 //....oooOO0OOooo........oooOO0OOooo........oo    
234                                                   
235 G4double G4LivermoreComptonModel::ComputeCross    
236                                                   
237                                                   
238 {                                                 
239   if (verboseLevel > 3) {                         
240     G4cout << "G4LivermoreComptonModel::Comput    
241   }                                               
242   G4double cs = 0.0;                              
243                                                   
244   if (GammaEnergy < LowEnergyLimit()) {           
245     return 0.0;                                   
246   }                                               
247                                                   
248   G4int intZ = G4lrint(Z);                        
249   if (intZ < 1 || intZ > maxZ) {                  
250     return cs;                                    
251   }                                               
252                                                   
253   G4PhysicsFreeVector* pv = data[intZ];           
254                                                   
255   // if element was not initialised               
256   // do initialisation safely for MT mode         
257   if (pv == nullptr) {                            
258     InitialiseForElement(nullptr, intZ);          
259     pv = data[intZ];                              
260     if (pv == nullptr) {                          
261       return cs;                                  
262     }                                             
263   }                                               
264                                                   
265   auto n = G4int(pv->GetVectorLength() - 1);      
266   G4double e1 = pv->Energy(0);                    
267   G4double e2 = pv->Energy(n);                    
268                                                   
269   if (GammaEnergy <= e1) {                        
270     cs = GammaEnergy / (e1 * e1) * pv->Value(e    
271   }                                               
272   else if (GammaEnergy <= e2) {                   
273     cs = pv->Value(GammaEnergy) / GammaEnergy;    
274   }                                               
275   else if (GammaEnergy > e2) {                    
276     cs = pv->Value(e2) / GammaEnergy;             
277   }                                               
278                                                   
279   return cs;                                      
280 }                                                 
281                                                   
282 //....oooOO0OOooo........oooOO0OOooo........oo    
283                                                   
284 void G4LivermoreComptonModel::SampleSecondarie    
285                                                   
286                                                   
287                                                   
288 {                                                 
289   // The scattered gamma energy is sampled acc    
290   // formula then accepted or rejected dependi    
291   // multiplied by factor from Klein - Nishina    
292   // Expression of the angular distribution as    
293   // angular and energy distribution and Scatt    
294   // D. E. Cullen "A simple model of photon tr    
295   // Phys. Res. B 101 (1995). Method of sampli    
296   // data are interpolated while in the articl    
297   // Reference to the article is from J. Stepa    
298   // and Electron Interaction Data for GEANT i    
299   // TeV (draft).                                 
300   // The random number techniques of Butcher &    
301   // (Nucl Phys 20(1960),15).                     
302                                                   
303   G4double photonEnergy0 = aDynamicGamma->GetK    
304                                                   
305   if (verboseLevel > 3) {                         
306     G4cout << "G4LivermoreComptonModel::Sample    
307            << " in " << couple->GetMaterial()-    
308   }                                               
309                                                   
310   // do nothing below the threshold               
311   // should never get here because the XS is z    
312   if (photonEnergy0 < LowEnergyLimit()) return    
313                                                   
314   G4double e0m = photonEnergy0 / electron_mass    
315   G4ParticleMomentum photonDirection0 = aDynam    
316                                                   
317   // Select randomly one element in the curren    
318   const G4ParticleDefinition* particle = aDyna    
319   const G4Element* elm = SelectRandomAtom(coup    
320                                                   
321   G4int Z = elm->GetZasInt();                     
322                                                   
323   G4double epsilon0Local = 1. / (1. + 2. * e0m    
324   G4double epsilon0Sq = epsilon0Local * epsilo    
325   G4double alpha1 = -G4Log(epsilon0Local);        
326   G4double alpha2 = 0.5 * (1. - epsilon0Sq);      
327                                                   
328   G4double wlPhoton = h_Planck * c_light / pho    
329                                                   
330   // Sample the energy of the scattered photon    
331   G4double epsilon;                               
332   G4double epsilonSq;                             
333   G4double oneCosT;                               
334   G4double sinT2;                                 
335   G4double gReject;                               
336                                                   
337   if (verboseLevel > 3) {                         
338     G4cout << "Started loop to sample gamma en    
339   }                                               
340                                                   
341   do {                                            
342     if (alpha1 / (alpha1 + alpha2) > G4Uniform    
343       epsilon = G4Exp(-alpha1 * G4UniformRand(    
344       epsilonSq = epsilon * epsilon;              
345     }                                             
346     else {                                        
347       epsilonSq = epsilon0Sq + (1. - epsilon0S    
348       epsilon = std::sqrt(epsilonSq);             
349     }                                             
350                                                   
351     oneCosT = (1. - epsilon) / (epsilon * e0m)    
352     sinT2 = oneCosT * (2. - oneCosT);             
353     G4double x = std::sqrt(oneCosT / 2.) * cm     
354     G4double scatteringFunction = ComputeScatt    
355     gReject = (1. - epsilon * sinT2 / (1. + ep    
356                                                   
357   } while (gReject < G4UniformRand() * Z);        
358                                                   
359   G4double cosTheta = 1. - oneCosT;               
360   G4double sinTheta = std::sqrt(sinT2);           
361   G4double phi = twopi * G4UniformRand();         
362   G4double dirx = sinTheta * std::cos(phi);       
363   G4double diry = sinTheta * std::sin(phi);       
364   G4double dirz = cosTheta;                       
365                                                   
366   // Doppler broadening -  Method based on:       
367   // Y. Namito, S. Ban and H. Hirayama,           
368   // "Implementation of the Doppler Broadening    
369   // into the EGS4 Code", NIM A 349, pp. 489-4    
370                                                   
371   // Maximum number of sampling iterations        
372   static G4int maxDopplerIterations = 1000;       
373   G4double bindingE = 0.;                         
374   G4double photonEoriginal = epsilon * photonE    
375   G4double photonE = -1.;                         
376   G4int iteration = 0;                            
377   G4double eMax = photonEnergy0;                  
378                                                   
379   G4int shellIdx = 0;                             
380                                                   
381   if (verboseLevel > 3) {                         
382     G4cout << "Started loop to sample broading    
383   }                                               
384                                                   
385   do {                                            
386     ++iteration;                                  
387     // Select shell based on shell occupancy      
388     shellIdx = shellData->SelectRandomShell(Z)    
389     bindingE = shellData->BindingEnergy(Z, she    
390                                                   
391     if (verboseLevel > 3) {                       
392       G4cout << "Shell ID= " << shellIdx << "     
393     }                                             
394                                                   
395     eMax = photonEnergy0 - bindingE;              
396                                                   
397     // Randomly sample bound electron momentum    
398     // (memento: the data set is in Atomic Uni    
399     G4double pSample = profileData->RandomSele    
400     if (verboseLevel > 3) {                       
401       G4cout << "pSample= " << pSample << G4en    
402     }                                             
403     // Rescale from atomic units                  
404     G4double pDoppler = pSample * fine_structu    
405     G4double pDoppler2 = pDoppler * pDoppler;     
406     G4double var2 = 1. + oneCosT * e0m;           
407     G4double var3 = var2 * var2 - pDoppler2;      
408     G4double var4 = var2 - pDoppler2 * cosThet    
409     G4double var = var4 * var4 - var3 + pDoppl    
410     if (var > 0.) {                               
411       G4double varSqrt = std::sqrt(var);          
412       G4double scale = photonEnergy0 / var3;      
413       // Random select either root                
414       if (G4UniformRand() < 0.5) {                
415         photonE = (var4 - varSqrt) * scale;       
416       }                                           
417       else {                                      
418         photonE = (var4 + varSqrt) * scale;       
419       }                                           
420     }                                             
421     else {                                        
422       photonE = -1.;                              
423     }                                             
424   } while (iteration <= maxDopplerIterations &    
425                                                   
426   // End of recalculation of photon energy wit    
427   // Revert to original if maximum number of i    
428   // has been reached                             
429   if (iteration >= maxDopplerIterations) {        
430     photonE = photonEoriginal;                    
431     bindingE = 0.;                                
432   }                                               
433                                                   
434   // Update G4VParticleChange for the scattere    
435   G4ThreeVector photonDirection1(dirx, diry, d    
436   photonDirection1.rotateUz(photonDirection0);    
437   fParticleChange->ProposeMomentumDirection(ph    
438                                                   
439   G4double photonEnergy1 = photonE;               
440                                                   
441   if (photonEnergy1 > 0.) {                       
442     fParticleChange->SetProposedKineticEnergy(    
443   }                                               
444   else {                                          
445     // photon absorbed                            
446     photonEnergy1 = 0.;                           
447     fParticleChange->SetProposedKineticEnergy(    
448     fParticleChange->ProposeTrackStatus(fStopA    
449     fParticleChange->ProposeLocalEnergyDeposit    
450     return;                                       
451   }                                               
452                                                   
453   // Kinematics of the scattered electron         
454   G4double eKineticEnergy = photonEnergy0 - ph    
455                                                   
456   // protection against negative final energy:    
457   if (eKineticEnergy < 0.0) {                     
458     fParticleChange->ProposeLocalEnergyDeposit    
459     return;                                       
460   }                                               
461                                                   
462   G4double eTotalEnergy = eKineticEnergy + ele    
463                                                   
464   G4double electronE = photonEnergy0 * (1. - e    
465   G4double electronP2 = electronE * electronE     
466   G4double sinThetaE = -1.;                       
467   G4double cosThetaE = 0.;                        
468   if (electronP2 > 0.) {                          
469     cosThetaE = (eTotalEnergy + photonEnergy1)    
470     sinThetaE = -1. * sqrt(1. - cosThetaE * co    
471   }                                               
472                                                   
473   G4double eDirX = sinThetaE * std::cos(phi);     
474   G4double eDirY = sinThetaE * std::sin(phi);     
475   G4double eDirZ = cosThetaE;                     
476                                                   
477   G4ThreeVector eDirection(eDirX, eDirY, eDirZ    
478   eDirection.rotateUz(photonDirection0);          
479   auto dp = new G4DynamicParticle(G4Electron::    
480   fvect->push_back(dp);                           
481                                                   
482   // sample deexcitation                          
483   if (verboseLevel > 3) {                         
484     G4cout << "Started atomic de-excitation "     
485   }                                               
486                                                   
487   if (nullptr != fAtomDeexcitation && iteratio    
488     G4int index = couple->GetIndex();             
489     if (fAtomDeexcitation->CheckDeexcitationAc    
490       size_t nbefore = fvect->size();             
491       auto as = G4AtomicShellEnumerator(shellI    
492       const G4AtomicShell* shell = fAtomDeexci    
493       fAtomDeexcitation->GenerateParticles(fve    
494       size_t nafter = fvect->size();              
495       if (nafter > nbefore) {                     
496         for (size_t i = nbefore; i < nafter; +    
497           // Check if there is enough residual    
498           if (bindingE >= ((*fvect)[i])->GetKi    
499             // Ok, this is a valid secondary:     
500             bindingE -= ((*fvect)[i])->GetKine    
501           }                                       
502           else {                                  
503             // Invalid secondary: not enough e    
504             // Keep its energy in the local de    
505             delete (*fvect)[i];                   
506             (*fvect)[i] = nullptr;                
507           }                                       
508         }                                         
509       }                                           
510     }                                             
511   }                                               
512   bindingE = std::max(bindingE, 0.0);             
513   fParticleChange->ProposeLocalEnergyDeposit(b    
514 }                                                 
515                                                   
516 //....oooOO0OOooo........oooOO0OOooo........oo    
517                                                   
518 G4double G4LivermoreComptonModel::ComputeScatt    
519 {                                                 
520   G4double value = Z;                             
521   if (x <= ScatFuncFitParam[Z][3]) {              
522     G4double lgq = G4Log(x) / ln10;               
523                                                   
524     if (lgq < ScatFuncFitParam[Z][1]) {           
525       value = ScatFuncFitParam[Z][4] + lgq * S    
526     }                                             
527     else if (lgq >= ScatFuncFitParam[Z][1] &&     
528       value = ScatFuncFitParam[Z][6]              
529               + lgq                               
530                   * (ScatFuncFitParam[Z][7]       
531                      + lgq                        
532                          * (ScatFuncFitParam[Z    
533                             + lgq * (ScatFuncF    
534     }                                             
535     else {                                        
536       value = ScatFuncFitParam[Z][11]             
537               + lgq                               
538                   * (ScatFuncFitParam[Z][12]      
539                      + lgq                        
540                          * (ScatFuncFitParam[Z    
541                             + lgq * (ScatFuncF    
542     }                                             
543     value = G4Exp(value * ln10);                  
544   }                                               
545   // G4cout << "    value= " << value << G4end    
546   return value;                                   
547 }                                                 
548                                                   
549 //....oooOO0OOooo........oooOO0OOooo........oo    
550                                                   
551 void G4LivermoreComptonModel::InitialiseForEle    
552 {                                                 
553   G4AutoLock l(&LivermoreComptonModelMutex);      
554   if (data[Z] == nullptr) {                       
555     ReadData(Z);                                  
556   }                                               
557   l.unlock();                                     
558 }                                                 
559                                                   
560 //....oooOO0OOooo........oooOO0OOooo........oo    
561                                                   
562 // Fitting data to compute scattering function    
563 const G4double G4LivermoreComptonModel::ScatFu    
564   {0, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,     
565   {1, 6.000000000e+00, 7.087999300e+00, 1.4996    
566    -3.925518125e+02, 2.434944521e+02, -5.78439    
567    -1.649463594e+03, 8.121933215e+02, -1.49831    
568   {2, 6.000000000e+00, 7.199000403e+00, 2.5003    
569    3.574019365e+02, -1.978574937e+02, 3.971327    
570    -4.009960832e+02, 1.575831469e+02, -2.17476    
571   {3, 6.000000000e+00, 7.301000136e+00, 3.9994    
572    7.051635443e+02, -4.223841786e+02, 9.318729    
573    1.524679907e+03, -7.851479582e+02, 1.509941    
574   {4, 6.000000000e+00, 7.349500202e+00, 5.0003    
575    -1.832909604e+02, 1.193997722e+02, -3.03432    
576    1.397476657e+03, -7.026416933e+02, 1.320720    
577   {5, 6.000000000e+00, 7.388999972e+00, 5.9979    
578    -2.334197545e+02, 1.467013466e+02, -3.57485    
579    6.784713308e+02, -3.419562074e+02, 6.433945    
580   {6, 6.000000000e+00, 7.422500001e+00, 6.9984    
581    -2.460254935e+02, 1.516613633e+02, -3.62202    
582    -1.610185428e+02, 7.010907070e+01, -1.14237    
583   {7, 6.000000000e+00, 7.451499931e+00, 7.9983    
584    -3.054540719e+02, 1.877740247e+02, -4.44027    
585    -2.263864349e+02, 1.017885461e+02, -1.71698    
586   {8, 6.000000000e+00, 7.451499931e+00, 7.9983    
587    -3.877174895e+02, 2.345831969e+02, -5.43182    
588    -7.949384302e+02, 3.757293602e+02, -6.66174    
589   {9, 6.000000000e+00, 7.451499931e+00, 7.9983    
590    -2.939854827e+02, 1.784214589e+02, -4.16847    
591    -1.169326170e+03, 5.545642014e+02, -9.86302    
592   {10, 6.000000000e+00, 7.451499931e+00, 7.998    
593    -2.615701853e+02, 1.582596311e+02, -3.69811    
594    -1.275287356e+03, 6.022076554e+02, -1.06641    
595   {11, 6.000000000e+00, 7.500000000e+00, 1.000    
596    1.112662501e+03, -6.807056448e+02, 1.545837    
597    -1.007702307e+03, 4.699937040e+02, -8.22035    
598   {12, 6.000000000e+00, 7.500000000e+00, 1.000    
599    9.895649717e+02, -5.983228286e+02, 1.340681    
600    -5.790532602e+02, 2.626052403e+02, -4.46354    
601   {13, 6.000000000e+00, 7.587999300e+00, 1.499    
602    7.335256091e+02, -4.405291562e+02, 9.770954    
603    -5.328832253e+02, 2.398514938e+02, -4.04455    
604   {14, 6.000000000e+00, 7.587999300e+00, 1.499    
605    3.978691889e+02, -2.370975001e+02, 5.158692    
606    -2.340256277e+02, 9.813362251e+01, -1.52789    
607   {15, 6.000000000e+00, 7.587999300e+00, 1.499    
608    2.569833671e+02, -1.513623448e+02, 3.210087    
609    -1.345727293e+01, -6.291081167e+00, 3.23596    
610   {16, 6.000000000e+00, 7.587999300e+00, 1.499    
611    1.015293074e+02, -5.721639224e+01, 1.078607    
612    1.854818165e+02, -1.000803879e+02, 1.979815    
613   {17, 6.000000000e+00, 7.587999300e+00, 1.499    
614    -4.294163461e+01, 2.862162412e+01, -8.28597    
615    1.676674074e+02, -8.976414784e+01, 1.763329    
616   {18, 6.000000000e+00, 7.587999300e+00, 1.499    
617    -3.573422746e+01, 2.403066369e+01, -7.17361    
618    1.811925229e+02, -9.574636323e+01, 1.861940    
619   {19, 6.000000000e+00, 7.650499797e+00, 1.999    
620    1.263152069e+02, -8.738932892e+01, 2.109042    
621    9.183312428e+01, -5.232836676e+01, 1.072450    
622   {20, 6.000000000e+00, 7.650499797e+00, 1.999    
623    6.620218058e+02, -4.057504297e+02, 9.180787    
624    7.034138711e+01, -4.198325416e+01, 8.861351    
625   {21, 6.000000000e+00, 7.650499797e+00, 1.999    
626    6.766093786e+02, -4.129087029e+02, 9.305090    
627    1.916559096e+01, -1.807294109e+01, 4.677205    
628   {22, 6.000000000e+00, 7.650499797e+00, 1.999    
629    6.969823082e+02, -4.236620289e+02, 9.513714    
630    -6.501317146e+01, 2.138553133e+01, -2.25099    
631   {23, 6.000000000e+00, 7.650499797e+00, 1.999    
632    6.889749928e+02, -4.181421624e+02, 9.373529    
633    -1.382770534e+02, 5.540647456e+01, -8.17001    
634   {24, 6.000000000e+00, 7.650499797e+00, 1.999    
635    4.365566411e+02, -2.672774427e+02, 6.001631    
636    -2.393534124e+02, 1.020845165e+02, -1.62474    
637   {25, 6.000000000e+00, 7.650499797e+00, 1.999    
638    6.461381990e+02, -3.918546518e+02, 8.769548    
639    -2.597409979e+02, 1.113332866e+02, -1.78212    
640   {26, 6.000000000e+00, 7.849500202e+00, 5.000    
641    4.261007401e+02, -2.588846763e+02, 5.764613    
642    -1.982896712e+02, 8.274273985e+01, -1.28407    
643   {27, 6.000000000e+00, 7.849500202e+00, 5.000    
644    4.006816638e+02, -2.439311564e+02, 5.435031    
645    -2.205075564e+02, 9.262919772e+01, -1.44890    
646   {28, 6.000000000e+00, 7.849500202e+00, 5.000    
647    3.967750019e+02, -2.411866801e+02, 5.364872    
648    -2.516823030e+02, 1.065117131e+02, -1.68053    
649   {29, 6.000000000e+00, 7.849500202e+00, 5.000    
650    2.437671888e+02, -1.499592208e+02, 3.332221    
651    -2.874130637e+02, 1.223381969e+02, -1.94317    
652   {30, 6.000000000e+00, 7.849500202e+00, 5.000    
653    3.914867984e+02, -2.378147085e+02, 5.284517    
654    -3.235063319e+02, 1.384252948e+02, -2.21184    
655   {31, 6.000000000e+00, 7.849500202e+00, 5.000    
656    4.325820127e+02, -2.614587597e+02, 5.793273    
657    -3.359152840e+02, 1.437507638e+02, -2.29745    
658   {32, 6.000000000e+00, 7.849500202e+00, 5.000    
659    4.388195965e+02, -2.642662297e+02, 5.834159    
660    -3.430730654e+02, 1.467102631e+02, -2.34316    
661   {33, 6.000000000e+00, 7.849500202e+00, 5.000    
662    3.931399547e+02, -2.363700718e+02, 5.197696    
663    -3.501570134e+02, 1.497141578e+02, -2.39088    
664   {34, 6.000000000e+00, 7.849500202e+00, 5.000    
665    3.772588127e+02, -2.256347960e+02, 4.929790    
666    -3.481053019e+02, 1.486490112e+02, -2.37074    
667   {35, 6.000000000e+00, 7.849500202e+00, 5.000    
668    3.344685842e+02, -1.994816236e+02, 4.332267    
669    -3.227660675e+02, 1.370301996e+02, -2.17154    
670   {36, 6.000000000e+00, 7.849500202e+00, 5.000    
671    3.004054446e+02, -1.781334135e+02, 3.834850    
672    -2.980827664e+02, 1.257508661e+02, -1.97879    
673   {37, 6.000000000e+00, 7.849500202e+00, 5.000    
674    -3.687188343e+01, 1.054409719e+01, -8.51658    
675    -2.699384784e+02, 1.129635316e+02, -1.76144    
676   {38, 6.000000000e+00, 7.849500202e+00, 5.000    
677    1.969969064e+02, -1.286503864e+02, 3.008431    
678    -2.331258613e+02, 9.627987243e+01, -1.47851    
679   {39, 6.000000000e+00, 7.849500202e+00, 5.000    
680    2.891710763e+02, -1.819536752e+02, 4.158265    
681    -1.997404800e+02, 8.119476676e+01, -1.22342    
682   {40, 6.000000000e+00, 7.849500202e+00, 5.000    
683    3.393782172e+02, -2.103908454e+02, 4.758278    
684    -1.549247582e+02, 6.091403935e+01, -8.79930    
685   {41, 6.000000000e+00, 7.849500202e+00, 5.000    
686    2.748604341e+02, -1.706429616e+02, 3.843757    
687    -1.163607425e+02, 4.350905533e+01, -5.85930    
688   {42, 6.000000000e+00, 7.849500202e+00, 5.000    
689    3.203285955e+02, -1.966282865e+02, 4.398204    
690    -9.364181222e+01, 3.329814493e+01, -4.14168    
691   {43, 6.000000000e+00, 7.849500202e+00, 5.000    
692    4.184977165e+02, -2.552902161e+02, 5.707764    
693    -8.395646154e+01, 2.898228589e+01, -3.42235    
694   {44, 6.000000000e+00, 7.849500202e+00, 5.000    
695    3.243555305e+02, -1.978255470e+02, 4.397580    
696    -5.506292375e+01, 1.599310639e+01, -1.23715    
697   {45, 6.000000000e+00, 7.849500202e+00, 5.000    
698    3.037823599e+02, -1.856628295e+02, 4.128167    
699    -5.014186072e+01, 1.386962969e+01, -8.95080    
700   {46, 6.000000000e+00, 7.849500202e+00, 5.000    
701    3.529797051e+02, -2.101512262e+02, 4.563946    
702    -4.815922691e+01, 1.301508788e+01, -7.58085    
703   {47, 6.000000000e+00, 7.849500202e+00, 5.000    
704    3.074953924e+02, -1.872462583e+02, 4.149827    
705    -4.897188379e+01, 1.335300002e+01, -8.11005    
706   {48, 6.000000000e+00, 7.849500202e+00, 5.000    
707    4.059717166e+02, -2.462737702e+02, 5.472040    
708    -5.901534554e+01, 1.791385249e+01, -1.58706    
709   {49, 6.000000000e+00, 7.849500202e+00, 5.000    
710    4.369774251e+02, -2.639721687e+02, 5.849617    
711    -7.399698219e+01, 2.469785523e+01, -2.73788    
712   {50, 6.000000000e+00, 7.849500202e+00, 5.000    
713    4.289361021e+02, -2.585593024e+02, 5.714058    
714    -9.269047286e+01, 3.314422349e+01, -4.16734    
715   {51, 6.000000000e+00, 7.849500202e+00, 5.000    
716    3.866985836e+02, -2.328379698e+02, 5.128884    
717    -1.067869310e+02, 3.950715983e+01, -5.24332    
718   {52, 6.000000000e+00, 7.951499931e+00, 7.998    
719    3.947511198e+02, -2.363799049e+02, 5.179393    
720    -1.069681982e+02, 3.995521754e+01, -5.38207    
721   {53, 6.000000000e+00, 7.849500202e+00, 5.000    
722    3.694394448e+02, -2.204699428e+02, 4.806381    
723    -1.180749905e+02, 4.460080701e+01, -6.10521    
724   {54, 6.000000000e+00, 7.951499931e+00, 7.998    
725    3.423943987e+02, -2.041330669e+02, 4.437639    
726    -1.288973984e+02, 4.985324046e+01, -7.05604    
727   {55, 6.000000000e+00, 7.849500202e+00, 5.000    
728    -7.663422017e+01, 3.462700567e+01, -6.27355    
729    -1.318428276e+02, 5.081036112e+01, -7.15490    
730   {56, 6.000000000e+00, 7.849500202e+00, 5.000    
731    1.084179205e+02, -7.602229206e+01, 1.843754    
732    -1.346311376e+02, 5.207427468e+01, -7.36983    
733   {57, 6.000000000e+00, 7.725500002e+00, 2.824    
734    2.995898890e+02, -1.889477671e+02, 4.336642    
735    5.503972208e+00, -1.227641064e+01, 3.699182    
736   {58, 6.000000000e+00, 7.849500202e+00, 5.000    
737    1.709135500e+02, -1.120124681e+02, 2.615893    
738    -1.375860132e+02, 5.337811974e+01, -7.58678    
739   {59, 6.000000000e+00, 7.849500202e+00, 5.000    
740    1.214691988e+02, -8.336119630e+01, 1.996468    
741    -1.631005912e+02, 6.472051894e+01, -9.47609    
742   {60, 6.000000000e+00, 7.849500202e+00, 5.000    
743    1.302719596e+02, -8.835087414e+01, 2.101971    
744    -1.692901279e+02, 6.742727614e+01, -9.92066    
745   {61, 6.000000000e+00, 7.951499931e+00, 7.998    
746    1.127680235e+02, -7.782238836e+01, 1.865126    
747    -2.059821608e+02, 8.384774285e+01, -1.26734    
748   {62, 6.000000000e+00, 7.951499931e+00, 7.998    
749    1.203145109e+02, -8.212556537e+01, 1.956606    
750    -2.158058793e+02, 8.810144391e+01, -1.33638    
751   {63, 6.000000000e+00, 7.951499931e+00, 7.998    
752    1.212159597e+02, -8.256559477e+01, 1.964122    
753    -2.278531434e+02, 9.336519465e+01, -1.42258    
754   {64, 6.000000000e+00, 7.951499931e+00, 7.998    
755    1.689382403e+02, -1.099987696e+02, 2.551961    
756    -2.282716670e+02, 9.348611199e+01, -1.42358    
757   {65, 6.000000000e+00, 7.951499931e+00, 7.998    
758    1.724155378e+02, -1.120798437e+02, 2.598264    
759    -2.322687147e+02, 9.517466656e+01, -1.45033    
760   {66, 6.000000000e+00, 7.951499931e+00, 7.998    
761    1.286079419e+02, -8.646296410e+01, 2.039801    
762    -2.420048480e+02, 9.935663043e+01, -1.51765    
763   {67, 6.000000000e+00, 7.951499931e+00, 7.998    
764    1.182799697e+02, -8.043389241e+01, 1.908027    
765    -2.464462609e+02, 1.012059056e+02, -1.54646    
766   {68, 6.000000000e+00, 7.951499931e+00, 7.998    
767    1.150510247e+02, -7.859576077e+01, 1.868688    
768    -2.457555063e+02, 1.007538481e+02, -1.53669    
769   {69, 6.000000000e+00, 7.951499931e+00, 7.998    
770    1.266280406e+02, -8.514491730e+01, 2.007089    
771    -2.492442707e+02, 1.021615320e+02, -1.55787    
772   {70, 6.000000000e+00, 7.951499931e+00, 7.998    
773    1.224253568e+02, -8.281395858e+01, 1.958609    
774    -2.488808342e+02, 1.018569466e+02, -1.55060    
775   {71, 6.000000000e+00, 7.951499931e+00, 7.998    
776    1.862181262e+02, -1.199038630e+02, 2.763107    
777    -2.403102476e+02, 9.796272016e+01, -1.48452    
778   {72, 6.000000000e+00, 7.951499931e+00, 7.998    
779    2.297759959e+02, -1.448485621e+02, 3.295877    
780    -2.282155654e+02, 9.249921555e+01, -1.39226    
781   {73, 6.000000000e+00, 7.951499931e+00, 7.998    
782    2.646909006e+02, -1.647716545e+02, 3.719903    
783    -2.165150972e+02, 8.722660467e+01, -1.30341    
784   {74, 6.000000000e+00, 7.951499931e+00, 7.998    
785    2.251239174e+02, -1.414731209e+02, 3.206048    
786    -2.070173544e+02, 8.296725365e+01, -1.23198    
787   {75, 6.000000000e+00, 7.951499931e+00, 7.998    
788    2.627532736e+02, -1.629008146e+02, 3.661592    
789    -1.945762063e+02, 7.740995255e+01, -1.13912    
790   {76, 6.000000000e+00, 7.951499931e+00, 7.998    
791    2.644549626e+02, -1.637369900e+02, 3.675734    
792    -1.725967865e+02, 6.755389456e+01, -9.73763    
793   {77, 6.000000000e+00, 7.951499931e+00, 7.998    
794    2.677629012e+02, -1.650589135e+02, 3.690999    
795    -1.584140848e+02, 6.122430396e+01, -8.68087    
796   {78, 6.000000000e+00, 7.951499931e+00, 7.998    
797    2.420702029e+02, -1.484461630e+02, 3.292288    
798    -1.319886050e+02, 4.940494114e+01, -6.70274    
799   {79, 6.000000000e+00, 7.951499931e+00, 7.998    
800    2.346714957e+02, -1.439356552e+02, 3.189416    
801    -1.130109430e+02, 4.093029258e+01, -5.28674    
802   {80, 6.000000000e+00, 7.951499931e+00, 7.998    
803    2.747370538e+02, -1.689673404e+02, 3.771696    
804    -9.001823908e+01, 3.066094857e+01, -3.57045    
805   {81, 6.000000000e+00, 7.951499931e+00, 7.998    
806    3.142563781e+02, -1.916613838e+02, 4.259167    
807    -7.642731867e+01, 2.462410146e+01, -2.56697    
808   {82, 6.000000000e+00, 7.951499931e+00, 7.998    
809    3.509258060e+02, -2.125470710e+02, 4.702461    
810    -5.173355302e+01, 1.362015056e+01, -7.32128    
811   {83, 6.000000000e+00, 7.951499931e+00, 7.998    
812    3.399729483e+02, -2.056319770e+02, 4.539614    
813    -4.131443229e+01, 8.986236911e+00, 3.924628    
814   {84, 6.000000000e+00, 7.951499931e+00, 7.998    
815    3.640602841e+02, -2.190164327e+02, 4.815603    
816    -3.256862965e+01, 5.115606198e+00, 6.800853    
817   {85, 6.000000000e+00, 7.951499931e+00, 7.998    
818    3.766488275e+02, -2.257321142e+02, 4.947300    
819    -2.300947210e+01, 8.615223509e-01, 1.388425    
820   {86, 6.000000000e+00, 7.951499931e+00, 7.998    
821    3.443622947e+02, -2.064342780e+02, 4.516044    
822    -5.399039282e+00, -7.002814559e+00, 2.70251    
823   {87, 6.000000000e+00, 7.951499931e+00, 7.998    
824    -3.706791591e+01, 1.118013187e+01, -1.05772    
825    -3.451314336e+00, -7.779254134e+00, 2.81626    
826   {88, 6.000000000e+00, 7.951499931e+00, 7.998    
827    6.125934670e+01, -4.855548659e+01, 1.248551    
828    -6.021643455e+00, -6.580234329e+00, 2.60744    
829   {89, 6.000000000e+00, 7.951499931e+00, 7.998    
830    1.350863292e+02, -9.126618691e+01, 2.169932    
831    1.937135880e+01, -1.787129621e+01, 4.485878    
832   {90, 6.000000000e+00, 7.951499931e+00, 7.998    
833    1.784388998e+02, -1.161623817e+02, 2.702376    
834    2.216057166e+01, -1.904990091e+01, 4.671627    
835   {91, 6.000000000e+00, 7.951499931e+00, 7.998    
836    1.368355213e+02, -9.179790820e+01, 2.169910    
837    4.516580666e+00, -1.118102949e+01, 3.357662    
838   {92, 6.000000000e+00, 7.951499931e+00, 7.998    
839    1.427130850e+02, -9.499714618e+01, 2.234475    
840    1.341991149e+01, -1.518503354e+01, 4.030838    
841   {93, 6.000000000e+00, 8.000000000e+00, 1.000    
842    2.341801100e+01, -2.506119713e+01, 7.023029    
843    -3.575331738e+01, 7.276302226e+00, 1.906771    
844   {94, 6.000000000e+00, 7.951499931e+00, 7.998    
845    1.287618322e+02, -8.721780968e+01, 2.073255    
846    -2.307262580e+01, 1.113132278e+00, 1.305250    
847   {95, 6.000000000e+00, 7.951499931e+00, 7.998    
848    1.334821220e+02, -8.985337775e+01, 2.127928    
849    -3.518662723e+01, 6.514543434e+00, 4.030862    
850   {96, 6.000000000e+00, 8.000000000e+00, 1.000    
851    4.545581472e+01, -3.771304300e+01, 9.729129    
852    -4.973805034e+01, 1.342335334e+01, -8.22113    
853   {97, 6.000000000e+00, 8.000000000e+00, 1.000    
854    4.689042092e+01, -3.843347264e+01, 9.859294    
855    -4.657434145e+01, 1.204637835e+01, -5.98244    
856   {98, 6.000000000e+00, 8.000000000e+00, 1.000    
857    1.337584189e+01, -1.907284620e+01, 5.691614    
858    -5.573362773e+01, 1.615667599e+01, -1.28896    
859   {99, 6.000000000e+00, 8.000000000e+00, 1.000    
860    1.376201293e+01, -1.919251815e+01, 5.693799    
861    -4.914211254e+01, 1.314247998e+01, -7.73933    
862   {100, 6.000000000e+00, 8.000000000e+00, 1.00    
863    1.277081775e+01, -1.854047224e+01, 5.534680    
864    -5.074293980e+01, 1.383260974e+01, -8.85890    
865 //....oooOO0OOooo........oooOO0OOooo........oo    
866