1 | // Physics List |
---|
2 | //this |
---|
3 | #include "ELYSE/PhysicsList.hh" |
---|
4 | |
---|
5 | //Geant 4 |
---|
6 | #include "G4ParticleDefinition.hh" |
---|
7 | #include "G4ParticleWithCuts.hh" |
---|
8 | #include "G4LeptonConstructor.hh" |
---|
9 | #include "G4MesonConstructor.hh" |
---|
10 | #include "G4BaryonConstructor.hh" |
---|
11 | #include "G4BosonConstructor.hh" |
---|
12 | #include "G4IonConstructor.hh" |
---|
13 | #include "G4ProcessManager.hh" |
---|
14 | #include "G4ProcessVector.hh" |
---|
15 | #include "G4ParticleTypes.hh" |
---|
16 | #include "G4ParticleTable.hh" |
---|
17 | #include "G4Material.hh" |
---|
18 | #include "G4ios.hh" |
---|
19 | #include "G4UImanager.hh" |
---|
20 | #include "globals.hh" |
---|
21 | |
---|
22 | |
---|
23 | //std |
---|
24 | #include <iomanip> |
---|
25 | |
---|
26 | //ELYSE |
---|
27 | #include "ELYSE/PhysicsMessenger.hh" |
---|
28 | |
---|
29 | |
---|
30 | ELYSE::PhysicsList::PhysicsList() |
---|
31 | : G4VUserPhysicsList(), |
---|
32 | physicsMessenger(0), |
---|
33 | theCerenkovProcess(0), |
---|
34 | theScintillationProcess(0), |
---|
35 | theAbsorptionProcess(0), |
---|
36 | theRayleighScatteringProcess(0), |
---|
37 | theBoundaryProcess(0) { |
---|
38 | |
---|
39 | defaultCutValue = 1.0*mm; |
---|
40 | SetVerboseLevel(1); |
---|
41 | |
---|
42 | physicsMessenger = new PhysicsMessenger(this); |
---|
43 | }//PhysicsList |
---|
44 | |
---|
45 | //----------------------------------------------------------------------------------------------- |
---|
46 | |
---|
47 | ELYSE::PhysicsList::~PhysicsList() { |
---|
48 | delete physicsMessenger; |
---|
49 | physicsMessenger = 0; |
---|
50 | }//PhysicsList |
---|
51 | |
---|
52 | //----------------------------------------------------------------------------------------------- |
---|
53 | void ELYSE::PhysicsList::ConstructParticle() { |
---|
54 | |
---|
55 | G4cout << "(JEC) :PhysicsList::ConstructParticle() now !" << G4endl; |
---|
56 | G4LeptonConstructor leptonConstructor; |
---|
57 | G4MesonConstructor mesonConstructor; |
---|
58 | G4BaryonConstructor baryonConstructor; |
---|
59 | G4BosonConstructor bosonConstructor; |
---|
60 | G4IonConstructor ionConstructor; |
---|
61 | leptonConstructor.ConstructParticle(); |
---|
62 | mesonConstructor.ConstructParticle(); |
---|
63 | baryonConstructor.ConstructParticle(); |
---|
64 | bosonConstructor.ConstructParticle(); |
---|
65 | ionConstructor.ConstructParticle(); |
---|
66 | G4OpticalPhoton::OpticalPhotonDefinition(); |
---|
67 | } //ConstructParticle |
---|
68 | |
---|
69 | //----------------------------------------------------------------------------------------------- |
---|
70 | |
---|
71 | void ELYSE::PhysicsList::ConstructProcess() { |
---|
72 | G4cout << "(JEC) :PhysicsList::ConstructProcess() now !" << G4endl; |
---|
73 | AddTransportation(); |
---|
74 | ConstructEM(); |
---|
75 | ConstructGeneral(); |
---|
76 | ConstructOp(); |
---|
77 | //JEC 20/2/07 not useful? ConstructHad(); |
---|
78 | SetVerbose(0); |
---|
79 | |
---|
80 | }//ConstructProcess |
---|
81 | |
---|
82 | //----------------------------------------------------------------------------------------------- |
---|
83 | |
---|
84 | |
---|
85 | |
---|
86 | #include "G4ComptonScattering.hh" |
---|
87 | #include "G4GammaConversion.hh" |
---|
88 | #include "G4PhotoElectricEffect.hh" |
---|
89 | #include "G4MultipleScattering.hh" |
---|
90 | #include "G4eIonisation.hh" |
---|
91 | #include "G4eBremsstrahlung.hh" |
---|
92 | #include "G4eplusAnnihilation.hh" |
---|
93 | #include "G4MuIonisation.hh" |
---|
94 | #include "G4MuBremsstrahlung.hh" |
---|
95 | #include "G4MuPairProduction.hh" |
---|
96 | #include "G4hIonisation.hh" |
---|
97 | #include "G4MuonMinusCaptureAtRest.hh" |
---|
98 | |
---|
99 | //low energy |
---|
100 | #include "G4LowEnergyRayleigh.hh" |
---|
101 | #include "G4LowEnergyPhotoElectric.hh" |
---|
102 | #include "G4LowEnergyCompton.hh" |
---|
103 | #include "G4LowEnergyGammaConversion.hh" |
---|
104 | #include "G4MultipleScattering52.hh" |
---|
105 | #include "G4LowEnergyIonisation.hh" |
---|
106 | #include "G4LowEnergyBremsstrahlung.hh" |
---|
107 | |
---|
108 | void ELYSE::PhysicsList::ConstructEM() { |
---|
109 | |
---|
110 | theParticleIterator->reset(); |
---|
111 | while( (*theParticleIterator)() ){ |
---|
112 | G4ParticleDefinition* particle = theParticleIterator->value(); |
---|
113 | G4ProcessManager* pmanager = particle->GetProcessManager(); |
---|
114 | G4String particleName = particle->GetParticleName(); |
---|
115 | |
---|
116 | if (particleName == "gamma") { |
---|
117 | // gamma standard |
---|
118 | // pmanager->AddDiscreteProcess(new G4GammaConversion()); |
---|
119 | // pmanager->AddDiscreteProcess(new G4ComptonScattering()); |
---|
120 | // pmanager->AddDiscreteProcess(new G4PhotoElectricEffect()); |
---|
121 | |
---|
122 | //Low energy version |
---|
123 | pmanager->AddDiscreteProcess(new G4LowEnergyRayleigh); |
---|
124 | pmanager->AddDiscreteProcess(new G4LowEnergyPhotoElectric("LowEnPhotoElec")); |
---|
125 | pmanager->AddDiscreteProcess(new G4LowEnergyCompton); |
---|
126 | pmanager->AddDiscreteProcess(new G4LowEnergyGammaConversion); |
---|
127 | |
---|
128 | |
---|
129 | } else if (particleName == "e-") { |
---|
130 | //electron |
---|
131 | // G4VProcess*theeminusMultipleScattering = new G4MultipleScattering(); |
---|
132 | // G4VProcess* theeminusIonisation = new G4eIonisation(); |
---|
133 | // G4VProcess* theeminusBremsstrahlung = new G4eBremsstrahlung(); |
---|
134 | |
---|
135 | |
---|
136 | //JEC 20/2/07 test lowenergy processes |
---|
137 | G4VProcess* theeminusMultipleScattering = new G4MultipleScattering52; |
---|
138 | G4VProcess* theeminusIonisation = new G4LowEnergyIonisation("LowEnergyIoni"); |
---|
139 | G4VProcess* theeminusBremsstrahlung = new G4LowEnergyBremsstrahlung("LowEnBrem"); |
---|
140 | |
---|
141 | //JEC new debug |
---|
142 | theeminusMultipleScattering->SetVerboseLevel(2); |
---|
143 | theeminusIonisation->SetVerboseLevel(2); |
---|
144 | theeminusBremsstrahlung->SetVerboseLevel(2); |
---|
145 | |
---|
146 | // add processes |
---|
147 | |
---|
148 | // pmanager->AddProcess(theeminusMultipleScattering); |
---|
149 | // pmanager->AddProcess(theeminusIonisation); |
---|
150 | // pmanager->AddProcess(theeminusBremsstrahlung); |
---|
151 | // // |
---|
152 | // // set ordering for AlongStepDoIt |
---|
153 | // pmanager->SetProcessOrdering(theeminusMultipleScattering,idxAlongStep,1); |
---|
154 | // pmanager->SetProcessOrdering(theeminusIonisation, idxAlongStep,2); |
---|
155 | // // pmanager->SetProcessOrdering(theeminusBremsstrahlung, idxAlongStep,3); //add by JEC 12/2/07 |
---|
156 | // //but not in LowEnergy |
---|
157 | |
---|
158 | // // |
---|
159 | // // set ordering for PostStepDoIt |
---|
160 | // pmanager->SetProcessOrdering(theeminusMultipleScattering, idxPostStep,1); |
---|
161 | // pmanager->SetProcessOrdering(theeminusIonisation, idxPostStep,2); |
---|
162 | // pmanager->SetProcessOrdering(theeminusBremsstrahlung, idxPostStep,3); |
---|
163 | |
---|
164 | pmanager->AddProcess(theeminusMultipleScattering, -1, 1,1); |
---|
165 | pmanager->AddProcess(theeminusIonisation, -1, 2,2); |
---|
166 | pmanager->AddProcess(theeminusBremsstrahlung, -1,-1,3); |
---|
167 | |
---|
168 | |
---|
169 | } else if (particleName == "e+") { |
---|
170 | //positron |
---|
171 | // G4VProcess* theeplusMultipleScattering = new G4MultipleScattering(); |
---|
172 | // G4VProcess* theeplusIonisation = new G4eIonisation(); |
---|
173 | // G4VProcess* theeplusBremsstrahlung = new G4eBremsstrahlung(); |
---|
174 | // G4VProcess* theeplusAnnihilation = new G4eplusAnnihilation(); |
---|
175 | // // |
---|
176 | // // add processes |
---|
177 | // pmanager->AddProcess(theeplusMultipleScattering); |
---|
178 | // pmanager->AddProcess(theeplusIonisation); |
---|
179 | // pmanager->AddProcess(theeplusBremsstrahlung); |
---|
180 | // pmanager->AddProcess(theeplusAnnihilation); |
---|
181 | // // |
---|
182 | // // set ordering for AtRestDoIt |
---|
183 | // pmanager->SetProcessOrderingToFirst(theeplusAnnihilation, idxAtRest); |
---|
184 | // // |
---|
185 | // // set ordering for AlongStepDoIt |
---|
186 | // pmanager->SetProcessOrdering(theeplusMultipleScattering, idxAlongStep,1); |
---|
187 | // pmanager->SetProcessOrdering(theeplusIonisation, idxAlongStep,2); |
---|
188 | // pmanager->SetProcessOrdering(theeplusBremsstrahlung, idxAlongStep,3); //add by JEC 12/2/07 |
---|
189 | // // |
---|
190 | // // set ordering for PostStepDoIt |
---|
191 | // pmanager->SetProcessOrdering(theeplusMultipleScattering, idxPostStep,1); |
---|
192 | // pmanager->SetProcessOrdering(theeplusIonisation, idxPostStep,2); |
---|
193 | // pmanager->SetProcessOrdering(theeplusBremsstrahlung, idxPostStep,3); |
---|
194 | // pmanager->SetProcessOrdering(theeplusAnnihilation, idxPostStep,4); |
---|
195 | |
---|
196 | //JEC use MS52 and compactification of the AddProcess |
---|
197 | pmanager->AddProcess(new G4MultipleScattering52,-1, 1,1); |
---|
198 | pmanager->AddProcess(new G4eIonisation, -1, 2,2); |
---|
199 | pmanager->AddProcess(new G4eBremsstrahlung, -1,-1,3); |
---|
200 | pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4); |
---|
201 | |
---|
202 | |
---|
203 | } else if( particleName == "mu+" || |
---|
204 | particleName == "mu-" ) { |
---|
205 | //muon |
---|
206 | G4VProcess* aMultipleScattering = new G4MultipleScattering(); |
---|
207 | G4VProcess* aBremsstrahlung = new G4MuBremsstrahlung(); |
---|
208 | G4VProcess* aPairProduction = new G4MuPairProduction(); |
---|
209 | G4VProcess* anIonisation = new G4MuIonisation(); |
---|
210 | // |
---|
211 | // add processes |
---|
212 | pmanager->AddProcess(anIonisation); |
---|
213 | pmanager->AddProcess(aMultipleScattering); |
---|
214 | pmanager->AddProcess(aBremsstrahlung); |
---|
215 | pmanager->AddProcess(aPairProduction); |
---|
216 | // |
---|
217 | // set ordering for AlongStepDoIt |
---|
218 | pmanager->SetProcessOrdering(aMultipleScattering, idxAlongStep,1); |
---|
219 | pmanager->SetProcessOrdering(anIonisation, idxAlongStep,2); |
---|
220 | pmanager->SetProcessOrdering(aBremsstrahlung, idxAlongStep,3); //add by JEC 12/2/07 |
---|
221 | pmanager->SetProcessOrdering(aPairProduction, idxAlongStep,4); //add by JEC 12/2/07 |
---|
222 | // |
---|
223 | // set ordering for PostStepDoIt |
---|
224 | pmanager->SetProcessOrdering(aMultipleScattering, idxPostStep,1); |
---|
225 | pmanager->SetProcessOrdering(anIonisation, idxPostStep,2); |
---|
226 | pmanager->SetProcessOrdering(aBremsstrahlung, idxPostStep,3); |
---|
227 | pmanager->SetProcessOrdering(aPairProduction, idxPostStep,4); |
---|
228 | |
---|
229 | //Decay at rest |
---|
230 | if (particleName == "mu-") |
---|
231 | { |
---|
232 | G4VProcess* aG4MuonMinusCaptureAtRest = |
---|
233 | new G4MuonMinusCaptureAtRest(); |
---|
234 | pmanager->AddProcess(aG4MuonMinusCaptureAtRest); |
---|
235 | pmanager->SetProcessOrdering(aG4MuonMinusCaptureAtRest,idxAtRest); |
---|
236 | } |
---|
237 | |
---|
238 | |
---|
239 | } else if ((!particle->IsShortLived()) && |
---|
240 | (particle->GetPDGCharge() != 0.0)&& |
---|
241 | (particle->GetParticleName() != "chargedgeantino")) { |
---|
242 | G4VProcess* aMultipleScattering = new G4MultipleScattering(); |
---|
243 | G4VProcess* anIonisation = new G4hIonisation(); |
---|
244 | // |
---|
245 | // add processes |
---|
246 | pmanager->AddProcess(anIonisation); |
---|
247 | pmanager->AddProcess(aMultipleScattering); |
---|
248 | // |
---|
249 | // set ordering for AlongStepDoIt |
---|
250 | pmanager->SetProcessOrdering(aMultipleScattering, idxAlongStep,1); |
---|
251 | pmanager->SetProcessOrdering(anIonisation, idxAlongStep,2); |
---|
252 | // |
---|
253 | // set ordering for PostStepDoIt |
---|
254 | pmanager->SetProcessOrdering(aMultipleScattering, idxPostStep,1); |
---|
255 | pmanager->SetProcessOrdering(anIonisation, idxPostStep,2); |
---|
256 | } |
---|
257 | } |
---|
258 | |
---|
259 | }//ConstructEM |
---|
260 | |
---|
261 | //----------------------------------------------------------------------------------------------- |
---|
262 | |
---|
263 | #include "G4Cerenkov.hh" |
---|
264 | #include "G4Scintillation.hh" |
---|
265 | #include "G4OpAbsorption.hh" |
---|
266 | #include "G4OpRayleigh.hh" |
---|
267 | #include "G4OpBoundaryProcess.hh" |
---|
268 | |
---|
269 | void ELYSE::PhysicsList::ConstructOp(){ |
---|
270 | |
---|
271 | theCerenkovProcess = new G4Cerenkov("Cerenkov"); |
---|
272 | theScintillationProcess = new G4Scintillation("Scintillation"); |
---|
273 | theAbsorptionProcess = new G4OpAbsorption(); |
---|
274 | theRayleighScatteringProcess = new G4OpRayleigh(); |
---|
275 | theBoundaryProcess = new G4OpBoundaryProcess(); |
---|
276 | |
---|
277 | /* |
---|
278 | theCerenkovProcess->DumpPhysicsTable(); |
---|
279 | theScintillationProcess->DumpPhysicsTable(); |
---|
280 | theAbsorptionProcess->DumpPhysicsTable(); |
---|
281 | theRayleighScatteringProcess->DumpPhysicsTable(); |
---|
282 | */ |
---|
283 | |
---|
284 | |
---|
285 | |
---|
286 | |
---|
287 | theCerenkovProcess->SetTrackSecondariesFirst(false); //NV: if "true" generates as many trajectory objs of |
---|
288 | theCerenkovProcess->SetMaxNumPhotonsPerStep(300); //op parents as the # of parents' steps. |
---|
289 | //The number of photons may be tuned by the messenger |
---|
290 | |
---|
291 | //JEC 19/2/07 theScintillationProcess->SetScintillationYieldFactor(1.); |
---|
292 | theScintillationProcess->SetScintillationYieldFactor(0.); |
---|
293 | theScintillationProcess->SetTrackSecondariesFirst(false); |
---|
294 | |
---|
295 | G4OpticalSurfaceModel themodel = unified; //JEC where does it come from? |
---|
296 | theBoundaryProcess->SetModel(themodel); |
---|
297 | |
---|
298 | theParticleIterator->reset(); |
---|
299 | while( (*theParticleIterator)() ) |
---|
300 | { |
---|
301 | G4ParticleDefinition* particle = theParticleIterator->value(); |
---|
302 | G4ProcessManager* pmanager = particle->GetProcessManager(); |
---|
303 | G4String particleName = particle->GetParticleName(); |
---|
304 | |
---|
305 | if (theCerenkovProcess->IsApplicable(*particle)) { |
---|
306 | pmanager->AddContinuousProcess(theCerenkovProcess); |
---|
307 | } |
---|
308 | |
---|
309 | if (theScintillationProcess->IsApplicable(*particle)) { |
---|
310 | pmanager->AddProcess(theScintillationProcess); |
---|
311 | pmanager->SetProcessOrderingToLast(theScintillationProcess, idxAtRest); |
---|
312 | pmanager->SetProcessOrderingToLast(theScintillationProcess, idxPostStep); |
---|
313 | } |
---|
314 | |
---|
315 | if (particleName == "opticalphoton") { |
---|
316 | pmanager->AddDiscreteProcess(theAbsorptionProcess); |
---|
317 | pmanager->AddDiscreteProcess(theRayleighScatteringProcess); |
---|
318 | pmanager->AddDiscreteProcess(theBoundaryProcess); |
---|
319 | } |
---|
320 | } |
---|
321 | }//ConstructOp |
---|
322 | |
---|
323 | //----------------------------------------------------------------------------------------------- |
---|
324 | |
---|
325 | #include "G4Decay.hh" |
---|
326 | |
---|
327 | void ELYSE::PhysicsList::ConstructGeneral() { |
---|
328 | // Add Decay Process |
---|
329 | G4Decay* theDecayProcess = new G4Decay(); |
---|
330 | theParticleIterator->reset(); |
---|
331 | while( (*theParticleIterator)() ){ |
---|
332 | G4ParticleDefinition* particle = theParticleIterator->value(); |
---|
333 | G4ProcessManager* pmanager = particle->GetProcessManager(); |
---|
334 | if (theDecayProcess->IsApplicable(*particle)) { |
---|
335 | pmanager ->AddProcess(theDecayProcess); |
---|
336 | // set ordering for PostStepDoIt and AtRestDoIt |
---|
337 | pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep); |
---|
338 | pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest); |
---|
339 | } |
---|
340 | } |
---|
341 | }//ConstructGeneral |
---|
342 | |
---|
343 | //----------------------------------------------------------------------------------------------- |
---|
344 | |
---|
345 | // Elastic processes: |
---|
346 | #include "G4HadronElasticProcess.hh" |
---|
347 | |
---|
348 | // Inelastic processes: |
---|
349 | #include "G4PionPlusInelasticProcess.hh" |
---|
350 | #include "G4PionMinusInelasticProcess.hh" |
---|
351 | #include "G4KaonPlusInelasticProcess.hh" |
---|
352 | #include "G4KaonZeroSInelasticProcess.hh" |
---|
353 | #include "G4KaonZeroLInelasticProcess.hh" |
---|
354 | #include "G4KaonMinusInelasticProcess.hh" |
---|
355 | #include "G4ProtonInelasticProcess.hh" |
---|
356 | #include "G4AntiProtonInelasticProcess.hh" |
---|
357 | #include "G4NeutronInelasticProcess.hh" |
---|
358 | #include "G4AntiNeutronInelasticProcess.hh" |
---|
359 | #include "G4DeuteronInelasticProcess.hh" |
---|
360 | #include "G4TritonInelasticProcess.hh" |
---|
361 | #include "G4AlphaInelasticProcess.hh" |
---|
362 | |
---|
363 | // Low-energy Models: < 20GeV |
---|
364 | #include "G4LElastic.hh" |
---|
365 | #include "G4LEPionPlusInelastic.hh" |
---|
366 | #include "G4LEPionMinusInelastic.hh" |
---|
367 | #include "G4LEKaonPlusInelastic.hh" |
---|
368 | #include "G4LEKaonZeroSInelastic.hh" |
---|
369 | #include "G4LEKaonZeroLInelastic.hh" |
---|
370 | #include "G4LEKaonMinusInelastic.hh" |
---|
371 | #include "G4LEProtonInelastic.hh" |
---|
372 | #include "G4LEAntiProtonInelastic.hh" |
---|
373 | #include "G4LENeutronInelastic.hh" |
---|
374 | #include "G4LEAntiNeutronInelastic.hh" |
---|
375 | #include "G4LEDeuteronInelastic.hh" |
---|
376 | #include "G4LETritonInelastic.hh" |
---|
377 | #include "G4LEAlphaInelastic.hh" |
---|
378 | |
---|
379 | // High-energy Models: >20 GeV |
---|
380 | #include "G4HEPionPlusInelastic.hh" |
---|
381 | #include "G4HEPionMinusInelastic.hh" |
---|
382 | #include "G4HEKaonPlusInelastic.hh" |
---|
383 | #include "G4HEKaonZeroInelastic.hh" |
---|
384 | #include "G4HEKaonZeroInelastic.hh" |
---|
385 | #include "G4HEKaonMinusInelastic.hh" |
---|
386 | #include "G4HEProtonInelastic.hh" |
---|
387 | #include "G4HEAntiProtonInelastic.hh" |
---|
388 | #include "G4HENeutronInelastic.hh" |
---|
389 | #include "G4HEAntiNeutronInelastic.hh" |
---|
390 | |
---|
391 | // Neutron high-precision models: <20 MeV |
---|
392 | #include "G4NeutronHPElastic.hh" |
---|
393 | #include "G4NeutronHPElasticData.hh" |
---|
394 | #include "G4NeutronHPCapture.hh" |
---|
395 | #include "G4NeutronHPCaptureData.hh" |
---|
396 | #include "G4NeutronHPInelastic.hh" |
---|
397 | #include "G4NeutronHPInelasticData.hh" |
---|
398 | #include "G4LCapture.hh" |
---|
399 | |
---|
400 | // Secondary hadronic interaction models |
---|
401 | #include "G4CascadeInterface.hh" |
---|
402 | #include "G4BinaryCascade.hh" |
---|
403 | |
---|
404 | // Stopping processes |
---|
405 | #include "G4PiMinusAbsorptionAtRest.hh" |
---|
406 | #include "G4KaonMinusAbsorptionAtRest.hh" |
---|
407 | #include "G4AntiProtonAnnihilationAtRest.hh" |
---|
408 | #include "G4AntiNeutronAnnihilationAtRest.hh" |
---|
409 | |
---|
410 | void ELYSE::PhysicsList::ConstructHad() { |
---|
411 | |
---|
412 | // This code stolen from: |
---|
413 | // examples/advanced/underground_physics/src/DMXPhysicsList.cc |
---|
414 | // CWW 2/23/05 |
---|
415 | // |
---|
416 | |
---|
417 | G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess; |
---|
418 | G4LElastic* theElasticModel = new G4LElastic; |
---|
419 | theElasticProcess->RegisterMe(theElasticModel); |
---|
420 | |
---|
421 | theParticleIterator->reset(); |
---|
422 | while ((*theParticleIterator)()) |
---|
423 | { |
---|
424 | G4ParticleDefinition* particle = theParticleIterator->value(); |
---|
425 | G4ProcessManager* pmanager = particle->GetProcessManager(); |
---|
426 | G4String particleName = particle->GetParticleName(); |
---|
427 | |
---|
428 | if (particleName == "pi+") |
---|
429 | { |
---|
430 | pmanager->AddDiscreteProcess(theElasticProcess); |
---|
431 | G4PionPlusInelasticProcess* theInelasticProcess = |
---|
432 | new G4PionPlusInelasticProcess(); |
---|
433 | G4LEPionPlusInelastic* theLEInelasticModel = |
---|
434 | new G4LEPionPlusInelastic; |
---|
435 | theInelasticProcess->RegisterMe(theLEInelasticModel); |
---|
436 | G4HEPionPlusInelastic* theHEInelasticModel = |
---|
437 | new G4HEPionPlusInelastic; |
---|
438 | theInelasticProcess->RegisterMe(theHEInelasticModel); |
---|
439 | pmanager->AddDiscreteProcess(theInelasticProcess); |
---|
440 | } |
---|
441 | |
---|
442 | else if (particleName == "pi-") |
---|
443 | { |
---|
444 | pmanager->AddDiscreteProcess(theElasticProcess); |
---|
445 | G4PionMinusInelasticProcess* theInelasticProcess = |
---|
446 | new G4PionMinusInelasticProcess(); |
---|
447 | G4LEPionMinusInelastic* theLEInelasticModel = |
---|
448 | new G4LEPionMinusInelastic; |
---|
449 | theInelasticProcess->RegisterMe(theLEInelasticModel); |
---|
450 | G4HEPionMinusInelastic* theHEInelasticModel = |
---|
451 | new G4HEPionMinusInelastic; |
---|
452 | theInelasticProcess->RegisterMe(theHEInelasticModel); |
---|
453 | pmanager->AddDiscreteProcess(theInelasticProcess); |
---|
454 | G4String prcNam; |
---|
455 | pmanager->AddRestProcess(new G4PiMinusAbsorptionAtRest, ordDefault); |
---|
456 | } |
---|
457 | |
---|
458 | else if (particleName == "kaon+") |
---|
459 | { |
---|
460 | pmanager->AddDiscreteProcess(theElasticProcess); |
---|
461 | G4KaonPlusInelasticProcess* theInelasticProcess = |
---|
462 | new G4KaonPlusInelasticProcess(); |
---|
463 | G4LEKaonPlusInelastic* theLEInelasticModel = |
---|
464 | new G4LEKaonPlusInelastic; |
---|
465 | theInelasticProcess->RegisterMe(theLEInelasticModel); |
---|
466 | G4HEKaonPlusInelastic* theHEInelasticModel = |
---|
467 | new G4HEKaonPlusInelastic; |
---|
468 | theInelasticProcess->RegisterMe(theHEInelasticModel); |
---|
469 | pmanager->AddDiscreteProcess(theInelasticProcess); |
---|
470 | } |
---|
471 | |
---|
472 | else if (particleName == "kaon0S") |
---|
473 | { |
---|
474 | pmanager->AddDiscreteProcess(theElasticProcess); |
---|
475 | G4KaonZeroSInelasticProcess* theInelasticProcess = |
---|
476 | new G4KaonZeroSInelasticProcess(); |
---|
477 | G4LEKaonZeroSInelastic* theLEInelasticModel = |
---|
478 | new G4LEKaonZeroSInelastic; |
---|
479 | theInelasticProcess->RegisterMe(theLEInelasticModel); |
---|
480 | G4HEKaonZeroInelastic* theHEInelasticModel = |
---|
481 | new G4HEKaonZeroInelastic; |
---|
482 | theInelasticProcess->RegisterMe(theHEInelasticModel); |
---|
483 | pmanager->AddDiscreteProcess(theInelasticProcess); |
---|
484 | } |
---|
485 | |
---|
486 | else if (particleName == "kaon0L") |
---|
487 | { |
---|
488 | pmanager->AddDiscreteProcess(theElasticProcess); |
---|
489 | G4KaonZeroLInelasticProcess* theInelasticProcess = |
---|
490 | new G4KaonZeroLInelasticProcess(); |
---|
491 | G4LEKaonZeroLInelastic* theLEInelasticModel = |
---|
492 | new G4LEKaonZeroLInelastic; |
---|
493 | theInelasticProcess->RegisterMe(theLEInelasticModel); |
---|
494 | G4HEKaonZeroInelastic* theHEInelasticModel = |
---|
495 | new G4HEKaonZeroInelastic; |
---|
496 | theInelasticProcess->RegisterMe(theHEInelasticModel); |
---|
497 | pmanager->AddDiscreteProcess(theInelasticProcess); |
---|
498 | } |
---|
499 | |
---|
500 | else if (particleName == "kaon-") |
---|
501 | { |
---|
502 | pmanager->AddDiscreteProcess(theElasticProcess); |
---|
503 | G4KaonMinusInelasticProcess* theInelasticProcess = |
---|
504 | new G4KaonMinusInelasticProcess(); |
---|
505 | G4LEKaonMinusInelastic* theLEInelasticModel = |
---|
506 | new G4LEKaonMinusInelastic; |
---|
507 | theInelasticProcess->RegisterMe(theLEInelasticModel); |
---|
508 | G4HEKaonMinusInelastic* theHEInelasticModel = |
---|
509 | new G4HEKaonMinusInelastic; |
---|
510 | theInelasticProcess->RegisterMe(theHEInelasticModel); |
---|
511 | pmanager->AddDiscreteProcess(theInelasticProcess); |
---|
512 | pmanager->AddRestProcess(new G4KaonMinusAbsorptionAtRest, ordDefault); |
---|
513 | } |
---|
514 | |
---|
515 | else if (particleName == "proton") |
---|
516 | { |
---|
517 | pmanager->AddDiscreteProcess(theElasticProcess); |
---|
518 | G4ProtonInelasticProcess* theInelasticProcess = |
---|
519 | new G4ProtonInelasticProcess(); |
---|
520 | |
---|
521 | |
---|
522 | //JEC 12/2/07 USE ONE SPECIFIC hadronic model... |
---|
523 | // if (gheishahad) { |
---|
524 | G4LEProtonInelastic* theLEInelasticModel = new G4LEProtonInelastic; |
---|
525 | theInelasticProcess->RegisterMe(theLEInelasticModel); |
---|
526 | // } |
---|
527 | // else if (bertinihad) { |
---|
528 | // G4CascadeInterface* theBertiniModel = new G4CascadeInterface; |
---|
529 | // theInelasticProcess->RegisterMe(theBertiniModel); |
---|
530 | // } |
---|
531 | // else if (binaryhad) { |
---|
532 | // G4BinaryCascade* theBinaryModel = new G4BinaryCascade(); |
---|
533 | // theInelasticProcess->RegisterMe(theBinaryModel); |
---|
534 | // } |
---|
535 | // else { |
---|
536 | // G4cout << "No secondary interaction model chosen! Using G4 BINARY." << G4endl; |
---|
537 | // G4BinaryCascade* theBinaryModel = new G4BinaryCascade(); |
---|
538 | // theInelasticProcess->RegisterMe(theBinaryModel); |
---|
539 | // } |
---|
540 | |
---|
541 | G4HEProtonInelastic* theHEInelasticModel = new G4HEProtonInelastic; |
---|
542 | theInelasticProcess->RegisterMe(theHEInelasticModel); |
---|
543 | pmanager->AddDiscreteProcess(theInelasticProcess); |
---|
544 | } |
---|
545 | |
---|
546 | else if (particleName == "anti_proton") |
---|
547 | { |
---|
548 | pmanager->AddDiscreteProcess(theElasticProcess); |
---|
549 | G4AntiProtonInelasticProcess* theInelasticProcess = |
---|
550 | new G4AntiProtonInelasticProcess(); |
---|
551 | G4LEAntiProtonInelastic* theLEInelasticModel = |
---|
552 | new G4LEAntiProtonInelastic; |
---|
553 | theInelasticProcess->RegisterMe(theLEInelasticModel); |
---|
554 | G4HEAntiProtonInelastic* theHEInelasticModel = |
---|
555 | new G4HEAntiProtonInelastic; |
---|
556 | theInelasticProcess->RegisterMe(theHEInelasticModel); |
---|
557 | pmanager->AddDiscreteProcess(theInelasticProcess); |
---|
558 | } |
---|
559 | |
---|
560 | else if (particleName == "neutron") |
---|
561 | { |
---|
562 | // elastic scattering |
---|
563 | G4HadronElasticProcess* theNeutronElasticProcess = |
---|
564 | new G4HadronElasticProcess; |
---|
565 | G4LElastic* theElasticModel1 = new G4LElastic; |
---|
566 | G4NeutronHPElastic * theElasticNeutron = new G4NeutronHPElastic; |
---|
567 | theNeutronElasticProcess->RegisterMe(theElasticModel1); |
---|
568 | theElasticModel1->SetMinEnergy(19*MeV); |
---|
569 | theNeutronElasticProcess->RegisterMe(theElasticNeutron); |
---|
570 | G4NeutronHPElasticData * theNeutronData = new G4NeutronHPElasticData; |
---|
571 | theNeutronElasticProcess->AddDataSet(theNeutronData); |
---|
572 | pmanager->AddDiscreteProcess(theNeutronElasticProcess); |
---|
573 | |
---|
574 | // inelastic scattering |
---|
575 | G4NeutronInelasticProcess* theInelasticProcess = |
---|
576 | new G4NeutronInelasticProcess(); |
---|
577 | |
---|
578 | //JEC 12/2/07 USE ONE SPECIFIC hadronic model... |
---|
579 | // if (gheishahad) { |
---|
580 | G4LENeutronInelastic* theInelasticModel = new G4LENeutronInelastic; |
---|
581 | theInelasticModel->SetMinEnergy(19*MeV); |
---|
582 | theInelasticProcess->RegisterMe(theInelasticModel); |
---|
583 | // } |
---|
584 | // else if (bertinihad) { |
---|
585 | // G4CascadeInterface* theBertiniModel = new G4CascadeInterface; |
---|
586 | // theBertiniModel->SetMinEnergy(19*MeV); |
---|
587 | // theInelasticProcess->RegisterMe(theBertiniModel); |
---|
588 | // } |
---|
589 | // else if (binaryhad) { |
---|
590 | // G4BinaryCascade* theBinaryModel = new G4BinaryCascade(); |
---|
591 | // theBinaryModel->SetMinEnergy(19*MeV); |
---|
592 | // theInelasticProcess->RegisterMe(theBinaryModel); |
---|
593 | // } |
---|
594 | // else { |
---|
595 | // G4cout << "No secondary interaction model chosen! Using G4 BINARY." << G4endl; |
---|
596 | // G4BinaryCascade* theBinaryModel = new G4BinaryCascade(); |
---|
597 | // theBinaryModel->SetMinEnergy(19*MeV); |
---|
598 | // theInelasticProcess->RegisterMe(theBinaryModel); |
---|
599 | // } |
---|
600 | |
---|
601 | G4HENeutronInelastic* theHEInelasticModel = new G4HENeutronInelastic; |
---|
602 | theInelasticProcess->RegisterMe(theHEInelasticModel); |
---|
603 | |
---|
604 | G4NeutronHPInelastic * theLENeutronInelasticModel = |
---|
605 | new G4NeutronHPInelastic; |
---|
606 | theInelasticProcess->RegisterMe(theLENeutronInelasticModel); |
---|
607 | |
---|
608 | G4NeutronHPInelasticData * theNeutronData1 = |
---|
609 | new G4NeutronHPInelasticData; |
---|
610 | theInelasticProcess->AddDataSet(theNeutronData1); |
---|
611 | pmanager->AddDiscreteProcess(theInelasticProcess); |
---|
612 | |
---|
613 | // capture |
---|
614 | G4HadronCaptureProcess* theCaptureProcess = |
---|
615 | new G4HadronCaptureProcess; |
---|
616 | G4LCapture* theCaptureModel = new G4LCapture; |
---|
617 | theCaptureModel->SetMinEnergy(19*MeV); |
---|
618 | theCaptureProcess->RegisterMe(theCaptureModel); |
---|
619 | G4NeutronHPCapture * theLENeutronCaptureModel = new G4NeutronHPCapture; |
---|
620 | theCaptureProcess->RegisterMe(theLENeutronCaptureModel); |
---|
621 | G4NeutronHPCaptureData * theNeutronData3 = new G4NeutronHPCaptureData; |
---|
622 | theCaptureProcess->AddDataSet(theNeutronData3); |
---|
623 | pmanager->AddDiscreteProcess(theCaptureProcess); |
---|
624 | // G4ProcessManager* pmanager = G4Neutron::Neutron->GetProcessManager(); |
---|
625 | // pmanager->AddProcess(new G4UserSpecialCuts(),-1,-1,1); |
---|
626 | } |
---|
627 | |
---|
628 | else if (particleName == "anti_neutron") |
---|
629 | { |
---|
630 | pmanager->AddDiscreteProcess(theElasticProcess); |
---|
631 | G4AntiNeutronInelasticProcess* theInelasticProcess = |
---|
632 | new G4AntiNeutronInelasticProcess(); |
---|
633 | G4LEAntiNeutronInelastic* theLEInelasticModel = |
---|
634 | new G4LEAntiNeutronInelastic; |
---|
635 | theInelasticProcess->RegisterMe(theLEInelasticModel); |
---|
636 | G4HEAntiNeutronInelastic* theHEInelasticModel = |
---|
637 | new G4HEAntiNeutronInelastic; |
---|
638 | theInelasticProcess->RegisterMe(theHEInelasticModel); |
---|
639 | pmanager->AddDiscreteProcess(theInelasticProcess); |
---|
640 | } |
---|
641 | |
---|
642 | else if (particleName == "deuteron") |
---|
643 | { |
---|
644 | pmanager->AddDiscreteProcess(theElasticProcess); |
---|
645 | G4DeuteronInelasticProcess* theInelasticProcess = |
---|
646 | new G4DeuteronInelasticProcess(); |
---|
647 | G4LEDeuteronInelastic* theLEInelasticModel = |
---|
648 | new G4LEDeuteronInelastic; |
---|
649 | theInelasticProcess->RegisterMe(theLEInelasticModel); |
---|
650 | pmanager->AddDiscreteProcess(theInelasticProcess); |
---|
651 | } |
---|
652 | |
---|
653 | else if (particleName == "triton") |
---|
654 | { |
---|
655 | pmanager->AddDiscreteProcess(theElasticProcess); |
---|
656 | G4TritonInelasticProcess* theInelasticProcess = |
---|
657 | new G4TritonInelasticProcess(); |
---|
658 | G4LETritonInelastic* theLEInelasticModel = |
---|
659 | new G4LETritonInelastic; |
---|
660 | theInelasticProcess->RegisterMe(theLEInelasticModel); |
---|
661 | pmanager->AddDiscreteProcess(theInelasticProcess); |
---|
662 | } |
---|
663 | |
---|
664 | else if (particleName == "alpha") |
---|
665 | { |
---|
666 | pmanager->AddDiscreteProcess(theElasticProcess); |
---|
667 | G4AlphaInelasticProcess* theInelasticProcess = |
---|
668 | new G4AlphaInelasticProcess(); |
---|
669 | G4LEAlphaInelastic* theLEInelasticModel = |
---|
670 | new G4LEAlphaInelastic; |
---|
671 | theInelasticProcess->RegisterMe(theLEInelasticModel); |
---|
672 | pmanager->AddDiscreteProcess(theInelasticProcess); |
---|
673 | } |
---|
674 | |
---|
675 | } |
---|
676 | }//ConstructHad |
---|
677 | |
---|
678 | //----------------------------------------------------------------------------------------------- |
---|
679 | |
---|
680 | void ELYSE::PhysicsList::SetCuts() { |
---|
681 | if (verboseLevel >0){ |
---|
682 | G4cout << "PhysicsList::SetCuts:"; |
---|
683 | G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl; |
---|
684 | } |
---|
685 | |
---|
686 | // set cut values for gamma at first and for e- second and next for e+, |
---|
687 | // because some processes for e+/e- need cut values for gamma |
---|
688 | // |
---|
689 | SetCutValue(defaultCutValue, "gamma"); |
---|
690 | SetCutValue(defaultCutValue, "e-"); |
---|
691 | SetCutValue(defaultCutValue, "e+"); |
---|
692 | |
---|
693 | if (verboseLevel>0) DumpCutValuesTable(); |
---|
694 | }//SetCuts |
---|
695 | |
---|
696 | |
---|
697 | //------------------------------------------------------------------- |
---|
698 | void ELYSE::PhysicsList::SetVerbose(G4int verbose) |
---|
699 | { |
---|
700 | theCerenkovProcess->SetVerboseLevel(verbose); |
---|
701 | theScintillationProcess->SetVerboseLevel(verbose); |
---|
702 | theAbsorptionProcess->SetVerboseLevel(verbose); |
---|
703 | theRayleighScatteringProcess->SetVerboseLevel(verbose); |
---|
704 | theBoundaryProcess->SetVerboseLevel(verbose); |
---|
705 | |
---|
706 | |
---|
707 | }//SetVerbose |
---|
708 | //------------------------------------------------------------------- |
---|
709 | |
---|
710 | //------------------------------------------------------------------- |
---|
711 | void ELYSE::PhysicsList::SetNbOfPhotonsCerenkov(G4int MaxNumber) |
---|
712 | { |
---|
713 | theCerenkovProcess->SetMaxNumPhotonsPerStep(MaxNumber); |
---|
714 | }//SetNbOfPhotonsCerenkov |
---|
715 | //------------------------------------------------------------------- |
---|