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

Last change on this file since 1337 was 1337, checked in by garnier, 14 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 7.5 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.9 2010/04/05 13:45:17 maire Exp $
28// GEANT4 tag $Name: geant4-09-04-beta-01 $
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.SetIntegral(false);
186}
187
188//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
189
190void PhysicsList::AddPhysicsList(const G4String& name)
191{
192  if (verboseLevel>0) {
193    G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
194  }
195 
196  if (name == emName) return;
197
198  if (name == "standard") {
199    emName = name;
200    delete emPhysicsList;
201    emPhysicsList = new PhysListEmStandard(name);
202   
203  } else if (name == "livermore") {
204    emName = name;
205    delete emPhysicsList;
206    emPhysicsList = new PhysListEmLivermore(name);
207   
208  } else if (name == "penelope") {
209    emName = name;
210    delete emPhysicsList;
211    emPhysicsList = new PhysListEmPenelope(name);
212                         
213  } else {
214    G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
215           << " is not defined"
216           << G4endl;
217  }
218}
219
220//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
221
222#include "G4Gamma.hh"
223#include "G4Electron.hh"
224#include "G4Positron.hh"
225
226void PhysicsList::SetCuts()
227{
228  // fixe lower limit for cut
229  G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(100*eV, 1*GeV);
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.