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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 10.3.p3)


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