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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/electromagnetic/standard/src/G4IonCoulombCrossSection.cc (Version 11.3.0) and /processes/electromagnetic/standard/src/G4IonCoulombCrossSection.cc (Version 3.2)


  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 //      G4IonCoulombCrossSection.cc               
 27 //--------------------------------------------    
 28 //                                                
 29 // GEANT4 Class header file                       
 30 //                                                
 31 // File name:    G4IonCoulombCrossSection         
 32 //                                                
 33 // Author:      Cristina Consolandi               
 34 //                                                
 35 // Creation date: 05.10.2010 from G4eCoulombSc    
 36 //                                                
 37 // Class Description:                             
 38 //  Computation of Screen-Coulomb Cross Sectio    
 39 //  for protons, alpha and heavy Ions             
 40 //                                                
 41 //                                                
 42 // Reference:                                     
 43 //      M.J. Boschini et al. "Nuclear and Non-    
 44 //      for Coulomb Scattered Particles from L    
 45 //      Regime in Space Radiation Environment"    
 46 //      Accepted for publication in the Procee    
 47 //      on Cosmic Rays for Particle and Astrop    
 48 //      October,  2010, to be published by Wor    
 49 //                                                
 50 //      Available for downloading at:             
 51 //      http://arxiv.org/abs/1011.4822            
 52 //                                                
 53 // -------------------------------------------    
 54 //                                                
 55 //....oooOO0OOooo........oooOO0OOooo........oo    
 56                                                   
 57 #include "G4IonCoulombCrossSection.hh"            
 58 #include "G4PhysicalConstants.hh"                 
 59 #include "Randomize.hh"                           
 60 #include "G4Proton.hh"                            
 61 #include "G4Exp.hh"                               
 62 #include "G4Log.hh"                               
 63                                                   
 64 //....oooOO0OOooo........oooOO0OOooo........oo    
 65                                                   
 66 using namespace std;                              
 67                                                   
 68 const G4double a0 = CLHEP::electron_mass_c2/0.    
 69                                                   
 70 G4IonCoulombCrossSection::G4IonCoulombCrossSec    
 71    cosThetaMin(1.0),                              
 72    cosThetaMax(-1.0),                             
 73    alpha2(fine_structure_const*fine_structure_    
 74 {                                                 
 75   fNistManager = G4NistManager::Instance();       
 76   fG4pow = G4Pow::GetInstance();                  
 77   theProton   = G4Proton::Proton();               
 78   particle = nullptr;                             
 79                                                   
 80   G4double p0 = electron_mass_c2*classic_elect    
 81   coeff  = twopi*p0*p0;                           
 82                                                   
 83   cosTetMinNuc=0;                                 
 84   cosTetMaxNuc=0;                                 
 85   nucXSection =0;                                 
 86                                                   
 87   chargeSquare = spin = mass = 0.0;               
 88   tkinLab = momLab2 = invbetaLab2 = tkin = mom    
 89                                                   
 90   targetZ = targetMass = screenZ = ScreenRSqua    
 91 }                                                 
 92                                                   
 93 //....oooOO0OOooo........oooOO0OOooo........oo    
 94                                                   
 95 void G4IonCoulombCrossSection::Initialise(cons    
 96                                           G4do    
 97 {                                                 
 98   SetupParticle(p);                               
 99   nucXSection = tkin = targetZ = mom2 = 0.0;      
100   etag = DBL_MAX;                                 
101   particle = p;                                   
102   cosThetaMin = CosThetaLim;                      
103 }                                                 
104                                                   
105 //....oooOO0OOooo........oooOO0OOooo........oo    
106                                                   
107 void G4IonCoulombCrossSection::SetupKinematic(    
108 {                                                 
109   if(ekin != tkinLab || tmass != targetMass) {    
110                                                   
111     // lab                                        
112     tkinLab = ekin;                               
113     momLab2 = tkinLab*(tkinLab + 2.0*mass);       
114     invbetaLab2 = 1.0 +  mass*mass/momLab2;       
115                                                   
116     G4double etot = tkinLab + mass;               
117     G4double ptot = sqrt(momLab2);                
118     G4double m12  = mass*mass;                    
119     // relativistic reduced mass from publucat    
120     // A.P. Martynenko, R.N. Faustov, Teoret.     
121                                                   
122     //incident particle & target nucleus          
123     targetMass = tmass;                           
124     G4double Ecm=sqrt(m12 + targetMass*targetM    
125     G4double mu_rel=mass*targetMass/Ecm;          
126     G4double momCM= ptot*targetMass/Ecm;          
127     // relative system                            
128     mom2 = momCM*momCM;                           
129     invbeta2 = 1.0 +  mu_rel*mu_rel/mom2;         
130     tkin = momCM*sqrt(invbeta2) - mu_rel;//Eki    
131                                                   
132     cosTetMinNuc = cosThetaMin;                   
133     cosTetMaxNuc = cosThetaMax;                   
134   }                                               
135 }                                                 
136                                                   
137 //....oooOO0OOooo........oooOO0OOooo........oo    
138                                                   
139 void G4IonCoulombCrossSection::SetupTarget(G4d    
140              G4int)                               
141 {                                                 
142   if(Z != targetZ || e != etag) {                 
143     etag    = e;                                  
144     targetZ = Z;                                  
145     G4int iz= G4lrint(Z);                         
146                                                   
147     SetScreenRSquare(iz);                         
148     screenZ = 0;                                  
149     screenZ = ScreenRSquare/mom2;                 
150     //heavycorr = 0;                              
151     //  G4cout<< "heavycorr "<<heavycorr<<G4en    
152                                                   
153     G4double corr=5.*twopi*Z*std::sqrt(chargeS    
154     corr=G4Exp(G4Log(corr)*0.04);                 
155     screenZ *=0.5*(1.13 + corr*3.76*Z*Z*charge    
156     // G4cout<<" heavycorr Z e corr....2As "<<    
157     //  <<Z <<"\t"<<e/MeV <<"\t"<<screenZ<<G4e    
158                                                   
159     if(1 == iz && particle == theProton && cos    
160       cosTetMaxNuc = 0.0;                         
161     }                                             
162   }                                               
163 }                                                 
164                                                   
165 //....oooOO0OOooo........oooOO0OOooo........oo    
166                                                   
167 void G4IonCoulombCrossSection::SetScreenRSquar    
168 {                                                 
169   //for proton Thomas-Fermi screening length      
170   G4int Z1 = G4lrint(std::sqrt(chargeSquare));    
171   G4double Z113  = fG4pow->Z13(iz);               
172   G4double Z1023 = fG4pow->powZ(Z1,0.23);         
173   G4double Z2023 = fG4pow->powZ(iz,0.23);         
174   G4double x=a0*(Z1023+Z2023);                    
175                                                   
176   // Universal screening length                   
177   if(particle == theProton){                      
178      x = a0*Z113;                                 
179   }                                               
180                                                   
181   ScreenRSquare = alpha2*x*x;                     
182 }                                                 
183                                                   
184 //....oooOO0OOooo........oooOO0OOooo........oo    
185                                                   
186 G4double G4IonCoulombCrossSection::NuclearCros    
187 {                                                 
188   // This method needs initialisation before b    
189   // scattering with target nucleus               
190   G4double fac = coeff*targetZ*(targetZ)*charg    
191                                                   
192   nucXSection  = 0.0;                             
193                                                   
194   G4double x  = 1.0 - cosTetMinNuc;               
195   G4double x1 = x + screenZ;                      
196                                                   
197   // scattering with nucleus                      
198   if(cosTetMaxNuc < cosTetMinNuc) {               
199     nucXSection = fac*(cosTetMinNuc - cosTetMa    
200       (x1*(1.0 - cosTetMaxNuc + screenZ));        
201   }                                               
202                                                   
203   return nucXSection;                             
204 }                                                 
205                                                   
206 //....oooOO0OOooo........oooOO0OOooo........oo    
207                                                   
208 G4double G4IonCoulombCrossSection::SampleCosin    
209 {                                                 
210   G4double z1 = 0.0;                              
211   if(cosTetMaxNuc < cosTetMinNuc) {               
212                                                   
213     G4double x1 = 1. - cosTetMinNuc + screenZ;    
214     G4double x2 = 1. - cosTetMaxNuc + screenZ;    
215     G4double dx = cosTetMinNuc - cosTetMaxNuc;    
216     z1 = x1*x2/(x1 + G4UniformRand()*dx) - scr    
217   }                                               
218   return z1;                                      
219 }                                                 
220                                                   
221 //....oooOO0OOooo........oooOO0OOooo........oo    
222                                                   
223                                                   
224                                                   
225                                                   
226