Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExP01PhysicsList.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 //
28 //
29 //
30 //
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 
34 #include "globals.hh"
35 #include "ExP01PhysicsList.hh"
36 
37 #include "G4ProcessManager.hh"
38 #include "G4ParticleTypes.hh"
39 #include "G4SystemOfUnits.hh"
40 
41 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
42 
44 {
45  defaultCutValue = 1.0*cm;
46  SetVerboseLevel(1);
47 }
48 
49 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
50 
52 {}
53 
54 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
55 
57 {
58  // In this method, static member functions should be called
59  // for all particles which you want to use.
60  // This ensures that objects of these particle types will be
61  // created in the program.
62 
67 }
68 
69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
70 
72 {
73  // pseudo-particles
76 
77  // gamma
79 }
80 
81 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
82 
84 {
85  // leptons
86  // e+/-
89  // mu+/-
92  // nu_e
95  // nu_mu
98 }
99 
100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
101 
103 {
104  // mesons
105  // light mesons
117 }
118 
119 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
120 
122 {
123  // barions
126 
129 }
130 
131 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
132 
134 {
136  ConstructEM();
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 
159 #include "G4StepLimiter.hh"
160 #include "G4UserSpecialCuts.hh"
161 
162 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
163 
165 {
167  while( (*theParticleIterator)() ){
169  G4ProcessManager* pmanager = particle->GetProcessManager();
170  G4String particleName = particle->GetParticleName();
171 
172  if (particleName == "gamma") {
173  // gamma
176  pmanager->AddDiscreteProcess(new G4GammaConversion);
177 
178  } else if (particleName == "e-") {
179  //electron
180  pmanager->AddProcess(new G4eMultipleScattering,-1, 1,1);
181  pmanager->AddProcess(new G4eIonisation, -1, 2,2);
182  pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
183 
184  } else if (particleName == "e+") {
185  //positron
186  pmanager->AddProcess(new G4eMultipleScattering,-1, 1,1);
187  pmanager->AddProcess(new G4eIonisation, -1, 2,2);
188  pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
189  pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4);
190 
191  } else if( particleName == "mu+" ||
192  particleName == "mu-" ) {
193  //muon
194  pmanager->AddProcess(new G4MuMultipleScattering,-1, 1,1);
195  pmanager->AddProcess(new G4MuIonisation, -1, 2,2);
196  pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3,3);
197  pmanager->AddProcess(new G4MuPairProduction, -1, 4,4);
198 
199  } else if ((!particle->IsShortLived()) &&
200  (particle->GetPDGCharge() != 0.0) &&
201  (particle->GetParticleName() != "chargedgeantino")) {
202  //all others charged particles except geantino
203  pmanager->AddProcess(new G4hMultipleScattering,-1, 1,1);
204  pmanager->AddProcess(new G4hIonisation, -1, 2,2);
205  //step limit
206  pmanager->AddProcess(new G4StepLimiter, -1,-1,3);
208  }
209  }
210 }
211 
212 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
213 
214 #include "G4Decay.hh"
216 {
217  // Add Decay Process
218  G4Decay* theDecayProcess = new G4Decay();
220  while( (*theParticleIterator)() ){
222  G4ProcessManager* pmanager = particle->GetProcessManager();
223  if (theDecayProcess->IsApplicable(*particle)) {
224  pmanager ->AddProcess(theDecayProcess);
225  // set ordering for PostStepDoIt and AtRestDoIt
226  pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
227  pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
228  }
229  }
230 }
231 
232 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
233 
235 {
236  //G4VUserPhysicsList::SetCutsWithDefault method sets
237  //the default cut value for all particle types
238  //
240 
242 }
243 
244 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
245