ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PhysicsList.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PhysicsList.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 "PhysicsList.hh"
34 #include "PhysicsListMessenger.hh"
35 
36 #include "G4ParticleDefinition.hh"
37 #include "G4ProcessManager.hh"
38 #include "G4ParticleTypes.hh"
39 #include "G4ParticleTable.hh"
40 
41 #include "G4ComptonScattering.hh"
42 #include "G4GammaConversion.hh"
43 #include "G4PhotoElectricEffect.hh"
44 #include "G4RayleighScattering.hh"
45 
46 #include "G4eMultipleScattering.hh"
47 #include "G4eIonisation.hh"
48 #include "G4eBremsstrahlung.hh"
49 #include "G4eplusAnnihilation.hh"
50 
52 #include "G4MuIonisation.hh"
53 #include "G4MuBremsstrahlung.hh"
54 #include "G4MuPairProduction.hh"
55 
56 #include "G4hMultipleScattering.hh"
57 #include "G4hIonisation.hh"
58 #include "G4hBremsstrahlung.hh"
59 #include "G4hPairProduction.hh"
60 
63 
64 #include "G4StepLimiter.hh"
65 #include "G4DecayPhysics.hh"
66 
67 #include "G4SystemOfUnits.hh"
68 
69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
70 
73  fMess(0)
74 {
76 
77  fSRType = true;
78  fMess = new PhysicsListMessenger(this);
80 }
81 
82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
83 
85 {
86  delete fMess;
87  delete fDecayPhysics;
88 }
89 
90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
91 
93 {
95 }
96 
97 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
98 
100 {
102  ConstructEM();
104 }
105 
106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
107 
109 {
111  particleIterator->reset();
113  while( (*particleIterator)() ){
115  G4ProcessManager* pmanager = particle->GetProcessManager();
116  G4String particleName = particle->GetParticleName();
117 
118  if (particleName == "gamma") {
119  // gamma
122  pmanager->AddDiscreteProcess(new G4GammaConversion);
124 
125  } else if (particleName == "e-") {
126  //electron
127  pmanager->AddProcess(new G4eMultipleScattering, -1, 1, -1);
128  pmanager->AddProcess(new G4eIonisation, -1, 2, 1);
129  pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 2);
130  if (fSRType) {
131  pmanager->AddProcess(fSync, -1,-1, 3);
132  } else {
133  pmanager->AddProcess(new G4SynchrotronRadiationInMat,-1,-1, 3);
134  }
135  pmanager->AddProcess(new G4StepLimiter, -1,-1, 4);
136 
137  } else if (particleName == "e+") {
138  //positron
139  pmanager->AddProcess(new G4eMultipleScattering, -1, 1, -1);
140  pmanager->AddProcess(new G4eIonisation, -1, 2, 1);
141  pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 2);
142  pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 3);
143  if (fSRType) {
144  pmanager->AddProcess(fSync, -1,-1, 4);
145  } else {
146  pmanager->AddProcess(new G4SynchrotronRadiationInMat, -1,-1, 4);
147  }
148  pmanager->AddProcess(new G4StepLimiter, -1,-1, 5);
149 
150  } else if( particleName == "mu+" ||
151  particleName == "mu-" ) {
152  //muon
153  pmanager->AddProcess(new G4MuMultipleScattering, -1, 1, -1);
154  pmanager->AddProcess(new G4MuIonisation, -1, 2, 1);
155  pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 2);
156  pmanager->AddProcess(new G4MuPairProduction, -1, 4, 3);
157  pmanager->AddProcess(fSync, -1,-1, 4);
158  pmanager->AddProcess(new G4StepLimiter, -1,-1, 5);
159 
160  } else if( particleName == "proton") {
161  //proton
162  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, -1);
163  pmanager->AddProcess(new G4hIonisation, -1, 2, 1);
164  pmanager->AddProcess(new G4hBremsstrahlung, -1, 3, 2);
165  pmanager->AddProcess(new G4hPairProduction, -1, 4, 3);
166  pmanager->AddProcess(fSync, -1,-1, 4);
167  pmanager->AddProcess(new G4StepLimiter, -1,-1, 5);
168  }
169  else if (particle->GetPDGCharge() != 0.0 && !particle->IsShortLived())
170  {
171  pmanager->AddProcess(fSync,-1,-1, 1);
172  }
173  }
174 }
175 
176 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......