Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4EmBuilder.cc
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// Geant4 class G4EmBuilder
28//
29// Author V.Ivanchenko 22.05.2020
30//
31
32#include "G4EmBuilder.hh"
33
34#include "G4SystemOfUnits.hh"
36#include "G4EmParameters.hh"
38
42#include "G4WentzelVIModel.hh"
43
48
49#include "G4MuIonisation.hh"
50#include "G4MuBremsstrahlung.hh"
51#include "G4MuPairProduction.hh"
52#include "G4hBremsstrahlung.hh"
53#include "G4hPairProduction.hh"
54
55#include "G4hIonisation.hh"
56#include "G4ionIonisation.hh"
57#include "G4alphaIonisation.hh"
58#include "G4NuclearStopping.hh"
59
63
64#include "G4ParticleTable.hh"
65#include "G4Gamma.hh"
66#include "G4Electron.hh"
67#include "G4Positron.hh"
68
69#include "G4MuonPlus.hh"
70#include "G4MuonMinus.hh"
71#include "G4PionPlus.hh"
72#include "G4PionMinus.hh"
73#include "G4KaonPlus.hh"
74#include "G4KaonMinus.hh"
75#include "G4Proton.hh"
76#include "G4AntiProton.hh"
77
78#include "G4Deuteron.hh"
79#include "G4Triton.hh"
80#include "G4He3.hh"
81#include "G4Alpha.hh"
82#include "G4GenericIon.hh"
83
85#include "G4HadParticles.hh"
87#include "G4LossTableManager.hh"
89
91 const std::vector<G4int>& partList)
92{
95
96 for( auto & pdg : partList ) {
97 auto part = table->FindParticle( pdg );
98 if ( part == nullptr || part->GetPDGCharge() == 0.0 ) { continue; }
99 ph->RegisterProcess(hmsc, part);
100 ph->RegisterProcess(new G4hIonisation(), part);
101 }
102}
103
105 G4NuclearStopping* nucStopping)
106{
108
110 ph->RegisterProcess(hmsc, part);
111 ph->RegisterProcess(new G4hIonisation(), part);
112
113 part = G4Triton::Triton();
114 ph->RegisterProcess(hmsc, part);
115 ph->RegisterProcess(new G4hIonisation(), part);
116
117 part = G4He3::He3();
118 ph->RegisterProcess(new G4hMultipleScattering(), part);
119 ph->RegisterProcess(new G4ionIonisation(), part);
120 if( nucStopping != nullptr ) {
121 ph->RegisterProcess(nucStopping, part);
122 }
123
124 part = G4Alpha::Alpha();
125 ph->RegisterProcess(new G4hMultipleScattering(), part);
126 ph->RegisterProcess(new G4ionIonisation(), part);
127 if( nucStopping != nullptr ) {
128 ph->RegisterProcess(nucStopping, part);
129 }
130}
131
134 G4bool isHEP, G4bool isProton,
135 G4bool isWVI)
136{
138
139 G4hBremsstrahlung* brem = ( isHEP ) ? new G4hBremsstrahlung() : nullptr;
140 G4hPairProduction* pair = ( isHEP ) ? new G4hPairProduction() : nullptr;
141
143 if(isWVI) { msc->SetEmModel(new G4WentzelVIModel()); }
144 G4CoulombScattering* ss = ( isWVI ) ? new G4CoulombScattering() : nullptr;
145
146 ph->RegisterProcess(msc, part1);
147 ph->RegisterProcess(new G4hIonisation(), part1);
148 if( isHEP ) {
149 ph->RegisterProcess(brem, part1);
150 ph->RegisterProcess(pair, part1);
151 }
152 if( isWVI ) { ph->RegisterProcess(ss, part1); }
153
154 if( isProton ) {
155 msc = new G4hMultipleScattering();
156 if(isWVI) {
157 msc->SetEmModel(new G4WentzelVIModel());
158 ss = new G4CoulombScattering();
159 }
160 }
161 ph->RegisterProcess(msc, part2);
162 ph->RegisterProcess(new G4hIonisation(), part2);
163 if( isHEP ) {
164 ph->RegisterProcess(brem, part2);
165 ph->RegisterProcess(pair, part2);
166 }
167 if( isWVI ) { ph->RegisterProcess(ss, part2); }
168}
169
171 G4NuclearStopping* nucStopping,
172 G4bool isWVI)
173{
177 G4bool isHEP = ( param->MaxKinEnergy() > hpar->EnergyThresholdForHeavyHadrons() );
178
179 // muon bremsstrahlung and pair production
180 G4MuBremsstrahlung* mub = ( isHEP ) ? new G4MuBremsstrahlung() : nullptr;
181 G4MuPairProduction* mup = ( isHEP ) ? new G4MuPairProduction() : nullptr;
182
183 // muon multiple and single scattering
185 if(isWVI) { mumsc->SetEmModel(new G4WentzelVIModel()); }
186 G4CoulombScattering* muss = ( isWVI ) ? new G4CoulombScattering() : nullptr;
187
188 // Add standard EM Processes
189 // mu+-
191 ph->RegisterProcess(mumsc, part);
192 ph->RegisterProcess(new G4MuIonisation(), part);
193 if( isHEP ) {
194 ph->RegisterProcess(mub, part);
195 ph->RegisterProcess(mup, part);
196 }
197 if( isWVI ) { ph->RegisterProcess(muss, part); }
198
199 part = G4MuonMinus::MuonMinus();
200 ph->RegisterProcess(mumsc, part);
201 ph->RegisterProcess(new G4MuIonisation(), part);
202 if( isHEP ) {
203 ph->RegisterProcess(mub, part);
204 ph->RegisterProcess(mup, part);
205 }
206 if( isWVI ) { ph->RegisterProcess(muss, part); }
207
208 // pi+-
210
211 // K+-
213
214 // p, pbar
216 if( nucStopping != nullptr ) {
217 ph->RegisterProcess(nucStopping, G4Proton::Proton());
218 }
219
220 // ions
221 ConstructIonEmPhysics(hmsc, nucStopping);
222
223 // hyperons and anti particles
224 if( isHEP ) {
226
227 // b- and c- charged particles
228 if( hpar->EnableBCParticles() ) {
230 }
231 }
232}
233
235{
236 // gamma
238 // leptons
243 // mesons
248 // barions
251 // ions
254 G4He3::He3();
257}
258
260{
263 if(!ad) {
264 ad = new G4UAtomicDeexcitation();
265 man->SetAtomDeexcitation(ad);
266 }
267}
bool G4bool
Definition: G4Types.hh:86
static G4Alpha * Alpha()
Definition: G4Alpha.cc:88
static G4AntiProton * AntiProton()
Definition: G4AntiProton.cc:92
static G4Deuteron * Deuteron()
Definition: G4Deuteron.cc:93
static G4Electron * Electron()
Definition: G4Electron.cc:93
static void ConstructCharged(G4hMultipleScattering *hmsc, G4NuclearStopping *nucStopping, G4bool isWVI=true)
Definition: G4EmBuilder.cc:170
static void ConstructMinimalEmSet()
Definition: G4EmBuilder.cc:234
static void ConstructLightHadrons(G4ParticleDefinition *part1, G4ParticleDefinition *part2, G4bool isHEP, G4bool isProton, G4bool isWVI)
Definition: G4EmBuilder.cc:132
static void ConstructIonEmPhysics(G4hMultipleScattering *hmsc, G4NuclearStopping *nucStopping)
Definition: G4EmBuilder.cc:104
static void PrepareEMPhysics()
Definition: G4EmBuilder.cc:259
static void ConstructBasicEmPhysics(G4hMultipleScattering *hmsc, const std::vector< G4int > &listHadrons)
Definition: G4EmBuilder.cc:90
static G4EmParameters * Instance()
G4double MaxKinEnergy() const
static G4Gamma * Gamma()
Definition: G4Gamma.cc:85
static G4GenericIon * GenericIonDefinition()
Definition: G4GenericIon.cc:87
static const std::vector< G4int > & GetBCChargedHadrons()
static const std::vector< G4int > & GetHeavyChargedParticles()
static G4HadronicParameters * Instance()
G4bool EnableBCParticles() const
G4double EnergyThresholdForHeavyHadrons() const
static G4He3 * He3()
Definition: G4He3.cc:93
static G4KaonMinus * KaonMinus()
Definition: G4KaonMinus.cc:112
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:112
void SetAtomDeexcitation(G4VAtomDeexcitation *)
static G4LossTableManager * Instance()
G4VAtomDeexcitation * AtomDeexcitation()
static G4MuonMinus * MuonMinus()
Definition: G4MuonMinus.cc:99
static G4MuonPlus * MuonPlus()
Definition: G4MuonPlus.cc:98
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
G4bool RegisterProcess(G4VProcess *process, G4ParticleDefinition *particle)
static G4PhysicsListHelper * GetPhysicsListHelper()
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:97
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:97
static G4Positron * Positron()
Definition: G4Positron.cc:93
static G4Proton * Proton()
Definition: G4Proton.cc:92
static G4Triton * Triton()
Definition: G4Triton.cc:94
void SetEmModel(G4VMscModel *, size_t index=0)