Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
examples/extended/electromagnetic/TestEm13/src/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 //
26 /// \file electromagnetic/TestEm13/src/PhysicsList.cc
27 /// \brief Implementation of the PhysicsList class
28 //
29 //
30 // $Id: PhysicsList.cc 67268 2013-02-13 11:38:40Z ihrivnac $
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 "PhysListEmLivermore.hh"
40 #include "PhysListEmPenelope.hh"
41 
42 #include "G4LossTableManager.hh"
43 #include "G4UnitsTable.hh"
44 #include "G4SystemOfUnits.hh"
45 
46 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
47 
50  fEmPhysicsList(0),
51  fMessenger(0)
52 {
53 
54  //add new units for cross sections
55  //
56  new G4UnitDefinition( "mm2/g", "mm2/g","Surface/Mass", mm2/g);
57  new G4UnitDefinition( "um2/mg", "um2/mg","Surface/Mass", um*um/mg);
58 
60 
61  fCurrentDefaultCut = 1.0*mm;
62  fCutForGamma = fCurrentDefaultCut;
63  fCutForElectron = fCurrentDefaultCut;
64  fCutForPositron = fCurrentDefaultCut;
65 
66  fMessenger = new PhysicsListMessenger(this);
67 
68  SetVerboseLevel(1);
69 
70  // EM physics
71  fEmName = G4String("standard");
72  fEmPhysicsList = new PhysListEmStandard(fEmName);
73 }
74 
75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
76 
78 {
79  delete fMessenger;
80 }
81 
82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
83 
84 // Bosons
85 #include "G4ChargedGeantino.hh"
86 #include "G4Geantino.hh"
87 #include "G4Gamma.hh"
88 #include "G4OpticalPhoton.hh"
89 
90 // leptons
91 #include "G4MuonPlus.hh"
92 #include "G4MuonMinus.hh"
93 #include "G4NeutrinoMu.hh"
94 #include "G4AntiNeutrinoMu.hh"
95 
96 #include "G4Electron.hh"
97 #include "G4Positron.hh"
98 #include "G4NeutrinoE.hh"
99 #include "G4AntiNeutrinoE.hh"
100 
101 // Mesons
102 #include "G4PionPlus.hh"
103 #include "G4PionMinus.hh"
104 #include "G4PionZero.hh"
105 #include "G4Eta.hh"
106 #include "G4EtaPrime.hh"
107 
108 #include "G4KaonPlus.hh"
109 #include "G4KaonMinus.hh"
110 #include "G4KaonZero.hh"
111 #include "G4AntiKaonZero.hh"
112 #include "G4KaonZeroLong.hh"
113 #include "G4KaonZeroShort.hh"
114 
115 // Baryons
116 #include "G4Proton.hh"
117 #include "G4AntiProton.hh"
118 #include "G4Neutron.hh"
119 #include "G4AntiNeutron.hh"
120 
121 // Nuclei
122 #include "G4Deuteron.hh"
123 #include "G4Triton.hh"
124 #include "G4Alpha.hh"
125 #include "G4GenericIon.hh"
126 
127 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
128 
130 {
131 // pseudo-particles
134 
135 // gamma
137 
138 // optical photon
140 
141 // leptons
146 
151 
152 // mesons
164 
165 // barions
170 
171 // ions
176 }
177 
178 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
179 
180 #include "G4EmProcessOptions.hh"
181 
183 {
184  // Transportation
185  //
187 
188  // Electromagnetic physics list
189  //
190  fEmPhysicsList->ConstructProcess();
191 
192  // Em options
193  //
194  G4EmProcessOptions emOptions;
195  emOptions.SetIntegral(false);
196 }
197 
198 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
199 
201 {
202  if (verboseLevel>0) {
203  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
204  }
205 
206  if (name == fEmName) return;
207 
208  if (name == "standard") {
209  fEmName = name;
210  delete fEmPhysicsList;
211  fEmPhysicsList = new PhysListEmStandard(name);
212 
213  } else if (name == "livermore") {
214  fEmName = name;
215  delete fEmPhysicsList;
216  fEmPhysicsList = new PhysListEmLivermore(name);
217 
218  } else if (name == "penelope") {
219  fEmName = name;
220  delete fEmPhysicsList;
221  fEmPhysicsList = new PhysListEmPenelope(name);
222 
223  } else {
224  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
225  << " is not defined"
226  << G4endl;
227  }
228 }
229 
230 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
231 
232 #include "G4Gamma.hh"
233 #include "G4Electron.hh"
234 #include "G4Positron.hh"
235 
237 {
238  // fixe lower limit for cut
240 
241  // set cut values for gamma at first and for e- second and next for e+,
242  // because some processes for e+/e- need cut values for gamma
243  SetCutValue(fCutForGamma, "gamma");
244  SetCutValue(fCutForElectron, "e-");
245  SetCutValue(fCutForPositron, "e+");
246 }
247 
248 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
249 
251 {
252  fCutForGamma = cut;
253  SetParticleCuts(fCutForGamma, G4Gamma::Gamma());
254 }
255 
256 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
257 
259 {
260  fCutForElectron = cut;
261  SetParticleCuts(fCutForElectron, G4Electron::Electron());
262 }
263 
264 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
265 
267 {
268  fCutForPositron = cut;
269  SetParticleCuts(fCutForPositron, G4Positron::Positron());
270 }
271 
272 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
static G4Geantino * GeantinoDefinition()
Definition: G4Geantino.cc:82
static G4Electron * ElectronDefinition()
Definition: G4Electron.cc:89
static G4Triton * TritonDefinition()
Definition: G4Triton.cc:90
static G4KaonPlus * KaonPlusDefinition()
Definition: G4KaonPlus.cc:108
static G4GenericIon * GenericIonDefinition()
Definition: G4GenericIon.cc:88
static G4MuonPlus * MuonPlusDefinition()
Definition: G4MuonPlus.cc:94
static G4LossTableManager * Instance()
void SetCutValue(G4double aCut, const G4String &pname)
void SetEnergyRange(G4double lowedge, G4double highedge)
static G4KaonMinus * KaonMinusDefinition()
Definition: G4KaonMinus.cc:108
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:88
const XML_Char * name
static G4KaonZero * KaonZeroDefinition()
Definition: G4KaonZero.cc:99
static G4AntiKaonZero * AntiKaonZeroDefinition()
static G4KaonZeroShort * KaonZeroShortDefinition()
static G4AntiProton * AntiProtonDefinition()
Definition: G4AntiProton.cc:88
static G4AntiNeutron * AntiNeutronDefinition()
static G4PionZero * PionZeroDefinition()
Definition: G4PionZero.cc:99
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5205
void SetParticleCuts(G4double cut, G4ParticleDefinition *particle, G4Region *region=0)
G4GLOB_DLL std::ostream G4cout
static G4PionMinus * PionMinusDefinition()
Definition: G4PionMinus.cc:93
static G4KaonZeroLong * KaonZeroLongDefinition()
static G4NeutrinoE * NeutrinoEDefinition()
Definition: G4NeutrinoE.cc:80
static G4AntiNeutrinoMu * AntiNeutrinoMuDefinition()
static G4PionPlus * PionPlusDefinition()
Definition: G4PionPlus.cc:93
void SetVerboseLevel(G4int value)
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
static G4Positron * PositronDefinition()
Definition: G4Positron.cc:89
static G4EtaPrime * EtaPrimeDefinition()
Definition: G4EtaPrime.cc:100
static G4ProductionCutsTable * GetProductionCutsTable()
static G4Positron * Positron()
Definition: G4Positron.cc:94
static G4MuonMinus * MuonMinusDefinition()
Definition: G4MuonMinus.cc:95
virtual void ConstructProcess()=0
void SetIntegral(G4bool val)
static G4ChargedGeantino * ChargedGeantinoDefinition()
static G4Electron * Electron()
Definition: G4Electron.cc:94
#define G4endl
Definition: G4ios.hh:61
static G4AntiNeutrinoE * AntiNeutrinoEDefinition()
static G4OpticalPhoton * OpticalPhotonDefinition()
double G4double
Definition: G4Types.hh:76
static G4NeutrinoMu * NeutrinoMuDefinition()
Definition: G4NeutrinoMu.cc:80
static G4Deuteron * DeuteronDefinition()
Definition: G4Deuteron.cc:89
static G4Alpha * AlphaDefinition()
Definition: G4Alpha.cc:84
static G4Neutron * NeutronDefinition()
Definition: G4Neutron.cc:99
static G4Eta * EtaDefinition()
Definition: G4Eta.cc:104
static G4Gamma * GammaDefinition()
Definition: G4Gamma.cc:81