source: trunk/geant4/N03/src/ExN03PhysicsList.cc@ 593

Last change on this file since 593 was 483, checked in by garnier, 18 years ago

r569@mac-90108: laurentgarnier | 2007-06-05 15:53:34 +0200
version contre geant4.8.2.p01

File size: 8.1 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: ExN03PhysicsList.cc,v 1.20 2006/06/29 17:49:05 gunter Exp $
28// GEANT4 tag $Name: geant4-08-01-patch-01 $
29//
30//
31
32//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34
35#include "ExN03PhysicsList.hh"
36
37#include "G4ProcessManager.hh"
38#include "G4ParticleTypes.hh"
39
40//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
41
42ExN03PhysicsList::ExN03PhysicsList(): G4VUserPhysicsList()
43{
44 defaultCutValue = 1.0*mm;
45 SetVerboseLevel(1);
46}
47
48//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
49
50ExN03PhysicsList::~ExN03PhysicsList()
51{}
52
53//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
54
55void ExN03PhysicsList::ConstructParticle()
56{
57 // In this method, static member functions should be called
58 // for all particles which you want to use.
59 // This ensures that objects of these particle types will be
60 // created in the program.
61
62 ConstructBosons();
63 ConstructLeptons();
64 ConstructMesons();
65 ConstructBaryons();
66}
67
68//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
69
70void ExN03PhysicsList::ConstructBosons()
71{
72 // pseudo-particles
73 G4Geantino::GeantinoDefinition();
74 G4ChargedGeantino::ChargedGeantinoDefinition();
75
76 // gamma
77 G4Gamma::GammaDefinition();
78
79 // optical photon
80 G4OpticalPhoton::OpticalPhotonDefinition();
81}
82
83//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
84
85void ExN03PhysicsList::ConstructLeptons()
86{
87 // leptons
88 G4Electron::ElectronDefinition();
89 G4Positron::PositronDefinition();
90 G4MuonPlus::MuonPlusDefinition();
91 G4MuonMinus::MuonMinusDefinition();
92
93 G4NeutrinoE::NeutrinoEDefinition();
94 G4AntiNeutrinoE::AntiNeutrinoEDefinition();
95 G4NeutrinoMu::NeutrinoMuDefinition();
96 G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
97}
98
99//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
100
101void ExN03PhysicsList::ConstructMesons()
102{
103 // mesons
104 G4PionPlus::PionPlusDefinition();
105 G4PionMinus::PionMinusDefinition();
106 G4PionZero::PionZeroDefinition();
107 G4Eta::EtaDefinition();
108 G4EtaPrime::EtaPrimeDefinition();
109 G4KaonPlus::KaonPlusDefinition();
110 G4KaonMinus::KaonMinusDefinition();
111 G4KaonZero::KaonZeroDefinition();
112 G4AntiKaonZero::AntiKaonZeroDefinition();
113 G4KaonZeroLong::KaonZeroLongDefinition();
114 G4KaonZeroShort::KaonZeroShortDefinition();
115}
116
117//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
118
119void ExN03PhysicsList::ConstructBaryons()
120{
121// barions
122 G4Proton::ProtonDefinition();
123 G4AntiProton::AntiProtonDefinition();
124 G4Neutron::NeutronDefinition();
125 G4AntiNeutron::AntiNeutronDefinition();
126}
127
128
129//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
130
131void ExN03PhysicsList::ConstructProcess()
132{
133 AddTransportation();
134 ConstructEM();
135 ConstructGeneral();
136}
137
138//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
139
140#include "G4ComptonScattering.hh"
141#include "G4GammaConversion.hh"
142#include "G4PhotoElectricEffect.hh"
143
144#include "G4MultipleScattering.hh"
145
146#include "G4eIonisation.hh"
147#include "G4eBremsstrahlung.hh"
148#include "G4eplusAnnihilation.hh"
149
150#include "G4MuIonisation.hh"
151#include "G4MuBremsstrahlung.hh"
152#include "G4MuPairProduction.hh"
153
154#include "G4hIonisation.hh"
155
156//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
157
158void ExN03PhysicsList::ConstructEM()
159{
160 theParticleIterator->reset();
161 while( (*theParticleIterator)() ){
162 G4ParticleDefinition* particle = theParticleIterator->value();
163 G4ProcessManager* pmanager = particle->GetProcessManager();
164 G4String particleName = particle->GetParticleName();
165
166 if (particleName == "gamma") {
167 // gamma
168 pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
169 pmanager->AddDiscreteProcess(new G4ComptonScattering);
170 pmanager->AddDiscreteProcess(new G4GammaConversion);
171
172 } else if (particleName == "e-") {
173 //electron
174 pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
175 pmanager->AddProcess(new G4eIonisation, -1, 2,2);
176 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
177
178 } else if (particleName == "e+") {
179 //positron
180 pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
181 pmanager->AddProcess(new G4eIonisation, -1, 2,2);
182 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
183 pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4);
184
185 } else if( particleName == "mu+" ||
186 particleName == "mu-" ) {
187 //muon
188 pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
189 pmanager->AddProcess(new G4MuIonisation, -1, 2,2);
190 pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3,3);
191 pmanager->AddProcess(new G4MuPairProduction, -1, 4,4);
192
193 } else if ((!particle->IsShortLived()) &&
194 (particle->GetPDGCharge() != 0.0) &&
195 (particle->GetParticleName() != "chargedgeantino")) {
196 //all others charged particles except geantino
197 pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
198 pmanager->AddProcess(new G4hIonisation, -1, 2,2);
199 }
200 }
201}
202
203//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
204
205#include "G4Decay.hh"
206
207void ExN03PhysicsList::ConstructGeneral()
208{
209 // Add Decay Process
210 G4Decay* theDecayProcess = new G4Decay();
211 theParticleIterator->reset();
212 while( (*theParticleIterator)() ){
213 G4ParticleDefinition* particle = theParticleIterator->value();
214 G4ProcessManager* pmanager = particle->GetProcessManager();
215 if (theDecayProcess->IsApplicable(*particle)) {
216 pmanager ->AddProcess(theDecayProcess);
217 // set ordering for PostStepDoIt and AtRestDoIt
218 pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
219 pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
220 }
221 }
222}
223
224//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
225
226void ExN03PhysicsList::SetCuts()
227{
228 if (verboseLevel >0){
229 G4cout << "ExN03PhysicsList::SetCuts:";
230 G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
231 }
232
233 // set cut values for gamma at first and for e- second and next for e+,
234 // because some processes for e+/e- need cut values for gamma
235 //
236 SetCutValue(defaultCutValue, "gamma");
237 SetCutValue(defaultCutValue, "e-");
238 SetCutValue(defaultCutValue, "e+");
239
240 if (verboseLevel>0) DumpCutValuesTable();
241}
242
243//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
244
Note: See TracBrowser for help on using the repository browser.