Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4EmCorrections.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//
27// -------------------------------------------------------------------
28//
29// GEANT4 Class header file
30//
31//
32// File name: G4EmCorrections
33//
34// Author: Vladimir Ivanchenko
35//
36// Creation date: 13.01.2005
37//
38// Modifications:
39// 28.04.2006 General cleanup, add finite size corrections (V.Ivanchenko)
40// 13.05.2006 Add corrections for ion stopping (V.Ivanhcenko)
41// 20.05.2008 Removed Finite Size correction (V.Ivanchenko)
42// 12.09.2008 Added inlined interfaces to effective charge (V.Ivanchenko)
43// 19.04.2012 Fix reproducibility problem (A.Ribon)
44//
45// Class Description:
46//
47// This class provides calculation of EM corrections to ionisation
48//
49
50// -------------------------------------------------------------------
51//
52
53#ifndef G4EmCorrections_h
54#define G4EmCorrections_h 1
55
57
58#include "globals.hh"
60#include "G4Material.hh"
62
63class G4VEmModel;
64class G4PhysicsVector;
65class G4IonTable;
68class G4Pow;
69
71{
72
73public:
74
75 explicit G4EmCorrections(G4int verb);
76
77 virtual ~G4EmCorrections();
78
80 const G4Material*,
81 G4double kineticEnergy,
82 G4double cutEnergy);
83
86 G4double kineticEnergy);
87
89 const G4Material*,
90 G4double kineticEnergy);
91
93 const G4Material*,
94 G4double kineticEnergy);
95
97 const G4Material*,
98 G4double kineticEnergy);
99
101 const G4Material*,
102 G4double kineticEnergy);
103
105 const G4Material*,
106 G4double kineticEnergy);
107
109 const G4Material*,
110 G4double kineticEnergy);
111
113 const G4Material*,
114 G4double kineticEnergy);
115
117 const G4Material*,
118 G4double kineticEnergy);
119
121 const G4Material*,
122 G4double kineticEnergy);
123
125 const G4Material*,
126 G4double kineticEnergy);
127
129 const G4Material*,
130 G4double kineticEnergy);
131
133 const G4Material*,
134 G4double kineticEnergy);
135
136 void AddStoppingData(G4int Z, G4int A, const G4String& materialName,
137 G4PhysicsVector* dVector);
138
139 void InitialiseForNewRun();
140
141 // effective charge correction using stopping power data
143 const G4Material*,
144 G4double kineticEnergy);
145
146 // effective charge of an ion
148 const G4Material*,
149 G4double kineticEnergy);
150
151 inline
153 const G4Material*,
154 G4double kineticEnergy);
155
156 // ionisation models for ions
157 inline void SetIonisationModels(G4VEmModel* m1 = nullptr,
158 G4VEmModel* m2 = nullptr);
159
160 inline G4int GetNumberOfStoppingVectors() const;
161
162 inline void SetVerbose(G4int verb);
163
164private:
165
166 void Initialise();
167
168 void BuildCorrectionVector();
169
170 void SetupKinematics(const G4ParticleDefinition*,
171 const G4Material*,
172 G4double kineticEnergy);
173
174 G4double KShell(G4double theta, G4double eta);
175
176 G4double LShell(G4double theta, G4double eta);
177
178 G4int Index(G4double x, const G4double* y, G4int n) const;
179
180 G4double Value(G4double xv, G4double x1, G4double x2,
181 G4double y1, G4double y2) const;
182
183 G4double Value2(G4double xv, G4double yv, G4double x1, G4double x2,
184 G4double y1, G4double y2, G4double z11, G4double z21,
185 G4double z12, G4double z22) const;
186
187 // hide assignment operator
188 G4EmCorrections & operator=(const G4EmCorrections &right) = delete;
189 G4EmCorrections(const G4EmCorrections&) = delete;
190
191 G4Pow* g4calc;
192
193 static const G4double ZD[11];
194 static const G4double UK[20];
195 static const G4double VK[20];
196 static G4double ZK[20];
197 static const G4double Eta[29];
198 static G4double CK[20][29];
199 static G4double CL[26][28];
200 static const G4double UL[26];
201 static G4double VL[26];
202
203 static G4LPhysicsFreeVector* BarkasCorr;
204 static G4LPhysicsFreeVector* ThetaK;
205 static G4LPhysicsFreeVector* ThetaL;
206
207 G4double alpha2;
208
209 std::vector<const G4Material*> currmat;
210 std::map< G4int, std::vector<G4double> > thcorr;
211 size_t ncouples;
212
213 const G4ParticleDefinition* particle;
214 const G4ParticleDefinition* curParticle;
215 const G4Material* material;
216 const G4Material* curMaterial;
217 const G4ElementVector* theElementVector;
218 const G4double* atomDensity;
219
220 G4PhysicsVector* curVector;
221
222 G4IonTable* ionTable;
223 G4VEmModel* ionLEModel;
224 G4VEmModel* ionHEModel;
225
226 G4double kinEnergy;
227 G4double mass;
228 G4double massFactor;
229 G4double eth;
230 G4double tau;
231 G4double gamma;
232 G4double bg2;
233 G4double beta2;
234 G4double beta;
235 G4double ba2;
236 G4double tmax;
237 G4double charge;
238 G4double q2;
239 G4double eCorrMin;
240 G4double eCorrMax;
241
242 G4int verbose;
243
244 G4int nK;
245 G4int nL;
246 G4int nEtaK;
247 G4int nEtaL;
248
249 G4int nbinCorr;
250 G4int numberOfElements;
251
252 // Ion stopping data
253 G4int nIons;
254 G4int idx;
255 G4int currentZ;
256 std::vector<G4int> Zion;
257 std::vector<G4int> Aion;
258 std::vector<G4String> materialName;
259
260 std::vector<const G4ParticleDefinition*> ionList;
261
262 std::vector<const G4Material*> materialList;
263 std::vector<G4PhysicsVector*> stopData;
264
265 G4bool isMaster;
266 G4ionEffectiveCharge effCharge;
267};
268
269inline G4int
270G4EmCorrections::Index(G4double x, const G4double* y, G4int n) const
271{
272 G4int iddd = n-1;
273 // Loop checking, 03-Aug-2015, Vladimir Ivanchenko
274 do {--iddd;} while (iddd>0 && x<y[iddd]);
275 return iddd;
276}
277
278inline G4double G4EmCorrections::Value(G4double xv, G4double x1, G4double x2,
279 G4double y1, G4double y2) const
280{
281 return y1 + (y2 - y1)*(xv - x1)/(x2 - x1);
282}
283
284inline G4double G4EmCorrections::Value2(G4double xv, G4double yv,
285 G4double x1, G4double x2,
286 G4double y1, G4double y2,
287 G4double z11, G4double z21,
288 G4double z12, G4double z22) const
289{
290 return (z11*(x2-xv)*(y2-yv) + z22*(xv-x1)*(yv-y1) +
291 0.5*(z12*((x2-xv)*(yv-y1)+(xv-x1)*(y2-yv))+
292 z21*((xv-x1)*(y2-yv)+(yv-y1)*(x2-xv))))
293 / ((x2-x1)*(y2-y1));
294}
295
296inline void
298{
299 if(mod1) { ionLEModel = mod1; }
300 if(mod2) { ionHEModel = mod2; }
301}
302
304{
305 return nIons;
306}
307
308inline G4double
310 const G4Material* mat,
311 G4double kineticEnergy)
312{
313 return effCharge.EffectiveCharge(p,mat,kineticEnergy);
314}
315
316inline G4double
318 const G4Material* mat,
319 G4double kineticEnergy)
320{
321 return effCharge.EffectiveChargeSquareRatio(p,mat,kineticEnergy);
322}
323
325{
326 verbose = verb;
327}
328
329//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
330
331#endif
double A(double temperature)
std::vector< G4Element * > G4ElementVector
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
G4double EffectiveChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double LShellCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
void AddStoppingData(G4int Z, G4int A, const G4String &materialName, G4PhysicsVector *dVector)
virtual ~G4EmCorrections()
G4double MottCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double KShellCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double IonHighOrderCorrections(const G4ParticleDefinition *, const G4MaterialCutsCouple *, G4double kineticEnergy)
G4double BarkasCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double ComputeIonCorrections(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double IonBarkasCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double SpinCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double HighOrderCorrections(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy, G4double cutEnergy)
void SetVerbose(G4int verb)
G4int GetNumberOfStoppingVectors() const
G4double ShellCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double Bethe(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double GetParticleCharge(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double EffectiveChargeCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double ShellCorrectionSTD(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double DensityCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double BlochCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
void SetIonisationModels(G4VEmModel *m1=nullptr, G4VEmModel *m2=nullptr)
Definition: G4Pow.hh:49
G4double EffectiveCharge(const G4ParticleDefinition *p, const G4Material *material, G4double kineticEnergy)
G4double EffectiveChargeSquareRatio(const G4ParticleDefinition *p, const G4Material *material, G4double kineticEnergy)