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
ElectromagneticPhysics.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file ElectromagneticPhysics.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
//
28
//
29
//
30
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
31
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32
33
#include "ElectromagneticPhysics.hh"
34
35
#include "
G4BuilderType.hh
"
36
#include "
G4ParticleDefinition.hh
"
37
#include "
G4ProcessManager.hh
"
38
#include "
G4PhysicsListHelper.hh
"
39
40
#include "
G4ComptonScattering.hh
"
41
#include "
G4GammaConversion.hh
"
42
#include "
G4PhotoElectricEffect.hh
"
43
44
#include "
G4eMultipleScattering.hh
"
45
#include "
G4eIonisation.hh
"
46
#include "
G4eBremsstrahlung.hh
"
47
#include "
G4eplusAnnihilation.hh
"
48
49
#include "
G4MuMultipleScattering.hh
"
50
#include "
G4MuIonisation.hh
"
51
#include "
G4MuBremsstrahlung.hh
"
52
#include "
G4MuPairProduction.hh
"
53
54
#include "
G4hMultipleScattering.hh
"
55
#include "
G4hIonisation.hh
"
56
#include "
G4hBremsstrahlung.hh
"
57
#include "
G4hPairProduction.hh
"
58
59
#include "
G4ionIonisation.hh
"
60
#include "
G4IonParametrisedLossModel.hh
"
61
#include "
G4NuclearStopping.hh
"
62
63
#include "
G4SystemOfUnits.hh
"
64
65
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
66
67
ElectromagneticPhysics::ElectromagneticPhysics
(
const
G4String
&
name
)
68
:
G4VPhysicsConstructor
(name)
69
{
70
SetPhysicsType
(
bElectromagnetic
);
71
72
G4EmParameters
* param =
G4EmParameters::Instance
();
73
param->
SetDefaults
();
74
param->
SetVerbose
(0);
75
param->
SetStepFunction
(1., 1*
mm
);
//default= 0.1, 100*um
76
param->
SetStepFunctionMuHad
(1., 1*
mm
);
77
}
78
79
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
80
81
ElectromagneticPhysics::~ElectromagneticPhysics
()
82
{}
83
84
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
85
86
void
ElectromagneticPhysics::ConstructProcess
()
87
{
88
G4PhysicsListHelper
* ph =
G4PhysicsListHelper::GetPhysicsListHelper
();
89
90
// Add standard EM Processes
91
//
92
auto
particleIterator
=
GetParticleIterator
();
93
particleIterator
->reset();
94
while
( (*
particleIterator
)() ){
95
G4ParticleDefinition
*
particle
=
particleIterator
->value();
96
G4String
particleName = particle->
GetParticleName
();
97
98
if
(particleName ==
"gamma"
) {
99
100
ph->
RegisterProcess
(
new
G4PhotoElectricEffect
, particle);
101
ph->
RegisterProcess
(
new
G4ComptonScattering
, particle);
102
ph->
RegisterProcess
(
new
G4GammaConversion
, particle);
103
104
}
else
if
(particleName ==
"e-"
) {
105
106
ph->
RegisterProcess
(
new
G4eMultipleScattering
(), particle);
107
ph->
RegisterProcess
(
new
G4eIonisation
, particle);
108
ph->
RegisterProcess
(
new
G4eBremsstrahlung
(), particle);
109
110
}
else
if
(particleName ==
"e+"
) {
111
112
ph->
RegisterProcess
(
new
G4eMultipleScattering
(), particle);
113
ph->
RegisterProcess
(
new
G4eIonisation
, particle);
114
ph->
RegisterProcess
(
new
G4eBremsstrahlung
(), particle);
115
ph->
RegisterProcess
(
new
G4eplusAnnihilation
(), particle);
116
117
}
else
if
(particleName ==
"mu+"
||
118
particleName ==
"mu-"
) {
119
120
ph->
RegisterProcess
(
new
G4MuMultipleScattering
(), particle);
121
ph->
RegisterProcess
(
new
G4MuIonisation
, particle);
122
ph->
RegisterProcess
(
new
G4MuBremsstrahlung
(), particle);
123
ph->
RegisterProcess
(
new
G4MuPairProduction
(), particle);
124
125
}
else
if
( particleName ==
"proton"
||
126
particleName ==
"pi-"
||
127
particleName ==
"pi+"
) {
128
129
ph->
RegisterProcess
(
new
G4hMultipleScattering
(), particle);
130
ph->
RegisterProcess
(
new
G4hIonisation
, particle);
131
132
}
else
if
( particleName ==
"alpha"
||
133
particleName ==
"He3"
) {
134
135
ph->
RegisterProcess
(
new
G4hMultipleScattering
(), particle);
136
ph->
RegisterProcess
(
new
G4ionIonisation
, particle);
137
ph->
RegisterProcess
(
new
G4NuclearStopping
(), particle);
138
139
}
else
if
( particleName ==
"GenericIon"
) {
140
141
ph->
RegisterProcess
(
new
G4hMultipleScattering
(), particle);
142
G4ionIonisation
* ionIoni =
new
G4ionIonisation
();
143
ionIoni->
SetEmModel
(
new
G4IonParametrisedLossModel
());
144
ph->
RegisterProcess
(ionIoni, particle);
145
ph->
RegisterProcess
(
new
G4NuclearStopping
(), particle);
146
147
}
else
if
((!particle->
IsShortLived
()) &&
148
(particle->
GetPDGCharge
() != 0.0) &&
149
(particle->
GetParticleName
() !=
"chargedgeantino"
)) {
150
151
//all others charged particles except geantino
152
ph->
RegisterProcess
(
new
G4hMultipleScattering
(), particle);
153
ph->
RegisterProcess
(
new
G4hIonisation
(), particle);
154
}
155
}
156
}
157
158
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
159
geant4
tree
geant4-10.6-release
examples
extended
hadronic
Hadr06
src
ElectromagneticPhysics.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:07
using
1.8.2 with
ECCE GitHub integration