ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExN02PhysicsList.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ExN02PhysicsList.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 //
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 
34 #include "ExN02PhysicsList.hh"
35 
36 #include "G4ProcessManager.hh"
37 #include "G4ParticleTypes.hh"
38 #include "G4SystemOfUnits.hh"
39 
40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
41 
43 {
44  defaultCutValue = 1.0*cm;
45  SetVerboseLevel(1);
46 }
47 
48 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
49 
51 {}
52 
53 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
54 
56 {
57  // In this method, static member functions should be called
58  // for all particles which you want to use.
59  // This ensures that objects of these particle types will be
60  // created in the program.
61 
66 }
67 
68 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
69 
71 {
72  // pseudo-particles
75 
76  // gamma
78 }
79 
80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
81 
83 {
84  // leptons
85  // e+/-
88  // mu+/-
91  // nu_e
94  // nu_mu
97 }
98 
99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
100 
102 {
103  // mesons
104  // light mesons
116 }
117 
118 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
119 
121 {
122  // barions
125 
128 }
129 
130 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
131 
133 {
135  ConstructEM();
137  AddStepMax();
138 }
139 
140 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
141 
142 #include "G4ComptonScattering.hh"
143 #include "G4GammaConversion.hh"
144 #include "G4PhotoElectricEffect.hh"
145 
146 #include "G4eMultipleScattering.hh"
147 #include "G4eIonisation.hh"
148 #include "G4eBremsstrahlung.hh"
149 #include "G4eplusAnnihilation.hh"
150 
151 #include "G4MuMultipleScattering.hh"
152 #include "G4MuIonisation.hh"
153 #include "G4MuBremsstrahlung.hh"
154 #include "G4MuPairProduction.hh"
155 
156 #include "G4hMultipleScattering.hh"
157 #include "G4hIonisation.hh"
158 #include "G4hBremsstrahlung.hh"
159 #include "G4hPairProduction.hh"
160 
161 #include "G4ionIonisation.hh"
162 
163 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
164 
166 {
168  particleIterator->reset();
169  while( (*particleIterator)() ){
171  G4ProcessManager* pmanager = particle->GetProcessManager();
172  G4String particleName = particle->GetParticleName();
173 
174  if (particleName == "gamma") {
175  // gamma
178  pmanager->AddDiscreteProcess(new G4GammaConversion);
179 
180  } else if (particleName == "e-") {
181  //electron
182  pmanager->AddProcess(new G4eMultipleScattering, -1, 1, 1);
183  pmanager->AddProcess(new G4eIonisation, -1, 2, 2);
184  pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3);
185 
186  } else if (particleName == "e+") {
187  //positron
188  pmanager->AddProcess(new G4eMultipleScattering, -1, 1, 1);
189  pmanager->AddProcess(new G4eIonisation, -1, 2, 2);
190  pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3);
191  pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 4);
192 
193  } else if( particleName == "mu+" ||
194  particleName == "mu-" ) {
195  //muon
196  pmanager->AddProcess(new G4MuMultipleScattering, -1, 1, 1);
197  pmanager->AddProcess(new G4MuIonisation, -1, 2, 2);
198  pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3);
199  pmanager->AddProcess(new G4MuPairProduction, -1, 4, 4);
200 
201  } else if( particleName == "proton" ||
202  particleName == "pi-" ||
203  particleName == "pi+" ) {
204  //proton
205  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
206  pmanager->AddProcess(new G4hIonisation, -1, 2, 2);
207  pmanager->AddProcess(new G4hBremsstrahlung, -1, 3, 3);
208  pmanager->AddProcess(new G4hPairProduction, -1, 4, 4);
209 
210  } else if( particleName == "alpha" ||
211  particleName == "He3" ) {
212  //alpha
213  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
214  pmanager->AddProcess(new G4ionIonisation, -1, 2, 2);
215 
216  } else if( particleName == "GenericIon" ) {
217  //Ions
218  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
219  pmanager->AddProcess(new G4ionIonisation, -1, 2, 2);
220 
221  } else if ((!particle->IsShortLived()) &&
222  (particle->GetPDGCharge() != 0.0) &&
223  (particle->GetParticleName() != "chargedgeantino")) {
224  //all others charged particles except geantino
225  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
226  pmanager->AddProcess(new G4hIonisation, -1, 2, 2);
227  }
228  }
229 }
230 
231 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
232 
233 #include "G4Decay.hh"
234 
236 {
237  // Add Decay Process
238  G4Decay* theDecayProcess = new G4Decay();
240  particleIterator->reset();
241  while( (*particleIterator)() ){
243  G4ProcessManager* pmanager = particle->GetProcessManager();
244  if (theDecayProcess->IsApplicable(*particle)) {
245  pmanager ->AddProcess(theDecayProcess);
246  // set ordering for PostStepDoIt and AtRestDoIt
247  pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
248  pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
249  }
250  }
251 }
252 
253 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
254 
255 #include "G4StepLimiter.hh"
256 #include "G4UserSpecialCuts.hh"
257 
259 {
260  // Step limitation seen as a process
261  G4StepLimiter* stepLimiter = new G4StepLimiter();
263 
265  particleIterator->reset();
266  while ((*particleIterator)()){
268  G4ProcessManager* pmanager = particle->GetProcessManager();
269 
270  if (particle->GetPDGCharge() != 0.0)
271  {
272  pmanager ->AddDiscreteProcess(stepLimiter);
274  }
275  }
276 }
277 
278 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
279 
281 {
282  //G4VUserPhysicsList::SetCutsWithDefault method sets
283  //the default cut value for all particle types
284  //
286 
288 }
289 
290 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
291