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 #include "G4EmStandardPhysics.hh"
44 #include "G4EmLivermorePhysics.hh"
45 #include "G4EmPenelopePhysics.hh"
46 
47 #include "G4LossTableManager.hh"
48 #include "G4UnitsTable.hh"
49 #include "G4SystemOfUnits.hh"
50 
51 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
52 
54 : G4VModularPhysicsList(),fCutForGamma(0),fCutForElectron(0),fCutForPositron(0),
55  fCurrentDefaultCut(0),fEmPhysicsList(0),fEmName("local"),fMessenger(0)
56 {
58 
59  fCurrentDefaultCut = 1.0*mm;
60  fCutForGamma = fCurrentDefaultCut;
61  fCutForElectron = fCurrentDefaultCut;
62  fCutForPositron = fCurrentDefaultCut;
63 
64  fMessenger = new PhysicsListMessenger(this);
65 
66  SetVerboseLevel(1);
67 
68  // EM physics
69  fEmName = G4String("local");
70  fEmPhysicsList = new PhysListEmStandard(fEmName);
71 
72  //add new units for cross sections
73  //
74  new G4UnitDefinition( "mm2/g", "mm2/g","Surface/Mass", mm2/g);
75  new G4UnitDefinition( "um2/mg", "um2/mg","Surface/Mass", um*um/mg);
76 }
77 
78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
79 
81 {
82  delete fMessenger;
83 }
84 
85 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
86 
87 // Bosons
88 #include "G4ChargedGeantino.hh"
89 #include "G4Geantino.hh"
90 #include "G4Gamma.hh"
91 #include "G4OpticalPhoton.hh"
92 
93 // leptons
94 #include "G4MuonPlus.hh"
95 #include "G4MuonMinus.hh"
96 #include "G4NeutrinoMu.hh"
97 #include "G4AntiNeutrinoMu.hh"
98 
99 #include "G4Electron.hh"
100 #include "G4Positron.hh"
101 #include "G4NeutrinoE.hh"
102 #include "G4AntiNeutrinoE.hh"
103 
104 // Mesons
105 #include "G4PionPlus.hh"
106 #include "G4PionMinus.hh"
107 #include "G4PionZero.hh"
108 #include "G4Eta.hh"
109 #include "G4EtaPrime.hh"
110 
111 #include "G4KaonPlus.hh"
112 #include "G4KaonMinus.hh"
113 #include "G4KaonZero.hh"
114 #include "G4AntiKaonZero.hh"
115 #include "G4KaonZeroLong.hh"
116 #include "G4KaonZeroShort.hh"
117 
118 // Baryons
119 #include "G4Proton.hh"
120 #include "G4AntiProton.hh"
121 #include "G4Neutron.hh"
122 #include "G4AntiNeutron.hh"
123 
124 // Nuclei
125 #include "G4Deuteron.hh"
126 #include "G4Triton.hh"
127 #include "G4Alpha.hh"
128 #include "G4GenericIon.hh"
129 
130 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
131 
133 {
134 // pseudo-particles
137 
138 // gamma
140 
141 // optical photon
143 
144 // leptons
149 
154 
155 // mesons
167 
168 // barions
173 
174 // ions
179 }
180 
181 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
182 
183 #include "G4EmProcessOptions.hh"
184 
186 {
187  // Transportation
188  //
190 
191  // Electromagnetic physics list
192  //
193  fEmPhysicsList->ConstructProcess();
194 
195  // Em options
196  //
197  // Main options and setting parameters are shown here.
198  // Several of them have default values.
199  //
200  G4EmProcessOptions emOptions;
201 
202  //physics tables
203  //
204  //emOptions.SetMinEnergy(100*eV); //default
205  //emOptions.SetMaxEnergy(100*TeV); //default
206  //emOptions.SetDEDXBinning(12*20); //default=12*7
207  //emOptions.SetLambdaBinning(12*20); //default=12*7
208 
209  emOptions.SetBuildCSDARange(true);
210  emOptions.SetMaxEnergyForCSDARange(10*GeV);
211  //emOptions.SetDEDXBinningForCSDARange(12*20);
212 
213  //emOptions.SetSplineFlag(true); //default
214 
215  emOptions.SetVerbose(0);
216 }
217 
218 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
219 
221 {
222  if (verboseLevel>0) {
223  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
224  }
225 
226  if (name == fEmName) return;
227 
228  if (name == "local") {
229 
230  fEmName = name;
231  delete fEmPhysicsList;
232  fEmPhysicsList = new PhysListEmStandard(name);
233 
234  } else if (name == "emstandard_opt0"){
235  fEmName = name;
236  delete fEmPhysicsList;
237  fEmPhysicsList = new G4EmStandardPhysics();
238 
239  } else if (name == "emstandard_opt1"){
240  fEmName = name;
241  delete fEmPhysicsList;
242  fEmPhysicsList = new G4EmStandardPhysics_option1();
243 
244  } else if (name == "emstandard_opt2"){
245  fEmName = name;
246  delete fEmPhysicsList;
247  fEmPhysicsList = new G4EmStandardPhysics_option2();
248 
249  } else if (name == "emstandard_opt3"){
250  fEmName = name;
251  delete fEmPhysicsList;
252  fEmPhysicsList = new G4EmStandardPhysics_option3();
253 
254  } else if (name == "emstandard_opt4"){
255  fEmName = name;
256  delete fEmPhysicsList;
257  fEmPhysicsList = new G4EmStandardPhysics_option4();
258 
259  } else if (name == "empenelope"){
260  fEmName = name;
261  delete fEmPhysicsList;
262  fEmPhysicsList = new G4EmPenelopePhysics();
263 
264  } else if (name == "emlivermore"){
265  fEmName = name;
266  delete fEmPhysicsList;
267  fEmPhysicsList = new G4EmLivermorePhysics();
268 
269  } else {
270 
271  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
272  << " is not defined"
273  << G4endl;
274  }
275 }
276 
277 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
278 
279 #include "G4Gamma.hh"
280 #include "G4Electron.hh"
281 #include "G4Positron.hh"
282 
284 {
285  // fixe lower limit for cut
287 
288  // set cut values for gamma at first and for e- second and next for e+,
289  // because some processes for e+/e- need cut values for gamma
290  SetCutValue(fCutForGamma, "gamma");
291  SetCutValue(fCutForElectron, "e-");
292  SetCutValue(fCutForPositron, "e+");
294 }
295 
296 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
297 
299 {
300  fCutForGamma = cut;
301  SetParticleCuts(fCutForGamma, G4Gamma::Gamma());
302 }
303 
304 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
305 
307 {
308  fCutForElectron = cut;
309  SetParticleCuts(fCutForElectron, G4Electron::Electron());
310 }
311 
312 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
313 
315 {
316  fCutForPositron = cut;
317  SetParticleCuts(fCutForPositron, G4Positron::Positron());
318 }
319 
320 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......