source: trunk/examples/extended/electromagnetic/TestEm13/src/PhysicsList.cc@ 811

Last change on this file since 811 was 807, checked in by garnier, 17 years ago

update

File size: 7.4 KB
Line 
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: PhysicsList.cc,v 1.5 2006/06/29 16:44:40 gunter Exp $
28// GEANT4 tag $Name: $
29//
30//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
31//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32
33#include "PhysicsList.hh"
34#include "PhysicsListMessenger.hh"
35
36#include "PhysListEmStandard.hh"
37#include "PhysListEmLivermore.hh"
38#include "PhysListEmPenelope.hh"
39
40#include "G4LossTableManager.hh"
41#include "G4UnitsTable.hh"
42
43//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
44
45PhysicsList::PhysicsList()
46: G4VModularPhysicsList()
47{
48 G4LossTableManager::Instance();
49
50 currentDefaultCut = 1.0*mm;
51 cutForGamma = currentDefaultCut;
52 cutForElectron = currentDefaultCut;
53 cutForPositron = currentDefaultCut;
54
55 pMessenger = new PhysicsListMessenger(this);
56
57 SetVerboseLevel(1);
58
59 // EM physics
60 emName = G4String("standard");
61 emPhysicsList = new PhysListEmStandard(emName);
62
63}
64
65//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
66
67PhysicsList::~PhysicsList()
68{
69 delete pMessenger;
70}
71
72//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
73
74// Bosons
75#include "G4ChargedGeantino.hh"
76#include "G4Geantino.hh"
77#include "G4Gamma.hh"
78#include "G4OpticalPhoton.hh"
79
80// leptons
81#include "G4MuonPlus.hh"
82#include "G4MuonMinus.hh"
83#include "G4NeutrinoMu.hh"
84#include "G4AntiNeutrinoMu.hh"
85
86#include "G4Electron.hh"
87#include "G4Positron.hh"
88#include "G4NeutrinoE.hh"
89#include "G4AntiNeutrinoE.hh"
90
91// Mesons
92#include "G4PionPlus.hh"
93#include "G4PionMinus.hh"
94#include "G4PionZero.hh"
95#include "G4Eta.hh"
96#include "G4EtaPrime.hh"
97
98#include "G4KaonPlus.hh"
99#include "G4KaonMinus.hh"
100#include "G4KaonZero.hh"
101#include "G4AntiKaonZero.hh"
102#include "G4KaonZeroLong.hh"
103#include "G4KaonZeroShort.hh"
104
105// Baryons
106#include "G4Proton.hh"
107#include "G4AntiProton.hh"
108#include "G4Neutron.hh"
109#include "G4AntiNeutron.hh"
110
111// Nuclei
112#include "G4Deuteron.hh"
113#include "G4Triton.hh"
114#include "G4Alpha.hh"
115#include "G4GenericIon.hh"
116
117//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
118
119void PhysicsList::ConstructParticle()
120{
121// pseudo-particles
122 G4Geantino::GeantinoDefinition();
123 G4ChargedGeantino::ChargedGeantinoDefinition();
124
125// gamma
126 G4Gamma::GammaDefinition();
127
128// optical photon
129 G4OpticalPhoton::OpticalPhotonDefinition();
130
131// leptons
132 G4Electron::ElectronDefinition();
133 G4Positron::PositronDefinition();
134 G4MuonPlus::MuonPlusDefinition();
135 G4MuonMinus::MuonMinusDefinition();
136
137 G4NeutrinoE::NeutrinoEDefinition();
138 G4AntiNeutrinoE::AntiNeutrinoEDefinition();
139 G4NeutrinoMu::NeutrinoMuDefinition();
140 G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
141
142// mesons
143 G4PionPlus::PionPlusDefinition();
144 G4PionMinus::PionMinusDefinition();
145 G4PionZero::PionZeroDefinition();
146 G4Eta::EtaDefinition();
147 G4EtaPrime::EtaPrimeDefinition();
148 G4KaonPlus::KaonPlusDefinition();
149 G4KaonMinus::KaonMinusDefinition();
150 G4KaonZero::KaonZeroDefinition();
151 G4AntiKaonZero::AntiKaonZeroDefinition();
152 G4KaonZeroLong::KaonZeroLongDefinition();
153 G4KaonZeroShort::KaonZeroShortDefinition();
154
155// barions
156 G4Proton::ProtonDefinition();
157 G4AntiProton::AntiProtonDefinition();
158 G4Neutron::NeutronDefinition();
159 G4AntiNeutron::AntiNeutronDefinition();
160
161// ions
162 G4Deuteron::DeuteronDefinition();
163 G4Triton::TritonDefinition();
164 G4Alpha::AlphaDefinition();
165 G4GenericIon::GenericIonDefinition();
166}
167
168//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
169
170#include "G4EmProcessOptions.hh"
171
172void PhysicsList::ConstructProcess()
173{
174 // Transportation
175 //
176 AddTransportation();
177
178 // Electromagnetic physics list
179 //
180 emPhysicsList->ConstructProcess();
181
182 // Em options
183 //
184 G4EmProcessOptions emOptions;
185 emOptions.SetStepFunction(1., 1*mm);
186 emOptions.SetIntegral(false);
187 emOptions.SetLossFluctuations(false);
188}
189
190//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
191
192void PhysicsList::AddPhysicsList(const G4String& name)
193{
194 if (verboseLevel>0) {
195 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
196 }
197
198 if (name == emName) return;
199
200 if (name == "standard") {
201
202 emName = name;
203 delete emPhysicsList;
204 emPhysicsList = new PhysListEmStandard(name);
205
206 } else if (name == "livermore") {
207 emName = name;
208 delete emPhysicsList;
209 emPhysicsList = new PhysListEmLivermore(name);
210
211 } else if (name == "penelope") {
212 emName = name;
213 delete emPhysicsList;
214 emPhysicsList = new PhysListEmPenelope(name);
215
216 } else {
217 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
218 << " is not defined"
219 << G4endl;
220 }
221}
222
223//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
224
225#include "G4Gamma.hh"
226#include "G4Electron.hh"
227#include "G4Positron.hh"
228
229void PhysicsList::SetCuts()
230{
231 // set cut values for gamma at first and for e- second and next for e+,
232 // because some processes for e+/e- need cut values for gamma
233 SetCutValue(cutForGamma, "gamma");
234 SetCutValue(cutForElectron, "e-");
235 SetCutValue(cutForPositron, "e+");
236}
237
238//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
239
240void PhysicsList::SetCutForGamma(G4double cut)
241{
242 cutForGamma = cut;
243 SetParticleCuts(cutForGamma, G4Gamma::Gamma());
244}
245
246//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
247
248void PhysicsList::SetCutForElectron(G4double cut)
249{
250 cutForElectron = cut;
251 SetParticleCuts(cutForElectron, G4Electron::Electron());
252}
253
254//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
255
256void PhysicsList::SetCutForPositron(G4double cut)
257{
258 cutForPositron = cut;
259 SetParticleCuts(cutForPositron, G4Positron::Positron());
260}
261
262//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Note: See TracBrowser for help on using the repository browser.