source: trunk/examples/extended/electromagnetic/TestEm0/src/PhysicsList.cc @ 1002

Last change on this file since 1002 was 807, checked in by garnier, 16 years ago

update

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