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
G4WentzelOKandVIxSection.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4WentzelOKandVIxSection.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
//
30
// GEANT4 Class header file
31
//
32
//
33
// File name: G4WentzelOKandVIxSection
34
//
35
// Authors: V.Ivanchenko and O.Kadri
36
//
37
// Creation date: 21.05.2010
38
//
39
// Modifications:
40
//
41
//
42
// Class Description:
43
//
44
// Implementation of the computation of total and transport cross sections,
45
// sample scattering angle for the single scattering case.
46
// to be used by single and multiple scattering models. References:
47
// 1) G.Wentzel, Z. Phys. 40 (1927) 590.
48
// 2) J.M. Fernandez-Varea et al., NIM B73 (1993) 447.
49
//
50
// -------------------------------------------------------------------
51
//
52
53
#ifndef G4WentzelOKandVIxSection_h
54
#define G4WentzelOKandVIxSection_h 1
55
56
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
57
58
#include "
globals.hh
"
59
#include "
G4Material.hh
"
60
#include "
G4Element.hh
"
61
#include "
G4ElementVector.hh
"
62
#include "
G4NistManager.hh
"
63
#include "
G4NuclearFormfactorType.hh
"
64
#include "
G4ThreeVector.hh
"
65
#include "
G4Pow.hh
"
66
#include "
G4Threading.hh
"
67
68
class
G4ParticleDefinition
;
69
class
G4ScreeningMottCrossSection
;
70
71
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
72
73
class
G4WentzelOKandVIxSection
74
{
75
76
public
:
77
78
explicit
G4WentzelOKandVIxSection
(
G4bool
comb=
true
);
79
80
virtual
~G4WentzelOKandVIxSection
();
81
82
void
Initialise
(
const
G4ParticleDefinition
*,
G4double
CosThetaLim);
83
84
void
SetupParticle
(
const
G4ParticleDefinition
*);
85
86
// return cos(ThetaMax) for msc and cos(thetaMin) for single scattering
87
// cut = DBL_MAX means no scattering off electrons
88
G4double
SetupKinematic
(
G4double
kinEnergy,
const
G4Material
*
mat
);
89
G4double
SetupTarget
(
G4int
Z
,
G4double
cut);
90
91
G4double
ComputeTransportCrossSectionPerAtom
(
G4double
CosThetaMax);
92
93
G4ThreeVector
&
SampleSingleScattering
(
G4double
CosThetaMin,
94
G4double
CosThetaMax,
95
G4double
elecRatio);
96
97
G4double
ComputeSecondTransportMoment
(
G4double
CosThetaMax);
98
99
inline
G4double
ComputeNuclearCrossSection
(
G4double
CosThetaMin,
100
G4double
CosThetaMax);
101
102
inline
G4double
ComputeElectronCrossSection
(
G4double
CosThetaMin,
103
G4double
CosThetaMax);
104
105
inline
void
SetTargetMass
(
G4double
value
);
106
107
inline
G4double
GetMomentumSquare
()
const
;
108
109
inline
G4double
GetCosThetaNuc
()
const
;
110
111
inline
G4double
GetCosThetaElec
()
const
;
112
113
protected
:
114
115
void
ComputeMaxElectronScattering
(
G4double
cut);
116
117
void
InitialiseA
();
118
119
inline
G4double
FlatFormfactor
(
G4double
x
);
120
121
const
G4ParticleDefinition
*
theProton
;
122
const
G4ParticleDefinition
*
theElectron
;
123
const
G4ParticleDefinition
*
thePositron
;
124
const
G4Material
*
currentMaterial
;
125
126
G4NistManager
*
fNistManager
;
127
G4Pow
*
fG4pow
;
128
129
G4ScreeningMottCrossSection
*
fMottXSection
;
130
131
G4ThreeVector
temp
;
132
133
G4double
numlimit
;
134
135
// integer parameters
136
G4int
nwarnings
;
137
G4int
nwarnlimit
;
138
139
G4NuclearFormfactorType
fNucFormfactor
;
140
141
G4bool
isCombined
;
142
143
// single scattering parameters
144
G4double
coeff
;
145
G4double
cosTetMaxElec
;
146
G4double
cosTetMaxNuc
;
147
G4double
cosThetaMax
;
148
G4double
alpha2
;
149
150
// projectile
151
const
G4ParticleDefinition
*
particle
;
152
153
G4double
chargeSquare
;
154
G4double
charge3
;
155
G4double
spin
;
156
G4double
mass
;
157
G4double
tkin
;
158
G4double
mom2
;
159
G4double
momCM2
;
160
G4double
invbeta2
;
161
G4double
kinFactor
;
162
G4double
etag
;
163
G4double
ecut
;
164
G4double
lowEnergyLimit
;
165
166
// target
167
G4int
targetZ
;
168
G4double
targetMass
;
169
G4double
screenZ
;
170
G4double
formfactA
;
171
G4double
factorA2
;
172
G4double
factB
;
173
G4double
factB1
;
174
G4double
factD
;
175
G4double
fMottFactor
;
176
G4double
gam0pcmp
;
177
G4double
pcmp2
;
178
179
static
G4double
ScreenRSquareElec
[100];
180
static
G4double
ScreenRSquare
[100];
181
static
G4double
FormFactor
[100];
182
183
#ifdef G4MULTITHREADED
184
static
G4Mutex
WentzelOKandVIxSectionMutex;
185
#endif
186
187
private
:
188
// hide assignment operator
189
G4WentzelOKandVIxSection
&
operator
=
190
(
const
G4WentzelOKandVIxSection
&
right
) =
delete
;
191
G4WentzelOKandVIxSection
(
const
G4WentzelOKandVIxSection
&) =
delete
;
192
};
193
194
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
195
196
inline
void
G4WentzelOKandVIxSection::SetTargetMass
(
G4double
value
)
197
{
198
targetMass
=
value
;
199
factD
= std::sqrt(
mom2
)/
value
;
200
}
201
202
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
203
204
inline
G4double
G4WentzelOKandVIxSection::GetMomentumSquare
()
const
205
{
206
return
mom2
;
207
}
208
209
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
210
211
inline
G4double
G4WentzelOKandVIxSection::GetCosThetaNuc
()
const
212
{
213
return
cosTetMaxNuc
;
214
}
215
216
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
217
218
inline
G4double
G4WentzelOKandVIxSection::GetCosThetaElec
()
const
219
{
220
return
cosTetMaxElec
;
221
}
222
223
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
224
225
inline
G4double
226
G4WentzelOKandVIxSection::ComputeNuclearCrossSection
(
G4double
cosTMin,
227
G4double
cosTMax)
228
{
229
return
targetZ
*
kinFactor
*
fMottFactor
*(cosTMin - cosTMax)/
230
((1.0 - cosTMin +
screenZ
)*(1.0 - cosTMax +
screenZ
));
231
}
232
233
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
234
235
inline
G4double
236
G4WentzelOKandVIxSection::ComputeElectronCrossSection
(
G4double
cosTMin,
237
G4double
cosTMax)
238
{
239
G4double
cost1 =
std::max
(cosTMin,
cosTetMaxElec
);
240
G4double
cost2 =
std::max
(cosTMax,
cosTetMaxElec
);
241
return
(cost1 <= cost2) ? 0.0 :
kinFactor
*
fMottFactor
*(cost1 - cost2)/
242
((1.0 - cost1 +
screenZ
)*(1.0 - cost2 +
screenZ
));
243
}
244
245
inline
G4double
G4WentzelOKandVIxSection::FlatFormfactor
(
G4double
x
)
246
{
247
return
3.0*(std::sin(x) - x*std::cos(x))/(x*x*x);
248
}
249
250
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
251
252
#endif
253
geant4
tree
geant4-10.6-release
source
processes
electromagnetic
standard
include
G4WentzelOKandVIxSection.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:34
using
1.8.2 with
ECCE GitHub integration