Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4GSMottCorrection.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 // $Id: $
27 //
28 // ----------------------------------------------------------------------------
29 //
30 // GEANT4 Class header file
31 //
32 // File name: G4GSMottCorrection
33 //
34 // Author: Mihaly Novak
35 //
36 // Creation date: 23.08.2017
37 //
38 // Modifications:
39 //
40 // Class description:
41 // An object of this calss is used in the G4GoudsmitSaundersonTable when Mott-correction
42 // was required by the user in the G4GoudsmitSaundersonMscModel.
43 // The class is responsible to handle pre-computed Mott correction (rejection) functions
44 // obtained as a ratio of GS angular distributions computed based on the Screened-Rutherford
45 // DCS to GS angular distributions computed based on a more accurate corrected DCS_{cor}.
46 // The DCS used to compute the accurate Goudsmit-Saunderson angular distributions is [1]:
47 // DCS_{cor} = DCS_{SR}x[ DCS_{R}/DCS_{Mott}] where :
48 // # DCS_{SR} is the relativistic Screened-Rutherford DCS (first Born approximate
49 // solution of the Klein-Gordon i.e. relativistic Schrodinger equation =>
50 // scattering of spinless e- on exponentially screened Coulomb potential)
51 // note: the default (without using Mott-correction) GS angular distributions
52 // are based on this DCS_{SR} with Moliere's screening parameter!
53 // # DCS_{R} is the Rutherford DCS which is the same as above but without
54 // screening
55 // # DCS_{Mott} is the Mott DCS i.e. solution of the Dirac equation with a bare
56 // Coulomb potential i.e. scattering of particles with spin (e- or e+) on a
57 // point-like unscreened Coulomb potential [2]
58 // # moreover, the screening parameter of the DCS_{cor} was determined such that
59 // the DCS_{cor} with this corrected screening parameter reproduce the first
60 // transport cross sections obtained from the corresponding most accurate DCS [3].
61 // Unlike the default GS, the Mott-corrected angular distributions are particle type
62 // (different for e- and e+ <= the DCS_{Mott} and the screening correction) and target
63 // (Z and material) dependent.
64 //
65 // References:
66 // [2] I.Kawrakow, E.Mainegra-Hing, D.W.O.Rogers, F.Tessier,B.R.B.Walters, NRCC
67 // Report PIRS-701 (2013)
68 // [2] N.F. Mott, Proc. Roy. Soc. (London) A 124 (1929) 425.
69 // [3] F.Salvat, A.Jablonski, C.J. Powell, CPC 165(2005) 157-190
70 //
71 // -----------------------------------------------------------------------------
72 
73 #ifndef G4GSMottCorrection_h
74 #define G4GSMottCorrection_h 1
75 
77 
78 #include "globals.hh"
79 
80 #include <vector>
81 #include <string>
82 #include <sstream>
83 
84 class G4Material;
85 class G4Element;
86 
87 
89 public:
90  G4GSMottCorrection(G4bool iselectron=true);
91 
93 
94  void Initialise();
95 
96  void GetMottCorrectionFactors(G4double logekin, G4double beta2, G4int matindx,
97  G4double &mcToScr, G4double &mcToQ1, G4double &mcToG2PerG1);
98 
100  G4int matindx, G4int &ekindx, G4int &deltindx);
101 
102  static G4int GetMaxZet() { return gMaxZet; }
103 
104 private:
105  void InitMCDataPerElement();
106 
107  void InitMCDataPerMaterials();
108 
109  void LoadMCDataElement(const G4Element*);
110 
111  void ReadCompressedFile(std::string fname, std::istringstream &iss);
112 
113  void InitMCDataMaterial(const G4Material*);
114  //
115  // dat structures
116  struct DataPerDelta {
117  G4double fSA; // a,b,c,d spline interpolation parameters for the last \sin(0.5\theta) bin
121  G4double *fRejFuntion; // rejection func. for a given E_{kin}, \delta, e^-/e^+ over the \sin(0.5\theta) grid
122  };
123 
124  struct DataPerEkin {
125  G4double fMCScreening; // correction factor to Moliere screening parameter
126  G4double fMCFirstMoment; // correction factor to first moment
127  G4double fMCSecondMoment; // correction factor to second
128  DataPerDelta **fDataPerDelta; // per delta value data structure for each delta values
129  };
130 
131  // either per material or per Z
133  DataPerEkin **fDataPerEkin; // per kinetic energy data structure for each kinetic energy value
134  };
135  //
138  void ClearMCDataPerElement();
139  void ClearMCDataPerMaterial();
140  //
141  // data members:
142  // - Mott correction data are computed over a :
143  // I. Kinetic energy grid [both rejection functions and correction factors]:
144  // 1. kinetic energy grid from 1[keV] - 100[keV] with log-spacing 16 points:
145  // # linear interpolation on \ln[E_{kin}] will be used
146  // 2. \beta^2 grid from E_{kin} = 100[keV](~0.300546) - \beta^2=0.9999(~50.5889MeV]) with linear spacing 16 points:
147  // # linear interpolation on \beta^2 will be used
148  // 3. the overall kinetic energy grid is from E_{kin}=1[keV] - E_{kin}<=\beta^2=0.9999(~50.5889MeV]) with 31 points
149  // II. Delta value grid [rejection functions at a given kinetic energy(also depends on \theta;Z,e-/e+)]:
150  // 1. \delta=2 Q_{1SR} (\eta_{MCcor})/ [1-2 Q_{1SR} (\eta_{MCcor})] where Q_{1SR} is the first moment i.e.
151  // Q_{1SR}(\eta_{MCcor}) =s/\lambda_{el}G_{1SR}(\eta_{MCcor}) where s/\lambda_{el} is the mean number of elastic
152  // scattering along the path s and G_{1SR}(\eta_{MCcor}) is the first, Screened-Rutherford transport coefficient
153  // but computed by using the Mott-corrected Moliere screening parameter
154  // 2. the delta value grid is from [0(1e-3) - 0.9] with linear spacing of 28 points:
155  // # linear interpolation will be used on \delta
156  // III. \sin(0.5\theta) grid[rejection function at a given kinetic energy - delta value pair (also depends on Z,e-/e+)]:
157  // 1. 32 \sin(0.5\theta) pints between [0,1] with linear spacing: # linear interpolation on \sin(0.5\theta) will
158  // be used exept the last bin where spline is used (the corresponding 4 spline parameters are also stored)
159 private:
161  static constexpr G4int gNumEkin = 31; // number of kinetic energy grid points for Mott correction
162  static constexpr G4int gNumBeta2 = 16; // \beta^2 values between [fMinBeta2-fMaxBeta2]
163  static constexpr G4int gNumDelta = 28; // \delta values between [0(1.e-3)-0.9]
164  static constexpr G4int gNumAngle = 32; //
165  static constexpr G4int gMaxZet = 98; // max. Z for which Mott-correction data were computed (98)
166  static constexpr G4double gMinEkin = 1.*CLHEP::keV; // minimum kinetic energy value
167  static constexpr G4double gMidEkin = 100.*CLHEP::keV; // kinetic energy at the border of the E_{kin}-\beta^2 grids
168  static constexpr G4double gMaxBeta2 = 0.9999; // maximum \beta^2 value
169  static constexpr G4double gMaxDelta = 0.9; // maximum \delta value (the minimum is 0(1.e-3))
170  //
171  G4double fMaxEkin; // from max fMaxBeta2 = 0.9999 (~50.5889 [MeV])
172  G4double fLogMinEkin; // \ln[fMinEkin]
173  G4double fInvLogDelEkin; // 1/[\ln(fMidEkin/fMinEkin)/(fNumEkin-fNumBeta2)]
174  G4double fMinBeta2; // <= E_{kin}=100 [keV] (~0.300546)
175  G4double fInvDelBeta2; // 1/[(fMaxBeta2-fMinBeta2)/(fNumBeta2-1)]
176  G4double fInvDelDelta; // 1/[0.9/(fNumDelta-1)]
177  G4double fInvDelAngle; // 1/[(1-0)/fNumAngle-1]
178  //
179  static const std::string gElemSymbols[];
180  //
181  std::vector<DataPerMaterial*> fMCDataPerElement; // size will be gMaxZet+1; won't be null only at used Z indices
182  std::vector<DataPerMaterial*> fMCDataPerMaterial; // size will #materials; won't be null only at used mat. indices
183 };
184 
185 #endif // G4GSMottCorrection_h
static constexpr G4int gNumDelta
std::vector< DataPerMaterial * > fMCDataPerElement
static constexpr G4int gNumBeta2
static constexpr G4double gMaxBeta2
static constexpr G4int gNumEkin
void LoadMCDataElement(const G4Element *)
static constexpr G4double gMaxDelta
static constexpr G4int gNumAngle
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
static constexpr G4int gMaxZet
static constexpr G4double gMinEkin
void GetMottCorrectionFactors(G4double logekin, G4double beta2, G4int matindx, G4double &mcToScr, G4double &mcToQ1, G4double &mcToG2PerG1)
void InitMCDataMaterial(const G4Material *)
static G4int GetMaxZet()
static const std::string gElemSymbols[]
G4double GetMottRejectionValue(G4double logekin, G4double G4beta2, G4double q1, G4double cost, G4int matindx, G4int &ekindx, G4int &deltindx)
void AllocateDataPerMaterial(DataPerMaterial *)
static constexpr G4double gMidEkin
int G4int
Definition: G4Types.hh:78
void DeAllocateDataPerMaterial(DataPerMaterial *)
void ReadCompressedFile(std::string fname, std::istringstream &iss)
G4GSMottCorrection(G4bool iselectron=true)
std::vector< DataPerMaterial * > fMCDataPerMaterial
static constexpr double keV