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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/include/G4GSMottCorrection.hh (Version 11.3.0) and /processes/electromagnetic/standard/include/G4GSMottCorrection.hh (Version 10.4.p1)


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