ECCE @ EIC Software
 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 
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"
58 #include "G4KleinNishinaModel.hh"
59 #include "G4RayleighScattering.hh"
60 
61 #include "G4eMultipleScattering.hh"
62 #include "G4hMultipleScattering.hh"
64 #include "G4CoulombScattering.hh"
66 #include "G4UrbanMscModel.hh"
67 #include "G4WentzelVIModel.hh"
68 
69 #include "G4eIonisation.hh"
70 #include "G4eBremsstrahlung.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 
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
117 //
119 
120 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
121 
123  const G4String&)
124  : G4VPhysicsConstructor("G4EmStandard_opt2"), verbose(ver)
125 {
127  param->SetDefaults();
128  param->SetVerbose(verbose);
129  param->SetApplyCuts(false);
130  param->SetMscRangeFactor(0.2);
131  param->SetLateralDisplacement(false);
134 }
135 
136 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
137 
139 {}
140 
141 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
142 
144 {
145  // gamma
146  G4Gamma::Gamma();
147 
148  // leptons
153 
154  // mesons
159 
160  // barions
163 
164  // ions
167  G4He3::He3();
168  G4Alpha::Alpha();
170 }
171 
172 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
173 
175 {
176  if(verbose > 1) {
177  G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
178  }
181 
182  // muon & hadron bremsstrahlung and pair production
191 
192  // muon & hadron multiple scattering
194  mumsc->SetEmModel(new G4WentzelVIModel());
196 
198  pimsc->SetEmModel(new G4WentzelVIModel());
200 
202  kmsc->SetEmModel(new G4WentzelVIModel());
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
212  for(const auto& particleName : partList.PartNames()) {
213  G4ParticleDefinition* particle = table->FindParticle(particleName);
214  if (!particle) { continue; }
215  if (particleName == "gamma") {
216 
218 
219  if(G4EmParameters::Instance()->GeneralProcessActive()) {
221  sp->AddEmProcess(pee);
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 
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 
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 
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 
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 
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  //
379 
381 }
382 
383 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......