Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4DiffuseElasticV2.hh
이 파일의 문서화 페이지로 가기
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4DiffuseElasticV2.hh 94676 2015-12-02 09:51:20Z gunter $
28 //
29 // Author: V. Grichine (Vladimir,Grichine@cern.ch)
30 //
31 //
32 // G4 Model: diffuse optical elastic scattering with 4-momentum balance
33 //
34 // Class Description
35 // Final state production model for hadron nuclear elastic scattering;
36 // Class Description - End
37 //
38 //
39 // 24.05.07 V. Grichine, first implementation for hadron (no Coulomb) elastic scattering
40 // 04.09.07 V. Grichine, implementation for Coulomb elastic scattering
41 // 12.06.11 V. Grichine, new interface to G4hadronElastic
42 // 24.11.17 W. Pokorski, code cleanup and performance improvements
43 
44 
45 #ifndef G4DiffuseElasticV2_h
46 #define G4DiffuseElasticV2_h 1
47 
49 #include "globals.hh"
50 #include "G4HadronElastic.hh"
51 #include "G4HadProjectile.hh"
52 #include "G4Nucleus.hh"
53 
54 #include "G4Pow.hh"
55 
56 #include <vector>
57 
59 class G4PhysicsTable;
60 class G4PhysicsLogVector;
61 
62 class G4DiffuseElasticV2 : public G4HadronElastic // G4HadronicInteraction
63 {
64 public:
65 
67 
68  virtual ~G4DiffuseElasticV2();
69 
70  virtual G4bool IsApplicable(const G4HadProjectile &/*aTrack*/,
71  G4Nucleus & /*targetNucleus*/);
72 
73  void Initialise();
74 
76 
77  void BuildAngleTable();
78 
80  G4double plab,
81  G4int Z, G4int A);
82 
84 
86 
87  void SetHEModelLowLimit(G4double value);
88 
89  void SetQModelLowLimit(G4double value);
90 
91  void SetLowestEnergyLimit(G4double value);
92 
94 
95  G4double SampleTableT(const G4ParticleDefinition* aParticle,
96  G4double p, G4double Z, G4double A);
97 
99 
101  G4double Z, G4double A);
102 
103  G4double GetScatteringAngle(G4int iMomentum, unsigned long iAngle, G4double position);
104 
105  G4double SampleThetaLab(const G4HadProjectile* aParticle,
106  G4double tmass, G4double A);
107 
109 
111 
113 
115  G4double tmass, G4double thetaCMS);
116 
118  G4double tmass, G4double thetaLab);
119 
120 
125 
128 
129 
131 
132 private:
133 
134 
137 
143 
145  unsigned long fAngleBin;
146 
148 
149  std::vector<std::vector<std::vector<double>*>*> fEnergyAngleVectorBank;
150  std::vector<std::vector<std::vector<double>*>*> fEnergySumVectorBank;
151 
152  std::vector<std::vector<double>*>* fEnergyAngleVector;
153  std::vector<std::vector<double>*>* fEnergySumVector;
154 
155 
156  std::vector<G4double> fElementNumberVector;
157  std::vector<G4String> fElementNameVector;
158 
168 
169 };
170 
172  G4Nucleus & nucleus)
173 {
174  if( ( projectile.GetDefinition() == G4Proton::Proton() ||
175  projectile.GetDefinition() == G4Neutron::Neutron() ||
176  projectile.GetDefinition() == G4PionPlus::PionPlus() ||
177  projectile.GetDefinition() == G4PionMinus::PionMinus() ||
178  projectile.GetDefinition() == G4KaonPlus::KaonPlus() ||
179  projectile.GetDefinition() == G4KaonMinus::KaonMinus() ) &&
180 
181  nucleus.GetZ_asInt() >= 2 ) return true;
182  else return false;
183 }
184 
186 {
188 }
189 
191 {
193 }
194 
196 {
198 }
199 
201 {
203 }
204 
206 {
208 }
209 
210 
212 //
213 // Bessel J0 function based on rational approximation from
214 // J.F. Hart, Computer Approximations, New York, Willey 1968, p. 141
215 
217 {
218  G4double modvalue, value2, fact1, fact2, arg, shift, bessel;
219 
220  modvalue = std::fabs(value);
221 
222  if ( value < 8.0 && value > -8.0 )
223  {
224  value2 = value*value;
225 
226  fact1 = 57568490574.0 + value2*(-13362590354.0
227  + value2*( 651619640.7
228  + value2*(-11214424.18
229  + value2*( 77392.33017
230  + value2*(-184.9052456 ) ) ) ) );
231 
232  fact2 = 57568490411.0 + value2*( 1029532985.0
233  + value2*( 9494680.718
234  + value2*(59272.64853
235  + value2*(267.8532712
236  + value2*1.0 ) ) ) );
237 
238  bessel = fact1/fact2;
239  }
240  else
241  {
242  arg = 8.0/modvalue;
243 
244  value2 = arg*arg;
245 
246  shift = modvalue-0.785398164;
247 
248  fact1 = 1.0 + value2*(-0.1098628627e-2
249  + value2*(0.2734510407e-4
250  + value2*(-0.2073370639e-5
251  + value2*0.2093887211e-6 ) ) );
252 
253  fact2 = -0.1562499995e-1 + value2*(0.1430488765e-3
254  + value2*(-0.6911147651e-5
255  + value2*(0.7621095161e-6
256  - value2*0.934945152e-7 ) ) );
257 
258  bessel = std::sqrt(0.636619772/modvalue)*(std::cos(shift)*fact1 - arg*std::sin(shift)*fact2 );
259  }
260  return bessel;
261 }
262 
264 //
265 // Bessel J1 function based on rational approximation from
266 // J.F. Hart, Computer Approximations, New York, Willey 1968, p. 141
267 
269 {
270  G4double modvalue, value2, fact1, fact2, arg, shift, bessel;
271 
272  modvalue = std::fabs(value);
273 
274  if ( modvalue < 8.0 )
275  {
276  value2 = value*value;
277 
278  fact1 = value*(72362614232.0 + value2*(-7895059235.0
279  + value2*( 242396853.1
280  + value2*(-2972611.439
281  + value2*( 15704.48260
282  + value2*(-30.16036606 ) ) ) ) ) );
283 
284  fact2 = 144725228442.0 + value2*(2300535178.0
285  + value2*(18583304.74
286  + value2*(99447.43394
287  + value2*(376.9991397
288  + value2*1.0 ) ) ) );
289  bessel = fact1/fact2;
290  }
291  else
292  {
293  arg = 8.0/modvalue;
294 
295  value2 = arg*arg;
296 
297  shift = modvalue - 2.356194491;
298 
299  fact1 = 1.0 + value2*( 0.183105e-2
300  + value2*(-0.3516396496e-4
301  + value2*(0.2457520174e-5
302  + value2*(-0.240337019e-6 ) ) ) );
303 
304  fact2 = 0.04687499995 + value2*(-0.2002690873e-3
305  + value2*( 0.8449199096e-5
306  + value2*(-0.88228987e-6
307  + value2*0.105787412e-6 ) ) );
308 
309  bessel = std::sqrt( 0.636619772/modvalue)*(std::cos(shift)*fact1 - arg*std::sin(shift)*fact2);
310 
311  if (value < 0.0) bessel = -bessel;
312  }
313  return bessel;
314 }
315 
317 //
318 // damp factor in diffraction x/sh(x), x was already *pi
319 
321 {
322  G4double df;
323  G4double f2 = 2., f3 = 6., f4 = 24.; // first factorials
324 
325  // x *= pi;
326 
327  if( std::fabs(x) < 0.01 )
328  {
329  df = 1./(1. + x/f2 + x*x/f3 + x*x*x/f4);
330  }
331  else
332  {
333  df = x/std::sinh(x);
334  }
335  return df;
336 }
337 
338 
340 //
341 // return J1(x)/x with special case for small x
342 
344 {
345  G4double x2, result;
346 
347  if( std::fabs(x) < 0.01 )
348  {
349  x *= 0.5;
350  x2 = x*x;
351  result = 2. - x2 + x2*x2/6.;
352  }
353  else
354  {
355  result = BesselJone(x)/x;
356  }
357  return result;
358 }
359 
360 
362 //
363 // return Zommerfeld parameter for Coulomb scattering
364 
366 {
368 
369  return fZommerfeld;
370 }
371 
373 //
374 // return Wentzel correction for Coulomb scattering
375 
377 {
378  G4double k = momentum/CLHEP::hbarc;
379  G4double ch = 1.13 + 3.76*n*n;
380  G4double zn = 1.77*k*(1.0/G4Pow::GetInstance()->A13(Z))*CLHEP::Bohr_radius;
381  G4double zn2 = zn*zn;
382  fAm = ch/zn2;
383 
384  return fAm;
385 }
386 
388 //
389 // calculate nuclear radius for different atomic weights using different approximations
390 
392 {
393  G4double R, r0, a11, a12, a13, a2, a3;
394 
395  a11 = 1.26; // 1.08, 1.16
396  a12 = 1.; // 1.08, 1.16
397  a13 = 1.12; // 1.08, 1.16
398  a2 = 1.1;
399  a3 = 1.;
400 
401  // Special rms radii for light nucleii
402 
403  if (A < 50.)
404  {
405  if (std::abs(A-1.) < 0.5) return 0.89*CLHEP::fermi; // p
406  else if(std::abs(A-2.) < 0.5) return 2.13*CLHEP::fermi; // d
407  else if( // std::abs(Z-1.) < 0.5 &&
408  std::abs(A-3.) < 0.5) return 1.80*CLHEP::fermi; // t
409 
410  // else if(std::abs(Z-2.) < 0.5 && std::abs(A-3.) < 0.5) return 1.96CLHEP::fermi; // He3
411  else if( // std::abs(Z-2.) < 0.5 &&
412  std::abs(A-4.) < 0.5) return 1.68*CLHEP::fermi; // He4
413 
414  else if( // std::abs(Z-3.) < 0.5
415  std::abs(A-7.) < 0.5 ) return 2.40*CLHEP::fermi; // Li7
416  else if( // std::abs(Z-4.) < 0.5
417  std::abs(A-9.) < 0.5) return 2.51*CLHEP::fermi; // Be9
418 
419  else if( 10. < A && A <= 16. ) r0 = a11*( 1 - (1.0/G4Pow::GetInstance()->A23(A)) )*CLHEP::fermi; // 1.08CLHEP::fermi;
420  else if( 15. < A && A <= 20. ) r0 = a12*( 1 - (1.0/G4Pow::GetInstance()->A23(A)) )*CLHEP::fermi;
421  else if( 20. < A && A <= 30. ) r0 = a13*( 1 - (1.0/G4Pow::GetInstance()->A23(A)) )*CLHEP::fermi;
422  else r0 = a2*CLHEP::fermi;
423 
424  R = r0*G4Pow::GetInstance()->A13(A);
425  }
426  else
427  {
428  r0 = a3*CLHEP::fermi;
429 
430  R = r0*G4Pow::GetInstance()->powA(A, 0.27);
431  }
432  fNuclearRadius = R;
433 
434  return R;
435 }
436 
437 
438 #endif
Float_t x
Definition: compare.C:6
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:98
Float_t f4
std::vector< std::vector< double > * > * fEnergySumVector
std::vector< std::vector< std::vector< double > * > * > fEnergyAngleVectorBank
G4double BesselJzero(G4double z)
G4double A13(G4double A) const
Definition: G4Pow.cc:138
std::vector< std::vector< double > * > * fEnergyAngleVector
G4double BesselJone(G4double z)
void SetLowestEnergyLimit(G4double value)
const char * p
Definition: xmltok.h:285
static constexpr double hbarc
Double_t z
G4double A23(G4double A) const
Definition: G4Pow.hh:143
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:98
G4double SampleThetaCMS(const G4ParticleDefinition *aParticle, G4double p, G4double A)
G4double GetDiffElasticSumProbA(G4double alpha)
G4double CalculateZommerfeld(G4double beta, G4double Z1, G4double Z2)
void SetPlabLowLimit(G4double value)
void InitialiseOnFly(G4double Z, G4double A)
G4double SampleTableThetaCMS(const G4ParticleDefinition *aParticle, G4double p, G4double Z, G4double A)
Float_t f2
static G4Proton * Proton()
Definition: G4Proton.cc:93
Double_t beta
static G4KaonMinus * KaonMinus()
Definition: G4KaonMinus.cc:113
G4ParticleDefinition * theNeutron
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4double CalculateAm(G4double momentum, G4double n, G4double Z)
Float_t Z
static constexpr double fermi
Definition: SystemOfUnits.h:83
G4double BesselOneByArg(G4double z)
Float_t f3
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
virtual G4bool IsApplicable(const G4HadProjectile &, G4Nucleus &)
static G4Pow * GetInstance()
Definition: G4Pow.cc:57
void SetRecoilKinEnergyLimit(G4double value)
const XML_Char int const XML_Char * value
Definition: expat.h:331
G4double powA(G4double A, G4double y) const
Definition: G4Pow.hh:242
std::vector< std::vector< std::vector< double > * > * > fEnergySumVectorBank
G4double GetScatteringAngle(G4int iMomentum, unsigned long iAngle, G4double position)
G4double ThetaCMStoThetaLab(const G4DynamicParticle *aParticle, G4double tmass, G4double thetaCMS)
const G4ParticleDefinition * fParticle
static const G4double alpha
Double_t R
double A(double temperature)
void SetHEModelLowLimit(G4double value)
void SetQModelLowLimit(G4double value)
G4double SampleThetaLab(const G4HadProjectile *aParticle, G4double tmass, G4double A)
G4double G4ParticleHPJENDLHEData::G4double result
Double_t Z2
Double_t Z1
G4double SampleTableT(const G4ParticleDefinition *aParticle, G4double p, G4double Z, G4double A)
const G4ParticleDefinition * GetDefinition() const
int G4int
Definition: G4Types.hh:78
G4ParticleDefinition * theProton
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4double ThetaLabToThetaCMS(const G4DynamicParticle *aParticle, G4double tmass, G4double thetaLab)
G4double DampFactor(G4double z)
G4double NeutronTuniform(G4int Z)
Char_t n[5]
G4double CalculateNuclearRad(G4double A)
static constexpr double fine_structure_const
Float_t x2[n_points_geant4]
Definition: compare.C:26
virtual G4double SampleInvariantT(const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
static constexpr double Bohr_radius
G4double GetIntegrandFunction(G4double theta)
G4int GetZ_asInt() const
Definition: G4Nucleus.hh:115
std::vector< G4String > fElementNameVector
G4PhysicsLogVector * fEnergyVector
std::vector< G4double > fElementNumberVector