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
G4EmStandardPhysics_option2.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4EmStandardPhysics_option2.cc
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
// ClassName: G4EmStandardPhysics_option2
30
//
31
// Author: V.Ivanchenko 09.11.2005
32
//
33
// Modified:
34
// 19.12.2005 V.Ivanchenko rename 71 -> 72
35
// 15.06.2006 V.Ivanchenko use this class as a constructor of fast EM physics
36
// 13.11.2006 V.Ivanchenko use G4hMultipleScattering
37
// 14.11.2006 V.Ivanchenko use sub-cutoff option for all particles
38
// 13.02.2007 V.Ivanchenko use default msc
39
// 15.05.2007 V.Ivanchenko rename to _option2
40
// 13.03.2008 V.Ivanchenko use G4eMultipleScattering
41
// 21.04.2008 V.Ivanchenko add long-lived D and B mesons; use spline
42
// 28.05.2008 V.Ivanchenko linLossLimit=0.01; added hBrem and hPairProd processes
43
//
44
//----------------------------------------------------------------------------
45
//
46
47
#include "
G4EmStandardPhysics_option2.hh
"
48
49
#include "
G4SystemOfUnits.hh
"
50
#include "
G4ParticleDefinition.hh
"
51
#include "
G4LossTableManager.hh
"
52
#include "
G4EmParameters.hh
"
53
54
#include "
G4ComptonScattering.hh
"
55
#include "
G4GammaConversion.hh
"
56
#include "
G4PhotoElectricEffect.hh
"
57
#include "
G4LivermorePhotoElectricModel.hh
"
58
#include "
G4KleinNishinaModel.hh
"
59
#include "
G4RayleighScattering.hh
"
60
61
#include "
G4eMultipleScattering.hh
"
62
#include "
G4hMultipleScattering.hh
"
63
#include "
G4MuMultipleScattering.hh
"
64
#include "
G4CoulombScattering.hh
"
65
#include "
G4eCoulombScatteringModel.hh
"
66
#include "
G4UrbanMscModel.hh
"
67
#include "
G4WentzelVIModel.hh
"
68
69
#include "
G4eIonisation.hh
"
70
#include "
G4eBremsstrahlung.hh
"
71
#include "
G4eBremsstrahlungRelModel.hh
"
72
#include "
G4eplusAnnihilation.hh
"
73
#include "
G4Generator2BS.hh
"
74
#include "
G4SeltzerBergerModel.hh
"
75
#include "
G4UAtomicDeexcitation.hh
"
76
77
#include "
G4MuIonisation.hh
"
78
#include "
G4MuBremsstrahlung.hh
"
79
#include "
G4MuPairProduction.hh
"
80
#include "
G4hBremsstrahlung.hh
"
81
#include "
G4hPairProduction.hh
"
82
83
#include "
G4MuBremsstrahlungModel.hh
"
84
#include "
G4MuPairProductionModel.hh
"
85
#include "
G4hBremsstrahlungModel.hh
"
86
#include "
G4hPairProductionModel.hh
"
87
88
#include "
G4hIonisation.hh
"
89
#include "
G4ionIonisation.hh
"
90
#include "
G4alphaIonisation.hh
"
91
92
#include "
G4ParticleTable.hh
"
93
#include "
G4Gamma.hh
"
94
#include "
G4Electron.hh
"
95
#include "
G4Positron.hh
"
96
#include "
G4MuonPlus.hh
"
97
#include "
G4MuonMinus.hh
"
98
#include "
G4PionPlus.hh
"
99
#include "
G4PionMinus.hh
"
100
#include "
G4KaonPlus.hh
"
101
#include "
G4KaonMinus.hh
"
102
#include "
G4Proton.hh
"
103
#include "
G4AntiProton.hh
"
104
#include "
G4Deuteron.hh
"
105
#include "
G4Triton.hh
"
106
#include "
G4He3.hh
"
107
#include "
G4Alpha.hh
"
108
#include "
G4GenericIon.hh
"
109
110
#include "
G4PhysicsListHelper.hh
"
111
#include "
G4BuilderType.hh
"
112
#include "
G4EmModelActivator.hh
"
113
#include "
G4GammaGeneralProcess.hh
"
114
115
// factory
116
#include "
G4PhysicsConstructorFactory.hh
"
117
//
118
G4_DECLARE_PHYSCONSTR_FACTORY
(
G4EmStandardPhysics_option2
);
119
120
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
121
122
G4EmStandardPhysics_option2::G4EmStandardPhysics_option2
(
G4int
ver,
123
const
G4String
&)
124
:
G4VPhysicsConstructor
(
"G4EmStandard_opt2"
), verbose(ver)
125
{
126
G4EmParameters
* param =
G4EmParameters::Instance
();
127
param->
SetDefaults
();
128
param->
SetVerbose
(
verbose
);
129
param->
SetApplyCuts
(
false
);
130
param->
SetMscRangeFactor
(0.2);
131
param->
SetLateralDisplacement
(
false
);
132
param->
SetMscStepLimitType
(
fMinimal
);
133
SetPhysicsType
(
bElectromagnetic
);
134
}
135
136
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
137
138
G4EmStandardPhysics_option2::~G4EmStandardPhysics_option2
()
139
{}
140
141
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
142
143
void
G4EmStandardPhysics_option2::ConstructParticle
()
144
{
145
// gamma
146
G4Gamma::Gamma
();
147
148
// leptons
149
G4Electron::Electron
();
150
G4Positron::Positron
();
151
G4MuonPlus::MuonPlus
();
152
G4MuonMinus::MuonMinus
();
153
154
// mesons
155
G4PionPlus::PionPlusDefinition
();
156
G4PionMinus::PionMinusDefinition
();
157
G4KaonPlus::KaonPlusDefinition
();
158
G4KaonMinus::KaonMinusDefinition
();
159
160
// barions
161
G4Proton::Proton
();
162
G4AntiProton::AntiProton
();
163
164
// ions
165
G4Deuteron::Deuteron
();
166
G4Triton::Triton
();
167
G4He3::He3
();
168
G4Alpha::Alpha
();
169
G4GenericIon::GenericIonDefinition
();
170
}
171
172
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
173
174
void
G4EmStandardPhysics_option2::ConstructProcess
()
175
{
176
if
(
verbose
> 1) {
177
G4cout
<<
"### "
<<
GetPhysicsName
() <<
" Construct Processes "
<<
G4endl
;
178
}
179
G4PhysicsListHelper
* ph =
G4PhysicsListHelper::GetPhysicsListHelper
();
180
G4LossTableManager
* man =
G4LossTableManager::Instance
();
181
182
// muon & hadron bremsstrahlung and pair production
183
G4MuBremsstrahlung
* mub =
new
G4MuBremsstrahlung
();
184
G4MuPairProduction
*
mup
=
new
G4MuPairProduction
();
185
G4hBremsstrahlung
* pib =
new
G4hBremsstrahlung
();
186
G4hPairProduction
*
pip
=
new
G4hPairProduction
();
187
G4hBremsstrahlung
* kb =
new
G4hBremsstrahlung
();
188
G4hPairProduction
* kp =
new
G4hPairProduction
();
189
G4hBremsstrahlung
* pb =
new
G4hBremsstrahlung
();
190
G4hPairProduction
*
pp
=
new
G4hPairProduction
();
191
192
// muon & hadron multiple scattering
193
G4MuMultipleScattering
* mumsc =
new
G4MuMultipleScattering
();
194
mumsc->
SetEmModel
(
new
G4WentzelVIModel
());
195
G4CoulombScattering
* muss =
new
G4CoulombScattering
();
196
197
G4hMultipleScattering
* pimsc =
new
G4hMultipleScattering
();
198
pimsc->
SetEmModel
(
new
G4WentzelVIModel
());
199
G4CoulombScattering
* piss =
new
G4CoulombScattering
();
200
201
G4hMultipleScattering
* kmsc =
new
G4hMultipleScattering
();
202
kmsc->
SetEmModel
(
new
G4WentzelVIModel
());
203
G4CoulombScattering
* kss =
new
G4CoulombScattering
();
204
205
G4hMultipleScattering
* hmsc =
new
G4hMultipleScattering
(
"ionmsc"
);
206
207
// high energy limit for e+- scattering models and bremsstrahlung
208
G4double
highEnergyLimit =
G4EmParameters::Instance
()->
MscEnergyLimit
();
209
210
// Add standard EM Processes
211
G4ParticleTable
* table =
G4ParticleTable::GetParticleTable
();
212
for
(
const
auto
& particleName :
partList
.
PartNames
()) {
213
G4ParticleDefinition
*
particle
= table->
FindParticle
(particleName);
214
if
(!particle) {
continue
; }
215
if
(particleName ==
"gamma"
) {
216
217
G4PhotoElectricEffect
* pee =
new
G4PhotoElectricEffect
();
218
219
if
(
G4EmParameters::Instance
()->GeneralProcessActive()) {
220
G4GammaGeneralProcess
*
sp
=
new
G4GammaGeneralProcess
();
221
sp->
AddEmProcess
(pee);
222
sp->
AddEmProcess
(
new
G4ComptonScattering
());
223
sp->
AddEmProcess
(
new
G4GammaConversion
());
224
man->
SetGammaGeneralProcess
(sp);
225
ph->
RegisterProcess
(sp, particle);
226
227
}
else
{
228
ph->
RegisterProcess
(pee, particle);
229
ph->
RegisterProcess
(
new
G4ComptonScattering
(), particle);
230
ph->
RegisterProcess
(
new
G4GammaConversion
(), particle);
231
}
232
233
}
else
if
(particleName ==
"e-"
) {
234
235
G4eIonisation
* eioni =
new
G4eIonisation
();
236
eioni->
SetStepFunction
(0.8, 1.0*
mm
);
237
238
G4eMultipleScattering
* msc =
new
G4eMultipleScattering
;
239
G4UrbanMscModel
* msc1 =
new
G4UrbanMscModel
();
240
G4WentzelVIModel
* msc2 =
new
G4WentzelVIModel
();
241
msc1->
SetHighEnergyLimit
(highEnergyLimit);
242
msc2->
SetLowEnergyLimit
(highEnergyLimit);
243
msc->
SetEmModel
(msc1);
244
msc->
SetEmModel
(msc2);
245
246
G4eCoulombScatteringModel
* ssm =
new
G4eCoulombScatteringModel
();
247
G4CoulombScattering
* ss =
new
G4CoulombScattering
();
248
ss->
SetEmModel
(ssm);
249
ss->
SetMinKinEnergy
(highEnergyLimit);
250
ssm->
SetLowEnergyLimit
(highEnergyLimit);
251
ssm->
SetActivationLowEnergyLimit
(highEnergyLimit);
252
253
G4eBremsstrahlung
* brem =
new
G4eBremsstrahlung
();
254
255
ph->
RegisterProcess
(msc, particle);
256
ph->
RegisterProcess
(eioni, particle);
257
ph->
RegisterProcess
(brem, particle);
258
ph->
RegisterProcess
(ss, particle);
259
260
}
else
if
(particleName ==
"e+"
) {
261
262
G4eIonisation
* eioni =
new
G4eIonisation
();
263
eioni->
SetStepFunction
(0.8, 1.0*
mm
);
264
265
G4eMultipleScattering
* msc =
new
G4eMultipleScattering
;
266
G4UrbanMscModel
* msc1 =
new
G4UrbanMscModel
();
267
G4WentzelVIModel
* msc2 =
new
G4WentzelVIModel
();
268
msc1->
SetHighEnergyLimit
(highEnergyLimit);
269
msc2->
SetLowEnergyLimit
(highEnergyLimit);
270
msc->
SetEmModel
(msc1);
271
msc->
SetEmModel
(msc2);
272
273
G4eCoulombScatteringModel
* ssm =
new
G4eCoulombScatteringModel
();
274
G4CoulombScattering
* ss =
new
G4CoulombScattering
();
275
ss->
SetEmModel
(ssm, 1);
276
ss->
SetMinKinEnergy
(highEnergyLimit);
277
ssm->
SetLowEnergyLimit
(highEnergyLimit);
278
ssm->
SetActivationLowEnergyLimit
(highEnergyLimit);
279
280
G4eBremsstrahlung
* brem =
new
G4eBremsstrahlung
();
281
282
ph->
RegisterProcess
(msc, particle);
283
ph->
RegisterProcess
(eioni, particle);
284
ph->
RegisterProcess
(brem, particle);
285
ph->
RegisterProcess
(
new
G4eplusAnnihilation
(), particle);
286
ph->
RegisterProcess
(ss, particle);
287
288
}
else
if
(particleName ==
"mu+"
||
289
particleName ==
"mu-"
) {
290
291
ph->
RegisterProcess
(mumsc, particle);
292
ph->
RegisterProcess
(
new
G4MuIonisation
(), particle);
293
ph->
RegisterProcess
(mub, particle);
294
ph->
RegisterProcess
(mup, particle);
295
ph->
RegisterProcess
(muss, particle);
296
297
}
else
if
(particleName ==
"alpha"
||
298
particleName ==
"He3"
) {
299
300
ph->
RegisterProcess
(
new
G4hMultipleScattering
(), particle);
301
ph->
RegisterProcess
(
new
G4ionIonisation
(), particle);
302
303
}
else
if
(particleName ==
"GenericIon"
) {
304
305
G4ionIonisation
* ionIoni =
new
G4ionIonisation
();
306
307
ph->
RegisterProcess
(hmsc, particle);
308
ph->
RegisterProcess
(ionIoni, particle);
309
310
}
else
if
(particleName ==
"pi+"
||
311
particleName ==
"pi-"
) {
312
313
ph->
RegisterProcess
(pimsc, particle);
314
ph->
RegisterProcess
(
new
G4hIonisation
(), particle);
315
ph->
RegisterProcess
(pib, particle);
316
ph->
RegisterProcess
(pip, particle);
317
ph->
RegisterProcess
(piss, particle);
318
319
}
else
if
(particleName ==
"kaon+"
||
320
particleName ==
"kaon-"
) {
321
322
ph->
RegisterProcess
(kmsc, particle);
323
ph->
RegisterProcess
(
new
G4hIonisation
(), particle);
324
ph->
RegisterProcess
(kb, particle);
325
ph->
RegisterProcess
(kp, particle);
326
ph->
RegisterProcess
(kss, particle);
327
328
}
else
if
(particleName ==
"proton"
||
329
particleName ==
"anti_proton"
) {
330
331
G4hMultipleScattering
* pmsc =
new
G4hMultipleScattering
();
332
pmsc->
SetEmModel
(
new
G4WentzelVIModel
());
333
334
ph->
RegisterProcess
(
new
G4hIonisation
(), particle);
335
ph->
RegisterProcess
(pb, particle);
336
ph->
RegisterProcess
(pp, particle);
337
ph->
RegisterProcess
(
new
G4CoulombScattering
(), particle);
338
339
}
else
if
(particleName ==
"B+"
||
340
particleName ==
"B-"
||
341
particleName ==
"D+"
||
342
particleName ==
"D-"
||
343
particleName ==
"Ds+"
||
344
particleName ==
"Ds-"
||
345
particleName ==
"anti_He3"
||
346
particleName ==
"anti_alpha"
||
347
particleName ==
"anti_deuteron"
||
348
particleName ==
"anti_lambda_c+"
||
349
particleName ==
"anti_omega-"
||
350
particleName ==
"anti_sigma_c+"
||
351
particleName ==
"anti_sigma_c++"
||
352
particleName ==
"anti_sigma+"
||
353
particleName ==
"anti_sigma-"
||
354
particleName ==
"anti_triton"
||
355
particleName ==
"anti_xi_c+"
||
356
particleName ==
"anti_xi-"
||
357
particleName ==
"deuteron"
||
358
particleName ==
"lambda_c+"
||
359
particleName ==
"omega-"
||
360
particleName ==
"sigma_c+"
||
361
particleName ==
"sigma_c++"
||
362
particleName ==
"sigma+"
||
363
particleName ==
"sigma-"
||
364
particleName ==
"tau+"
||
365
particleName ==
"tau-"
||
366
particleName ==
"triton"
||
367
particleName ==
"xi_c+"
||
368
particleName ==
"xi-"
) {
369
370
ph->
RegisterProcess
(hmsc, particle);
371
ph->
RegisterProcess
(
new
G4hIonisation
(), particle);
372
}
373
}
374
375
// Deexcitation
376
//
377
G4VAtomDeexcitation
* de =
new
G4UAtomicDeexcitation
();
378
G4LossTableManager::Instance
()->
SetAtomDeexcitation
(de);
379
380
G4EmModelActivator
mact(
GetPhysicsName
());
381
}
382
383
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
geant4
tree
geant4-10.6-release
source
physics_lists
constructors
electromagnetic
src
G4EmStandardPhysics_option2.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:27
using
1.8.2 with
ECCE GitHub integration