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