Geant4  10.02.p02
G4GoudsmitSaundersonTable.hh
Go to the documentation of this file.
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: G4GoudsmitSaundersonTable.hh 93663 2015-10-28 09:50:49Z gcosmo $
27 //
28 // -----------------------------------------------------------------------------
29 //
30 // GEANT4 Class header file
31 //
32 // File name: G4GoudsmitSaundersonTable
33 //
34 // Author: Mihaly Novak / (Omrane Kadri)
35 //
36 // Creation date: 20.02.2009
37 //
38 // Class description:
39 // Class to handle multiple scattering angular distributions precomputed by
40 // using Kawrakow-Bielajew Goudsmit-Saunderson MSC model based on the screened
41 // Rutherford DCS for elastic scattering of electrons/positrons [1,2]. This
42 // class is used by G4GoudsmitSaundersonMscModel to sample the angular
43 // deflection of electrons/positrons after travelling a given path.
44 //
45 // Modifications:
46 // 04.03.2009 V.Ivanchenko cleanup and format according to Geant4 EM style
47 // 18.05.2015 M. Novak This class has been completely replaced (only the original
48 // class name was kept; class description was also inserted):
49 // A new version of Kawrakow-Bielajew Goudsmit-Saunderson MSC model
50 // based on the screened Rutherford DCS for elastic scattering of
51 // electrons/positrons has been introduced[1,2]. The corresponding MSC
52 // angular distributions over a 2D parameter grid have been recomputed
53 // and the CDFs are now stored in a variable transformed (smooth) form
54 // together with the corresponding rational interpolation parameters.
55 // The new version is several times faster, more robust and accurate
56 // compared to the earlier version (G4GoudsmitSaundersonMscModel class
57 // that use these data has been also completely replaced)
58 //
59 // References:
60 // [1] A.F.Bielajew, NIMB, 111 (1996) 195-208
61 // [2] I.Kawrakow, A.F.Bielajew, NIMB 134(1998) 325-336
62 //
63 // -----------------------------------------------------------------------------
64 
65 #ifndef G4GoudsmitSaundersonTable_h
66 #define G4GoudsmitSaundersonTable_h 1
67 
68 #include <vector>
69 
70 #include "G4Types.hh"
71 
73 {
74 public:
75 
78 
79  // initialie:
80  // - loads the precomputed MSC angular CDFs into memory
81  // - init. material dependent MSC parameters (Moliere's screening)
82  // (- only Master thread and only once)
83  void Initialise();
84 
85  // samples cos(theta) i.e. angular deflection from the precomputed angular
86  // distributions in the real multiple scattering case
89 
90  // returns with the screening parameter value that results with the first
91  // transport coefficient (G1) received as input parameter according to the
92  // screened Rutherford DCS. Used only when fgIsUsePWATotalXsecData is TRUE
93  // in G4GoudsmitSaundersonMscModel i.e. when PWA screeing is used instead of
94  // Moliere's one.
96 
97  // samples angular deflection cos(theta) and sin(theta) for electrons/positrons
98  // involving sampling of no scattering, single scattering, "few" scattering and
99  // real multiple scattering
101 
102  // material dependent MSC parameters (computed at initialisation) regarding
103  // Moliere's screening parameter
104  G4double GetMoliereBc(G4int matindx){return (*fgMoliereBc)[matindx];}
105  G4double GetMoliereXc2(G4int matindx){return (*fgMoliereXc2)[matindx];}
106 
107 private:
108 
109  // hide assignment operator and cpy ctr.
112 
113  // load precomputed CDFs of MSC angular distributions over a 2D parameter grid
114  // CDFs are stored in a variable transformed, equally probable intervall form
115  // together with the corresponding rational interpolation paraneters
116  void LoadMSCData();
117  void LoadMSCDataII();
118 
119  // initialisation of material dependent Moliere's MSC parameters
120  void InitMoliereMSCParams();
121 
122 private:
124 
125  static const G4int fgNumLambdas = 76;
126  static const G4int fgNumLamG1 = 21;
127  static const G4int fgNumLamG1II = 22;
128  static const G4int fgNumUvalues = 101;
129  static const G4int fgNumScreeningParams = 160;
131 
133 
135  static const G4double fgLambdaValues[];
137  static const G4double fgLamG1Values[];
138  static const G4double fgLamG1ValuesII[];
139 
141  static const G4double fgUValues[];
143 
144  // precomputed G1(A) function as a table -> run time interpolation to determine
145  // the screening parameter value A that gives back the given first transport
146  // coefficient G1
147  static const G4double fgG1Values[];
148  static const G4double fgScreeningParam[];
149  static const G4double fgSrcAValues[];
150  static const G4double fgSrcBValues[];
152 
156  static G4double fgInverseQ2CDFs[fgNumLambdas*fgNumLamG1*fgNumUvalues];
157  static G4double fgInterParamsA2[fgNumLambdas*fgNumLamG1*fgNumUvalues];
158  static G4double fgInterParamsB2[fgNumLambdas*fgNumLamG1*fgNumUvalues];
159  static G4double fgInverseQ2CDFsII[fgNumLambdas*fgNumLamG1II*fgNumUvalues];
160  static G4double fgInterParamsA2II[fgNumLambdas*fgNumLamG1II*fgNumUvalues];
161  static G4double fgInterParamsB2II[fgNumLambdas*fgNumLamG1II*fgNumUvalues];
162 
164 
165 
167 
173  static std::vector<G4double> *fgMoliereBc;
174  static std::vector<G4double> *fgMoliereXc2;
176 
177  // flag to check if data are alredy in memory
179 
180 };
181 
182 #endif
static const G4int fgNumLamG1II
number of s/{e}G_{1} $-values
static const G4double fgLambdaValues[]
number of s/{e} $-values; size = fgNumLambdas = 76
int G4int
Definition: G4Types.hh:78
static const G4int fgNumLambdas
size of grids of some parameters
G4double SampleCosThetaII(G4double, G4double, G4double, G4double, G4double, G4double)
bool G4bool
Definition: G4Types.hh:79
void Sampling(G4double, G4double, G4double, G4double &, G4double &)
static std::vector< G4double > * fgMoliereBc
the grid of b_lambda_{c} $ and {e} $) under the screened Rutherford cross section approximation...
G4double GetMoliereXc2(G4int matindx)
G4double GetMoliereBc(G4int matindx)
static std::vector< G4double > * fgMoliereXc2
G4GoudsmitSaundersonTable & operator=(const G4GoudsmitSaundersonTable &right)
double G4double
Definition: G4Types.hh:76
G4double SampleCosTheta(G4double, G4double, G4double, G4double, G4double, G4double)