Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExTGPhysicsList.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 //
26 //
27 // $Id$
28 //
31 
32 
33 #include "globals.hh"
34 #include "ExTGPhysicsList.hh"
35 
36 #include "G4ProcessManager.hh"
37 #include "G4ParticleTypes.hh"
38 #include "G4SystemOfUnits.hh"
39 
40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
42 {
43  defaultCutValue = 1.0*cm;
44  SetVerboseLevel(1);
45 }
46 
47 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
49 {
50 }
51 
52 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
54 {
55  // In this method, static member functions should be called
56  // for all particles which you want to use.
57  // This ensures that objects of these particle types will be
58  // created in the program.
59 
64 }
65 
66 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
68 {
69  // pseudo-particles
72 
73  // gamma
75 }
76 
77 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
79 {
80  // leptons
81  // e+/-
84  // mu+/-
87  // nu_e
90  // nu_mu
93 }
94 
95 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
97 {
98  // mesons
99  // light mesons
111 }
112 
113 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
115 {
116  // barions
119 
122 }
123 
124 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
126 {
128  ConstructEM();
130 }
131 
132 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
133 #include "G4ComptonScattering.hh"
134 #include "G4GammaConversion.hh"
135 #include "G4PhotoElectricEffect.hh"
136 
137 #include "G4eMultipleScattering.hh"
138 #include "G4MuMultipleScattering.hh"
139 #include "G4hMultipleScattering.hh"
140 
141 #include "G4eIonisation.hh"
142 #include "G4eBremsstrahlung.hh"
143 #include "G4eplusAnnihilation.hh"
144 
145 #include "G4MuIonisation.hh"
146 #include "G4MuBremsstrahlung.hh"
147 #include "G4MuPairProduction.hh"
148 
149 #include "G4hIonisation.hh"
150 
151 #include "G4StepLimiter.hh"
152 #include "G4UserSpecialCuts.hh"
153 
154 
156 {
158  while( (*theParticleIterator)() ){
160  G4ProcessManager* pmanager = particle->GetProcessManager();
161  G4String particleName = particle->GetParticleName();
162 
163  if (particleName == "gamma") {
164  // gamma
167  pmanager->AddDiscreteProcess(new G4GammaConversion);
168 
169  } else if (particleName == "e-") {
170  //electron
171  pmanager->AddProcess(new G4eMultipleScattering,-1, 1,1);
172  pmanager->AddProcess(new G4eIonisation, -1, 2,2);
173  pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
174 
175  } else if (particleName == "e+") {
176  //positron
177  pmanager->AddProcess(new G4eMultipleScattering,-1, 1,1);
178  pmanager->AddProcess(new G4eIonisation, -1, 2,2);
179  pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
180  pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4);
181 
182  } else if( particleName == "mu+" ||
183  particleName == "mu-" ) {
184  //muon
185  pmanager->AddProcess(new G4MuMultipleScattering,-1, 1,1);
186  pmanager->AddProcess(new G4MuIonisation, -1, 2,2);
187  pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3,3);
188  pmanager->AddProcess(new G4MuPairProduction, -1, 4,4);
189 
190  } else if ((!particle->IsShortLived()) &&
191  (particle->GetPDGCharge() != 0.0) &&
192  (particle->GetParticleName() != "chargedgeantino")) {
193  //all others charged particles except geantino
194  pmanager->AddProcess(new G4hMultipleScattering,-1, 1,1);
195  pmanager->AddProcess(new G4hIonisation, -1, 2,2);
196  //step limit
197  pmanager->AddProcess(new G4StepLimiter, -1,-1,3);
199  }
200  }
201 }
202 
203 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
204 #include "G4Decay.hh"
206 {
207  // Add Decay Process
208  G4Decay* theDecayProcess = new G4Decay();
210  while( (*theParticleIterator)() ){
212  G4ProcessManager* pmanager = particle->GetProcessManager();
213  if (theDecayProcess->IsApplicable(*particle)) {
214  pmanager ->AddProcess(theDecayProcess);
215  // set ordering for PostStepDoIt and AtRestDoIt
216  pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
217  pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
218  }
219  }
220 }
221 
222 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
224 {
225  //G4VUserPhysicsList::SetCutsWithDefault method sets
226  //the default cut value for all particle types
227  //
229 
231 }
232 
233