Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PhysicsList.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 // $Id$
31 //
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34 
35 #include "PhysicsList.hh"
36 #include "PhysicsListMessenger.hh"
37 
38 #include "PhysListEmStandard.hh"
39 
40 #include "G4LossTableManager.hh"
41 #include "G4UnitsTable.hh"
42 #include "G4SystemOfUnits.hh"
43 
44 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
45 
48 {
50 
51  fCurrentDefaultCut = 1.0*mm;
52  fCutForGamma = fCurrentDefaultCut;
53  fCutForElectron = fCurrentDefaultCut;
54  fCutForPositron = fCurrentDefaultCut;
55 
56  fMessenger = new PhysicsListMessenger(this);
57 
58  SetVerboseLevel(1);
59 
60  // EM physics
61  fEmName = G4String("standard");
62  fEmPhysicsList = new PhysListEmStandard(fEmName);
63 
64 }
65 
66 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
67 
69 {
70  delete fMessenger;
71 }
72 
73 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
74 
75 // Bosons
76 #include "G4ChargedGeantino.hh"
77 #include "G4Geantino.hh"
78 #include "G4Gamma.hh"
79 #include "G4OpticalPhoton.hh"
80 
81 // leptons
82 #include "G4MuonPlus.hh"
83 #include "G4MuonMinus.hh"
84 #include "G4NeutrinoMu.hh"
85 #include "G4AntiNeutrinoMu.hh"
86 
87 #include "G4Electron.hh"
88 #include "G4Positron.hh"
89 #include "G4NeutrinoE.hh"
90 #include "G4AntiNeutrinoE.hh"
91 
92 // Mesons
93 #include "G4PionPlus.hh"
94 #include "G4PionMinus.hh"
95 #include "G4PionZero.hh"
96 #include "G4Eta.hh"
97 #include "G4EtaPrime.hh"
98 
99 #include "G4KaonPlus.hh"
100 #include "G4KaonMinus.hh"
101 #include "G4KaonZero.hh"
102 #include "G4AntiKaonZero.hh"
103 #include "G4KaonZeroLong.hh"
104 #include "G4KaonZeroShort.hh"
105 
106 // Baryons
107 #include "G4Proton.hh"
108 #include "G4AntiProton.hh"
109 #include "G4Neutron.hh"
110 #include "G4AntiNeutron.hh"
111 
112 // Nuclei
113 #include "G4Deuteron.hh"
114 #include "G4Triton.hh"
115 #include "G4Alpha.hh"
116 #include "G4GenericIon.hh"
117 
118 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
119 
121 {
122 // pseudo-particles
125 
126 // gamma
128 
129 // optical photon
131 
132 // leptons
137 
142 
143 // mesons
155 
156 // barions
161 
162 // ions
167 }
168 
169 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
170 
171 #include "G4EmProcessOptions.hh"
172 
174 {
175  // Transportation
176  //
178 
179  // Electromagnetic physics list
180  //
181  fEmPhysicsList->ConstructProcess();
182 
183  // Em options
184  //
185  G4EmProcessOptions emOptions;
186  emOptions.SetStepFunction(1., 1*mm);
187  emOptions.SetIntegral(false);
188  emOptions.SetLossFluctuations(false);
189 
190  // step limitation (as a full process)
191  //
192  AddStepMax();
193 }
194 
195 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
196 
198 
200 {
201  if (verboseLevel>0) {
202  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
203  }
204 
205  if (name == fEmName) return;
206 
207  if (name == "standard") {
208 
209  fEmName = name;
210  delete fEmPhysicsList;
211  fEmPhysicsList = new PhysListEmStandard(name);
212 
213  } else if (name == "emstandard_opt3") {
214 
215  fEmName = name;
216  delete fEmPhysicsList;
217  fEmPhysicsList = new G4EmStandardPhysics_option3();
218 
219  } else {
220  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
221  << " is not defined"
222  << G4endl;
223  }
224 }
225 
226 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
227 
228 #include "G4ProcessManager.hh"
229 #include "StepMax.hh"
230 
232 {
233  // Step limitation seen as a process
234  StepMax* stepMaxProcess = new StepMax();
235 
237  while ((*theParticleIterator)()){
239  G4ProcessManager* pmanager = particle->GetProcessManager();
240 
241  if (stepMaxProcess->IsApplicable(*particle) && pmanager)
242  {
243  pmanager ->AddDiscreteProcess(stepMaxProcess);
244  }
245  }
246 }
247 
248 
249 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
250 
251 #include "G4Gamma.hh"
252 #include "G4Electron.hh"
253 #include "G4Positron.hh"
254 
256 {
257  // set cut values for gamma at first and for e- second and next for e+,
258  // because some processes for e+/e- need cut values for gamma
259  SetCutValue(fCutForGamma, "gamma");
260  SetCutValue(fCutForElectron, "e-");
261  SetCutValue(fCutForPositron, "e+");
262 }
263 
264 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
265 
267 {
268  fCutForGamma = cut;
269  SetParticleCuts(fCutForGamma, G4Gamma::Gamma());
270 }
271 
272 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
273 
275 {
276  fCutForElectron = cut;
277  SetParticleCuts(fCutForElectron, G4Electron::Electron());
278 }
279 
280 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
281 
283 {
284  fCutForPositron = cut;
285  SetParticleCuts(fCutForPositron, G4Positron::Positron());
286 }
287 
288 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......