Geant4-11
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 "G4NuclearStopping.hh"
58
62
63#include "G4ParticleTable.hh"
64#include "G4Gamma.hh"
65#include "G4Electron.hh"
66#include "G4Positron.hh"
67
68#include "G4ChargedGeantino.hh"
69#include "G4Geantino.hh"
70
71#include "G4MuonPlus.hh"
72#include "G4MuonMinus.hh"
73#include "G4PionPlus.hh"
74#include "G4PionMinus.hh"
75#include "G4KaonPlus.hh"
76#include "G4KaonMinus.hh"
77#include "G4Proton.hh"
78#include "G4AntiProton.hh"
79
80#include "G4Deuteron.hh"
81#include "G4Triton.hh"
82#include "G4He3.hh"
83#include "G4Alpha.hh"
84#include "G4GenericIon.hh"
85
87#include "G4HadParticles.hh"
89#include "G4LossTableManager.hh"
91
93 const std::vector<G4int>& partList)
94{
97
98 for( auto & pdg : partList ) {
99 auto part = table->FindParticle( pdg );
100 if ( part == nullptr || part->GetPDGCharge() == 0.0 ) { continue; }
101 ph->RegisterProcess(hmsc, part);
102 ph->RegisterProcess(new G4hIonisation(), part);
103 }
104}
105
107 G4NuclearStopping* nucStopping)
108{
110
112 ph->RegisterProcess(hmsc, part);
113 ph->RegisterProcess(new G4hIonisation(), part);
114
115 part = G4Triton::Triton();
116 ph->RegisterProcess(hmsc, part);
117 ph->RegisterProcess(new G4hIonisation(), part);
118
119 part = G4Alpha::Alpha();
120 ph->RegisterProcess(new G4hMultipleScattering(), part);
121 ph->RegisterProcess(new G4ionIonisation(), part);
122 if( nucStopping != nullptr ) {
123 ph->RegisterProcess(nucStopping, part);
124 }
125
126 part = G4He3::He3();
127 ph->RegisterProcess(new G4hMultipleScattering(), part);
128 ph->RegisterProcess(new G4ionIonisation(), part);
129 if( nucStopping != nullptr ) {
130 ph->RegisterProcess(nucStopping, part);
131 }
132}
133
135{
137
139 ph->RegisterProcess(new G4hIonisation(), part);
140 ph->RegisterProcess(new G4CoulombScattering(), part);
141
142 part = G4Triton::Triton();
143 ph->RegisterProcess(new G4hIonisation(), part);
144 ph->RegisterProcess(new G4CoulombScattering(), part);
145
146 part = G4Alpha::Alpha();
147 ph->RegisterProcess(new G4ionIonisation(), part);
148 ph->RegisterProcess(new G4CoulombScattering(), part);
149
150 part = G4He3::He3();
151 ph->RegisterProcess(new G4ionIonisation(), part);
152 ph->RegisterProcess(new G4CoulombScattering(), part);
153}
154
157 G4bool isHEP, G4bool isProton,
158 G4bool isWVI)
159{
161
163 if(isWVI) { msc->SetEmModel(new G4WentzelVIModel()); }
164 G4CoulombScattering* ss = ( isWVI ) ? new G4CoulombScattering() : nullptr;
165
166 ph->RegisterProcess(msc, part1);
167 ph->RegisterProcess(new G4hIonisation(), part1);
168
169 G4hBremsstrahlung* brem = ( isHEP ) ? new G4hBremsstrahlung() : nullptr;
170 G4hPairProduction* pair = ( isHEP ) ? new G4hPairProduction() : nullptr;
171
172 if( isHEP ) {
173 ph->RegisterProcess(brem, part1);
174 ph->RegisterProcess(pair, part1);
175 }
176 if( isWVI ) { ph->RegisterProcess(ss, part1); }
177
178 if( isProton ) {
179 msc = new G4hMultipleScattering();
180 if(isWVI) {
181 msc->SetEmModel(new G4WentzelVIModel());
182 ss = new G4CoulombScattering();
183 }
184 }
185 ph->RegisterProcess(msc, part2);
186 ph->RegisterProcess(new G4hIonisation(), part2);
187 if( isHEP ) {
188 ph->RegisterProcess(brem, part2);
189 ph->RegisterProcess(pair, part2);
190 }
191 if( isWVI ) { ph->RegisterProcess(ss, part2); }
192}
193
196 G4bool isHEP)
197{
199
200 ph->RegisterProcess(new G4hIonisation(), part1);
201
202 G4hBremsstrahlung* brem = ( isHEP ) ? new G4hBremsstrahlung() : nullptr;
203 G4hPairProduction* pair = ( isHEP ) ? new G4hPairProduction() : nullptr;
204
205 if( isHEP ) {
206 ph->RegisterProcess(brem, part1);
207 ph->RegisterProcess(pair, part1);
208 }
209 ph->RegisterProcess(new G4CoulombScattering(), part1);
210
211 ph->RegisterProcess(new G4hIonisation(), part2);
212 if( isHEP ) {
213 ph->RegisterProcess(brem, part2);
214 ph->RegisterProcess(pair, part2);
215 }
216 ph->RegisterProcess(new G4CoulombScattering(), part2);
217}
218
220 G4NuclearStopping* nucStopping,
221 G4bool isWVI)
222{
226 G4bool isHEP = ( param->MaxKinEnergy() > hpar->EnergyThresholdForHeavyHadrons() );
227
228 // muon multiple and single scattering
230 if(isWVI) { mumsc->SetEmModel(new G4WentzelVIModel()); }
231 G4CoulombScattering* muss = ( isWVI ) ? new G4CoulombScattering() : nullptr;
232
233 // Add standard EM Processes
234 // mu+-
236 ph->RegisterProcess(mumsc, part);
237 ph->RegisterProcess(new G4MuIonisation(), part);
238
239 // muon bremsstrahlung and pair production
240 G4MuBremsstrahlung* mub = ( isHEP ) ? new G4MuBremsstrahlung() : nullptr;
241 G4MuPairProduction* mup = ( isHEP ) ? new G4MuPairProduction() : nullptr;
242
243 if( isHEP ) {
244 ph->RegisterProcess(mub, part);
245 ph->RegisterProcess(mup, part);
246 }
247 if( isWVI ) { ph->RegisterProcess(muss, part); }
248
249 part = G4MuonMinus::MuonMinus();
250 ph->RegisterProcess(mumsc, part);
251 ph->RegisterProcess(new G4MuIonisation(), part);
252 if( isHEP ) {
253 ph->RegisterProcess(mub, part);
254 ph->RegisterProcess(mup, part);
255 }
256 if( isWVI ) { ph->RegisterProcess(muss, part); }
257
258 // pi+-
260
261 // K+-
263
264 // p, pbar
266 if( nucStopping != nullptr ) {
267 ph->RegisterProcess(nucStopping, G4Proton::Proton());
268 }
269
270 // ions
271 ConstructIonEmPhysics(hmsc, nucStopping);
272
273 // hyperons and anti particles
274 if( isHEP ) {
276
277 // b- and c- charged particles
278 if( hpar->EnableBCParticles() ) {
280 }
281 // light hyper-nuclei
282 if( hpar->EnableHyperNuclei() ) {
284 }
285 }
286}
287
289{
293 G4bool isHEP = ( param->MaxKinEnergy() > hpar->EnergyThresholdForHeavyHadrons() );
294
295 // muon multiple and single scattering
297
298 // Add standard EM Processes
299 // mu+-
301 ph->RegisterProcess(new G4MuIonisation(), part);
302
303 // muon bremsstrahlung and pair production
304 G4MuBremsstrahlung* mub = ( isHEP ) ? new G4MuBremsstrahlung() : nullptr;
305 G4MuPairProduction* mup = ( isHEP ) ? new G4MuPairProduction() : nullptr;
306
307 if( isHEP ) {
308 ph->RegisterProcess(mub, part);
309 ph->RegisterProcess(mup, part);
310 }
311 ph->RegisterProcess(muss, part);
312
313 part = G4MuonMinus::MuonMinus();
314 ph->RegisterProcess(new G4MuIonisation(), part);
315 if( isHEP ) {
316 ph->RegisterProcess(mub, part);
317 ph->RegisterProcess(mup, part);
318 }
319 ph->RegisterProcess(muss, part);
320
321 // pi+-
323
324 // K+-
326
327 // p, pbar
329 // ions
331
332 // hyperons and anti particles
333 if( isHEP ) {
335
336 // b- and c- charged particles
337 if( hpar->EnableBCParticles() ) {
339 }
340 // light hyper-nuclei
341 if( hpar->EnableHyperNuclei() ) {
343 }
344 }
345}
346
348{
349 // pseudo-particles
352 // gamma
354 // leptons
359 // mesons
364 // barions
367 // ions
370 G4He3::He3();
373}
374
376{
379 if(!ad) {
380 ad = new G4UAtomicDeexcitation();
381 man->SetAtomDeexcitation(ad);
382 }
383}
bool G4bool
Definition: G4Types.hh:86
static G4Alpha * Alpha()
Definition: G4Alpha.cc:88
static G4AntiProton * AntiProton()
Definition: G4AntiProton.cc:92
static G4ChargedGeantino * ChargedGeantinoDefinition()
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:219
static void ConstructChargedSS(G4hMultipleScattering *hmsc)
Definition: G4EmBuilder.cc:288
static void ConstructMinimalEmSet()
Definition: G4EmBuilder.cc:347
static void ConstructLightHadrons(G4ParticleDefinition *part1, G4ParticleDefinition *part2, G4bool isHEP, G4bool isProton, G4bool isWVI)
Definition: G4EmBuilder.cc:155
static void ConstructIonEmPhysics(G4hMultipleScattering *hmsc, G4NuclearStopping *nucStopping)
Definition: G4EmBuilder.cc:106
static void ConstructIonEmPhysicsSS()
Definition: G4EmBuilder.cc:134
static void PrepareEMPhysics()
Definition: G4EmBuilder.cc:375
static void ConstructLightHadronsSS(G4ParticleDefinition *part1, G4ParticleDefinition *part2, G4bool isHEP)
Definition: G4EmBuilder.cc:194
static void ConstructBasicEmPhysics(G4hMultipleScattering *hmsc, const std::vector< G4int > &listHadrons)
Definition: G4EmBuilder.cc:92
static G4EmParameters * Instance()
G4double MaxKinEnergy() const
static G4Gamma * Gamma()
Definition: G4Gamma.cc:85
static G4Geantino * GeantinoDefinition()
Definition: G4Geantino.cc:81
static G4GenericIon * GenericIonDefinition()
Definition: G4GenericIon.cc:87
static const std::vector< G4int > & GetBCChargedHadrons()
static const std::vector< G4int > & GetHeavyChargedParticles()
static const std::vector< G4int > & GetChargedHyperNuclei()
static G4HadronicParameters * Instance()
G4bool EnableHyperNuclei() const
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:93
void SetEmModel(G4VMscModel *, G4int idx=0)