ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4EmCorrections.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4EmCorrections.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
// -------------------------------------------------------------------
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
56
#include <
CLHEP/Units/PhysicalConstants.h
>
57
58
#include "
globals.hh
"
59
#include "
G4ionEffectiveCharge.hh
"
60
#include "
G4Material.hh
"
61
#include "
G4ParticleDefinition.hh
"
62
63
class
G4VEmModel
;
64
class
G4PhysicsVector
;
65
class
G4IonTable
;
66
class
G4MaterialCutsCouple
;
67
class
G4LPhysicsFreeVector
;
68
class
G4Pow
;
69
70
class
G4EmCorrections
71
{
72
73
public
:
74
75
explicit
G4EmCorrections
(
G4int
verb);
76
77
virtual
~G4EmCorrections
();
78
79
G4double
HighOrderCorrections
(
const
G4ParticleDefinition
*,
80
const
G4Material
*,
81
G4double
kineticEnergy,
82
G4double
cutEnergy);
83
84
G4double
IonHighOrderCorrections
(
const
G4ParticleDefinition
*,
85
const
G4MaterialCutsCouple
*,
86
G4double
kineticEnergy);
87
88
G4double
ComputeIonCorrections
(
const
G4ParticleDefinition
*,
89
const
G4Material
*,
90
G4double
kineticEnergy);
91
92
G4double
IonBarkasCorrection
(
const
G4ParticleDefinition
*,
93
const
G4Material
*,
94
G4double
kineticEnergy);
95
96
G4double
Bethe
(
const
G4ParticleDefinition
*,
97
const
G4Material
*,
98
G4double
kineticEnergy);
99
100
G4double
SpinCorrection
(
const
G4ParticleDefinition
*,
101
const
G4Material
*,
102
G4double
kineticEnergy);
103
104
G4double
KShellCorrection
(
const
G4ParticleDefinition
*,
105
const
G4Material
*,
106
G4double
kineticEnergy);
107
108
G4double
LShellCorrection
(
const
G4ParticleDefinition
*,
109
const
G4Material
*,
110
G4double
kineticEnergy);
111
112
G4double
ShellCorrection
(
const
G4ParticleDefinition
*,
113
const
G4Material
*,
114
G4double
kineticEnergy);
115
116
G4double
ShellCorrectionSTD
(
const
G4ParticleDefinition
*,
117
const
G4Material
*,
118
G4double
kineticEnergy);
119
120
G4double
DensityCorrection
(
const
G4ParticleDefinition
*,
121
const
G4Material
*,
122
G4double
kineticEnergy);
123
124
G4double
BarkasCorrection
(
const
G4ParticleDefinition
*,
125
const
G4Material
*,
126
G4double
kineticEnergy);
127
128
G4double
BlochCorrection
(
const
G4ParticleDefinition
*,
129
const
G4Material
*,
130
G4double
kineticEnergy);
131
132
G4double
MottCorrection
(
const
G4ParticleDefinition
*,
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
142
G4double
EffectiveChargeCorrection
(
const
G4ParticleDefinition
*,
143
const
G4Material
*,
144
G4double
kineticEnergy);
145
146
// effective charge of an ion
147
inline
G4double
GetParticleCharge
(
const
G4ParticleDefinition
*,
148
const
G4Material
*,
149
G4double
kineticEnergy);
150
151
inline
152
G4double
EffectiveChargeSquareRatio
(
const
G4ParticleDefinition
*,
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
164
private
:
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
269
inline
G4int
270
G4EmCorrections::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
278
inline
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
284
inline
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
296
inline
void
297
G4EmCorrections::SetIonisationModels
(
G4VEmModel
* mod1,
G4VEmModel
* mod2)
298
{
299
if
(mod1) {
ionLEModel
= mod1; }
300
if
(mod2) {
ionHEModel
= mod2; }
301
}
302
303
inline
G4int
G4EmCorrections::GetNumberOfStoppingVectors
()
const
304
{
305
return
nIons
;
306
}
307
308
inline
G4double
309
G4EmCorrections::GetParticleCharge
(
const
G4ParticleDefinition
*
p
,
310
const
G4Material
*
mat
,
311
G4double
kineticEnergy)
312
{
313
return
effCharge
.
EffectiveCharge
(p,mat,kineticEnergy);
314
}
315
316
inline
G4double
317
G4EmCorrections::EffectiveChargeSquareRatio
(
const
G4ParticleDefinition
*
p
,
318
const
G4Material
*
mat
,
319
G4double
kineticEnergy)
320
{
321
return
effCharge
.
EffectiveChargeSquareRatio
(p,mat,kineticEnergy);
322
}
323
324
inline
void
G4EmCorrections::SetVerbose
(
G4int
verb)
325
{
326
verbose
= verb;
327
}
328
329
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
330
331
#endif
geant4
tree
geant4-10.6-release
source
processes
electromagnetic
utils
include
G4EmCorrections.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:35
using
1.8.2 with
ECCE GitHub integration