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