ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4EmDNAPhysics_stationary_option2.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4EmDNAPhysics_stationary_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 
27 
28 #include "G4SystemOfUnits.hh"
29 
31 
32 // *** Processes and models for Geant4-DNA
33 
34 #include "G4DNAElastic.hh"
37 #include "G4DNAIonElasticModel.hh"
38 
39 #include "G4DNAExcitation.hh"
40 #include "G4DNAAttachment.hh"
41 #include "G4DNAVibExcitation.hh"
42 #include "G4DNAIonisation.hh"
43 #include "G4DNAChargeDecrease.hh"
44 #include "G4DNAChargeIncrease.hh"
45 
46 // particles
47 
48 #include "G4Electron.hh"
49 #include "G4Proton.hh"
50 #include "G4GenericIon.hh"
51 
52 // Warning : the following is needed in order to use EM Physics builders
53 // e+
54 #include "G4Positron.hh"
55 #include "G4eMultipleScattering.hh"
56 #include "G4eIonisation.hh"
57 #include "G4eBremsstrahlung.hh"
58 #include "G4eplusAnnihilation.hh"
59 // gamma
60 #include "G4Gamma.hh"
61 #include "G4PhotoElectricEffect.hh"
63 #include "G4ComptonScattering.hh"
65 #include "G4GammaConversion.hh"
67 #include "G4RayleighScattering.hh"
69 
70 #include "G4EmParameters.hh"
71 // end of warning
72 
73 #include "G4LossTableManager.hh"
74 #include "G4UAtomicDeexcitation.hh"
75 #include "G4PhysicsListHelper.hh"
76 #include "G4BuilderType.hh"
77 
78 // factory
80 //
82 
83 
84 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
85 
87  : G4VPhysicsConstructor("G4EmDNAPhysics_stationary_option2"), verbose(ver)
88 {
90  param->SetDefaults();
91  param->SetFluo(true);
92  param->SetAuger(true);
93  param->SetAugerCascade(true);
94  param->SetDeexcitationIgnoreCut(true);
95  param->ActivateDNA();
96 
98 }
99 
100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
101 
103 const G4String&)
104 : G4VPhysicsConstructor("G4EmDNAPhysics_stationary_option2"), verbose(ver)
105 {
107  param->SetDefaults();
108  param->SetFluo(true);
109  param->SetAuger(true);
110  param->SetAugerCascade(true);
111  param->SetDeexcitationIgnoreCut(true);
112 
114 }
115 
116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
117 
119 {}
120 
121 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
122 
124 {
125 // bosons
126  G4Gamma::Gamma();
127 
128 // leptons
131 
132 // baryons
134 
136 
137  G4DNAGenericIonsManager * genericIonsManager;
138  genericIonsManager=G4DNAGenericIonsManager::Instance();
139  genericIonsManager->GetIon("alpha++");
140  genericIonsManager->GetIon("alpha+");
141  genericIonsManager->GetIon("helium");
142  genericIonsManager->GetIon("hydrogen");
143 
144 }
145 
146 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
147 
149 {
150  if(verbose > 1) {
151  G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
152  }
154 
155  auto myParticleIterator=GetParticleIterator();
156  myParticleIterator->reset();
157  while( (*myParticleIterator)() )
158  {
159  G4ParticleDefinition* particle = myParticleIterator->value();
160  G4String particleName = particle->GetParticleName();
161 
162  if (particleName == "e-") {
163 
164  // *** Elastic scattering (two alternative models available) ***
165 
166  G4DNAElastic* theDNAElasticProcess = new G4DNAElastic("e-_G4DNAElastic");
167  theDNAElasticProcess->SetEmModel(new G4DNAChampionElasticModel());
168 
169  // or alternative model
170  //theDNAElasticProcess
171  //->SetEmModel(new G4DNAScreenedRutherfordElasticModel());
172 
173  ph->RegisterProcess(theDNAElasticProcess, particle);
174 
175  // *** Excitation ***
176 
177  G4DNAExcitation* theDNAExcitationProcess =
178  new G4DNAExcitation("e-_G4DNAExcitation");
179  theDNAExcitationProcess->SetEmModel(new G4DNABornExcitationModel());
180  ((G4DNABornExcitationModel*)(theDNAExcitationProcess->EmModel()))
181  ->SelectStationary(true);
182  ph->RegisterProcess(theDNAExcitationProcess, particle);
183 
184  // *** Ionisation ***
185 
186  G4DNAIonisation* theDNAIonisationProcess =
187  new G4DNAIonisation("e-_G4DNAIonisation");
188  theDNAIonisationProcess->SetEmModel(new G4DNABornIonisationModel());
189  ((G4DNABornIonisationModel*)(theDNAIonisationProcess->EmModel()))
190  ->SelectStationary(true);
191  //
192  ((G4DNABornIonisationModel*)(theDNAIonisationProcess->EmModel()))
193  ->SelectFasterComputation(true);
194  //
195  ph->RegisterProcess(theDNAIonisationProcess, particle);
196 
197  // *** Vibrational excitation ***
198 
199  G4DNAVibExcitation* theDNAVibExcitationProcess =
200  new G4DNAVibExcitation("e-_G4DNAVibExcitation");
201  theDNAVibExcitationProcess->SetEmModel(new G4DNASancheExcitationModel());
202  ((G4DNASancheExcitationModel*)(theDNAVibExcitationProcess->EmModel()))
203  ->SelectStationary(true);
204  ph->RegisterProcess(theDNAVibExcitationProcess, particle);
205 
206  // *** Attachment ***
207 
208  G4DNAAttachment* theDNAAttachmentProcess =
209  new G4DNAAttachment("e-_G4DNAAttachment");
210  theDNAAttachmentProcess->SetEmModel(new G4DNAMeltonAttachmentModel());
211  ((G4DNAMeltonAttachmentModel*)(theDNAAttachmentProcess->EmModel()))
212  ->SelectStationary(true);
213  ph->RegisterProcess(theDNAAttachmentProcess, particle);
214 
215  } else if ( particleName == "proton" ) {
216 
217  // *** Elastic ***
218 
219  G4DNAElastic* theDNAElasticProcess =
220  new G4DNAElastic("proton_G4DNAElastic");
221  theDNAElasticProcess->SetEmModel(new G4DNAIonElasticModel());
222  ((G4DNAIonElasticModel*)(theDNAElasticProcess->EmModel()))
223  ->SelectStationary(true);
224  ph->RegisterProcess(theDNAElasticProcess, particle);
225 
226  // *** Excitation ***
227 
228  G4DNAExcitation* theDNAExcitationProcess =
229  new G4DNAExcitation("proton_G4DNAExcitation");
230 
231  theDNAExcitationProcess->SetEmModel
233  theDNAExcitationProcess->SetEmModel
234  (new G4DNABornExcitationModel());
235 
236  ((G4DNAMillerGreenExcitationModel*)(theDNAExcitationProcess->EmModel()))
237  ->SetLowEnergyLimit(10*eV);
238  ((G4DNAMillerGreenExcitationModel*)(theDNAExcitationProcess->EmModel()))
239  ->SetHighEnergyLimit(500*keV);
240  ((G4DNAMillerGreenExcitationModel*)(theDNAExcitationProcess->EmModel()))
241  ->SelectStationary(true);
242 
243  ((G4DNABornExcitationModel*)(theDNAExcitationProcess->EmModel(1)))
244  ->SetLowEnergyLimit(500*keV);
245  ((G4DNABornExcitationModel*)(theDNAExcitationProcess->EmModel(1)))
246  ->SetHighEnergyLimit(100*MeV);
247  ((G4DNABornExcitationModel*)(theDNAExcitationProcess->EmModel(1)))
248  ->SelectStationary(true);
249 
250  ph->RegisterProcess(theDNAExcitationProcess, particle);
251 
252  // *** Ionisation ***
253 
254  G4DNAIonisation* theDNAIonisationProcess =
255  new G4DNAIonisation("proton_G4DNAIonisation");
256 
257  theDNAIonisationProcess->SetEmModel(
259  theDNAIonisationProcess->SetEmModel(
261 
263  (theDNAIonisationProcess->EmModel()))->SetLowEnergyLimit(0*eV);
265  (theDNAIonisationProcess->EmModel()))->SetHighEnergyLimit(500*keV);
267  (theDNAIonisationProcess->EmModel()))->SelectStationary(true);
268 
270  (theDNAIonisationProcess->EmModel(1)))->SetLowEnergyLimit(500*keV);
272  (theDNAIonisationProcess->EmModel(1)))->SetHighEnergyLimit(100*MeV);
274  (theDNAIonisationProcess->EmModel(1)))->SelectStationary(true);
275  //
277  (theDNAIonisationProcess->EmModel(1)))->SelectFasterComputation(true);
278  //
279 
280  ph->RegisterProcess(theDNAIonisationProcess, particle);
281 
282  // *** Charge decrease ***
283 
284  G4DNAChargeDecrease* theDNAChargeDecreaseProcess =
285  new G4DNAChargeDecrease("proton_G4DNAChargeDecrease");
286  theDNAChargeDecreaseProcess->SetEmModel(
289  (theDNAChargeDecreaseProcess->EmModel()))->SelectStationary(true);
290  ph->RegisterProcess(theDNAChargeDecreaseProcess, particle);
291 
292  } else if ( particleName == "hydrogen" ) {
293 
294  // *** Elastic ***
295 
296  G4DNAElastic* theDNAElasticProcess =
297  new G4DNAElastic("hydrogen_G4DNAElastic");
298  theDNAElasticProcess->SetEmModel(new G4DNAIonElasticModel());
299  ((G4DNAIonElasticModel*)(theDNAElasticProcess->EmModel()))
300  ->SelectStationary(true);
301  ph->RegisterProcess(theDNAElasticProcess, particle);
302 
303  // *** Excitation ***
304 
305  G4DNAExcitation* theDNAExcitationProcess =
306  new G4DNAExcitation("hydrogen_G4DNAExcitation");
307  theDNAExcitationProcess->SetEmModel(
309  ((G4DNAMillerGreenExcitationModel*)(theDNAExcitationProcess->EmModel()))
310  ->SelectStationary(true);
311  ph->RegisterProcess(theDNAExcitationProcess, particle);
312 
313  // *** Ionisation ***
314 
315  G4DNAIonisation* theDNAIonisationProcess =
316  new G4DNAIonisation("hydrogen_G4DNAIonisation");
317  theDNAIonisationProcess->SetEmModel(
320  (theDNAIonisationProcess->EmModel()))->SelectStationary(true);
321  ph->RegisterProcess(theDNAIonisationProcess, particle);
322 
323  // *** Charge increase ***
324 
325  G4DNAChargeIncrease* theDNAChargeIncreaseProcess =
326  new G4DNAChargeIncrease("hydrogen_G4DNAChargeIncrease");
327  theDNAChargeIncreaseProcess->SetEmModel(
330  (theDNAChargeIncreaseProcess->EmModel()))->SelectStationary(true);
331  ph->RegisterProcess(theDNAChargeIncreaseProcess, particle);
332 
333  } else if ( particleName == "alpha" ) {
334 
335  // *** Elastic ***
336 
337  G4DNAElastic* theDNAElasticProcess =
338  new G4DNAElastic("alpha_G4DNAElastic");
339  theDNAElasticProcess->SetEmModel(new G4DNAIonElasticModel());
341  (theDNAElasticProcess->EmModel()))->SelectStationary(true);
342  ph->RegisterProcess(theDNAElasticProcess, particle);
343 
344  // *** Excitation ***
345 
346  G4DNAExcitation* theDNAExcitationProcess =
347  new G4DNAExcitation("alpha_G4DNAExcitation");
348  theDNAExcitationProcess->SetEmModel(
351  (theDNAExcitationProcess->EmModel()))->SelectStationary(true);
352  ph->RegisterProcess(theDNAExcitationProcess, particle);
353 
354  // *** Ionisation ***
355 
356  G4DNAIonisation* theDNAIonisationProcess =
357  new G4DNAIonisation("alpha_G4DNAIonisation");
358  theDNAIonisationProcess->SetEmModel(
361  (theDNAIonisationProcess->EmModel()))->SelectStationary(true);
362  ph->RegisterProcess(theDNAIonisationProcess, particle);
363 
364  // *** Charge decrease ***
365 
366  G4DNAChargeDecrease* theDNAChargeDecreaseProcess =
367  new G4DNAChargeDecrease("alpha_G4DNAChargeDecrease");
368  theDNAChargeDecreaseProcess->SetEmModel(
371  (theDNAChargeDecreaseProcess->EmModel()))->SelectStationary(true);
372  ph->RegisterProcess(theDNAChargeDecreaseProcess, particle);
373 
374  } else if ( particleName == "alpha+" ) {
375 
376  // *** Elastic ***
377 
378  G4DNAElastic* theDNAElasticProcess =
379  new G4DNAElastic("alpha+_G4DNAElastic");
380  theDNAElasticProcess->SetEmModel(new G4DNAIonElasticModel());
382  (theDNAElasticProcess->EmModel()))->SelectStationary(true);
383  ph->RegisterProcess(theDNAElasticProcess, particle);
384 
385  // *** Excitation ***
386 
387  G4DNAExcitation* theDNAExcitationProcess =
388  new G4DNAExcitation("alpha+_G4DNAExcitation");
389  theDNAExcitationProcess->SetEmModel(
392  (theDNAExcitationProcess->EmModel()))->SelectStationary(true);
393  ph->RegisterProcess(theDNAExcitationProcess, particle);
394 
395  // *** Ionisation ***
396 
397  G4DNAIonisation* theDNAIonisationProcess =
398  new G4DNAIonisation("alpha+_G4DNAIonisation");
399  theDNAIonisationProcess->SetEmModel(
402  (theDNAIonisationProcess->EmModel()))->SelectStationary(true);
403  ph->RegisterProcess(theDNAIonisationProcess, particle);
404 
405  // *** Charge decrease ***
406 
407  G4DNAChargeDecrease* theDNAChargeDecreaseProcess =
408  new G4DNAChargeDecrease("alpha+_G4DNAChargeDecrease");
409  theDNAChargeDecreaseProcess->SetEmModel(
412  (theDNAChargeDecreaseProcess->EmModel()))->SelectStationary(true);
413  ph->RegisterProcess(theDNAChargeDecreaseProcess, particle);
414 
415  // *** Charge increase ***
416 
417  G4DNAChargeIncrease* theDNAChargeIncreaseProcess =
418  new G4DNAChargeIncrease("alpha+_G4DNAChargeIncrease");
419  theDNAChargeIncreaseProcess->SetEmModel(
422  (theDNAChargeIncreaseProcess->EmModel()))->SelectStationary(true);
423  ph->RegisterProcess(theDNAChargeIncreaseProcess, particle);
424 
425  } else if ( particleName == "helium" ) {
426 
427  // *** Elastic ***
428 
429  G4DNAElastic* theDNAElasticProcess =
430  new G4DNAElastic("helium_G4DNAElastic");
431  theDNAElasticProcess->SetEmModel(
432  new G4DNAIonElasticModel());
434  (theDNAElasticProcess->EmModel()))->SelectStationary(true);
435  ph->RegisterProcess(theDNAElasticProcess, particle);
436 
437  // *** Excitation ***
438 
439  G4DNAExcitation* theDNAExcitationProcess =
440  new G4DNAExcitation("helium_G4DNAExcitation");
441  theDNAExcitationProcess->SetEmModel(
444  (theDNAExcitationProcess->EmModel()))->SelectStationary(true);
445  ph->RegisterProcess(theDNAExcitationProcess, particle);
446 
447  // *** Ionisation ***
448 
449  G4DNAIonisation* theDNAIonisationProcess =
450  new G4DNAIonisation("helium_G4DNAIonisation");
451  theDNAIonisationProcess->SetEmModel(
454  (theDNAIonisationProcess->EmModel()))->SelectStationary(true);
455  ph->RegisterProcess(theDNAIonisationProcess, particle);
456 
457  // *** Charge increase ***
458 
459  G4DNAChargeIncrease* theDNAChargeIncreaseProcess =
460  new G4DNAChargeIncrease("helium_G4DNAChargeIncrease");
461  theDNAChargeIncreaseProcess->SetEmModel(
464  (theDNAChargeIncreaseProcess->EmModel()))->SelectStationary(true);
465  ph->RegisterProcess(theDNAChargeIncreaseProcess, particle);
466 
467  } else if ( particleName == "GenericIon" ) {
468 
469  // *** Ionisation ***
470 
471  G4DNAIonisation* theDNAIonisationProcess =
472  new G4DNAIonisation("GenericIon_G4DNAIonisation");
473  theDNAIonisationProcess->SetEmModel(
476  (theDNAIonisationProcess->EmModel()))->SelectStationary(true);
477  ph->RegisterProcess(theDNAIonisationProcess, particle);
478 
479  }
480 
481  // Warning : the following particles and processes are needed by EM Physics
482  // builders
483  // They are taken from the default Livermore Physics list
484  // These particles are currently not handled by Geant4-DNA
485 
486  // e+
487 
488  else if (particleName == "e+") {
489 
490  // Identical to G4EmStandardPhysics_stationary
491 
494  G4eIonisation* eIoni = new G4eIonisation();
495  eIoni->SetStepFunction(0.2, 100*um);
496 
497  ph->RegisterProcess(msc, particle);
498  ph->RegisterProcess(eIoni, particle);
499  ph->RegisterProcess(new G4eBremsstrahlung(), particle);
500  ph->RegisterProcess(new G4eplusAnnihilation(), particle);
501 
502  } else if (particleName == "gamma") {
503 
504  // photoelectric effect - Livermore model only
505  G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
506  thePhotoElectricEffect->SetEmModel(new G4LivermorePhotoElectricModel());
507  ph->RegisterProcess(thePhotoElectricEffect, particle);
508 
509  // Compton scattering - Livermore model only
510  G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
511  theComptonScattering->SetEmModel(new G4LivermoreComptonModel());
512  ph->RegisterProcess(theComptonScattering, particle);
513 
514  // gamma conversion - Livermore model below 80 GeV
515  G4GammaConversion* theGammaConversion = new G4GammaConversion();
516  theGammaConversion->SetEmModel(new G4LivermoreGammaConversionModel());
517  ph->RegisterProcess(theGammaConversion, particle);
518 
519  // default Rayleigh scattering is Livermore
520  G4RayleighScattering* theRayleigh = new G4RayleighScattering();
521  ph->RegisterProcess(theRayleigh, particle);
522  }
523 
524  // Warning : end of particles and processes are needed by EM Physics build.
525 
526  }
527 
528  // Deexcitation
529  //
532  de->SetFluo(true);
533 }
534