source: trunk/examples/novice/gemc/src/HadronPhysics.cc @ 1309

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

update

File size: 13.0 KB
Line 
1#include "HadronPhysics.h"
2#include "G4MesonConstructor.hh"
3#include "G4LeptonConstructor.hh"
4#include "G4BaryonConstructor.hh"
5#include "G4ShortLivedConstructor.hh"
6#include "G4IonConstructor.hh"
7
8// processes
9#include "G4ProcessManager.hh"
10#include "G4HadronElasticProcess.hh"
11#include "G4PionPlusInelasticProcess.hh"
12#include "G4PionMinusInelasticProcess.hh"
13#include "G4KaonPlusInelasticProcess.hh"
14#include "G4KaonMinusInelasticProcess.hh"
15#include "G4KaonZeroLInelasticProcess.hh"
16#include "G4KaonZeroSInelasticProcess.hh"
17#include "G4ProtonInelasticProcess.hh"
18#include "G4NeutronInelasticProcess.hh"
19#include "G4HadronFissionProcess.hh"
20#include "G4HadronCaptureProcess.hh"
21#include "G4AntiProtonInelasticProcess.hh"
22#include "G4AntiNeutronInelasticProcess.hh"
23#include "G4LambdaInelasticProcess.hh"
24#include "G4AntiLambdaInelasticProcess.hh"
25#include "G4SigmaPlusInelasticProcess.hh"
26#include "G4SigmaMinusInelasticProcess.hh"
27#include "G4AntiSigmaPlusInelasticProcess.hh"
28#include "G4AntiSigmaMinusInelasticProcess.hh"
29#include "G4PionMinusAbsorptionAtRest.hh"
30#include "G4KaonMinusAbsorption.hh"
31#include "G4AntiProtonAnnihilationAtRest.hh"
32#include "G4AntiNeutronAnnihilationAtRest.hh"
33
34// Lepton nuclear interations
35#include "G4PhotoNuclearProcess.hh"
36#include "G4GammaNuclearReaction.hh"
37#include "G4ElectroNuclearReaction.hh"
38#include "G4ElectronNuclearProcess.hh"
39
40
41// cross sections
42#include "G4PiNuclearCrossSection.hh"
43#include "G4ProtonInelasticCrossSection.hh"
44#include "G4NeutronInelasticCrossSection.hh"
45
46// models
47#include "G4LElastic.hh"
48#include "G4CascadeInterface.hh"
49#include "G4LEPionPlusInelastic.hh"
50#include "G4LEPionMinusInelastic.hh"
51#include "G4LEKaonPlusInelastic.hh"
52#include "G4LEKaonMinusInelastic.hh"
53#include "G4LEKaonZeroLInelastic.hh"
54#include "G4LEKaonZeroSInelastic.hh"
55#include "G4LEProtonInelastic.hh"
56#include "G4LENeutronInelastic.hh"
57#include "G4LFission.hh"
58#include "G4LCapture.hh"
59#include "G4LEAntiProtonInelastic.hh"
60#include "G4LEAntiNeutronInelastic.hh"
61#include "G4LELambdaInelastic.hh"
62#include "G4LEAntiLambdaInelastic.hh"
63#include "G4LESigmaPlusInelastic.hh"
64#include "G4LESigmaMinusInelastic.hh"
65#include "G4LEAntiSigmaPlusInelastic.hh"
66#include "G4LEAntiSigmaMinusInelastic.hh"
67
68
69HadronPhysics::HadronPhysics(gemc_opts Opt):G4VPhysicsConstructor("Hadron Physics")
70{
71 gemcOpt = Opt;
72}
73HadronPhysics::~HadronPhysics(){;}
74
75void HadronPhysics::ConstructParticle()
76{
77  //  Construct all mesons
78  G4MesonConstructor pMesonConstructor;
79  pMesonConstructor.ConstructParticle();
80
81  //  Construct all leptons
82  G4LeptonConstructor pLeptonConstructor;
83  pLeptonConstructor.ConstructParticle();
84
85  //  Construct all baryons
86  G4BaryonConstructor pBaryonConstructor;
87  pBaryonConstructor.ConstructParticle();
88
89  //  Construct  resonaces and quarks
90  G4ShortLivedConstructor pShortLivedConstructor;
91  pShortLivedConstructor.ConstructParticle();
92
93  // Construct light ions (d, t, 3He, alpha, and generic ion)
94  G4IonConstructor ionConstruct;
95  ionConstruct.ConstructParticle();
96}
97
98
99void HadronPhysics::ConstructProcess()
100{
101 string hd_msg = gemcOpt.args["LOG_MSG"].args + " Hadron Physics List: <<< ";
102 double   PHY_VERBOSITY = gemcOpt.args["PHY_VERBOSITY"].arg ;
103 cout << hd_msg << " Building Hadron Physics Processes " << endl;
104
105 // Hadronic Elastic Process and Model (the same for all hadrons)
106 G4HadronElasticProcess* elasticProcess = new G4HadronElasticProcess();
107 G4LElastic* elasticModel = new G4LElastic();
108 elasticProcess->RegisterMe(elasticModel);
109
110 // %%%%%%%%%%%%%%%%%%%%%%%%%
111 // Hadronic inelastic models
112 // %%%%%%%%%%%%%%%%%%%%%%%%%
113
114 // Bertini cascade model: use for p,n,pi+,pi- between 0 and 9.9 GeV
115 G4CascadeInterface* bertiniModel = new G4CascadeInterface();
116 bertiniModel->SetMaxEnergy(9.9*GeV);
117
118 // Low energy parameterized models : use between 9.5 and 25 GeV
119 G4double LEPUpperLimit = 25*GeV;
120 G4double LEPpnpiLimit = 9.5*GeV;
121
122 G4LEKaonZeroLInelastic* LEPk0LModel = new G4LEKaonZeroLInelastic();
123 LEPk0LModel->SetMaxEnergy(LEPUpperLimit);
124
125 G4LEKaonZeroSInelastic* LEPk0SModel = new G4LEKaonZeroSInelastic();
126 LEPk0SModel->SetMaxEnergy(LEPUpperLimit);
127
128
129 G4ProcessManager * pmanager = 0;
130
131
132 // Add Hadron Elastic Processes to all hadrons
133 theParticleIterator->reset();
134 while( (*theParticleIterator)() )
135 {
136    G4ParticleDefinition* particle = theParticleIterator->value();
137    pmanager = particle->GetProcessManager();
138    string                pname    = particle->GetParticleName();
139    if (elasticProcess->IsApplicable(*particle))
140    {
141       if(PHY_VERBOSITY > 2) cout << hd_msg << " Adding Hadron Elastic Process for " << pname << endl;
142       pmanager->AddDiscreteProcess(elasticProcess);
143    }
144 }
145
146
147 // Adding inelastic nuclear scattering to leptons
148 G4PhotoNuclearProcess*  thePhotoNuclearProcess    = new G4PhotoNuclearProcess;
149 G4GammaNuclearReaction* theGammaReaction          = new G4GammaNuclearReaction;
150 theGammaReaction->SetMaxEnergy(10*GeV);
151 thePhotoNuclearProcess->RegisterMe(theGammaReaction);
152
153 G4ElectronNuclearProcess* theElectronNuclearProcess = new G4ElectronNuclearProcess;
154 G4ElectroNuclearReaction* theElectroReaction        = new G4ElectroNuclearReaction;
155 theElectroReaction->SetMaxEnergy(10*GeV);
156 theElectronNuclearProcess->RegisterMe(theElectroReaction);
157
158 theParticleIterator->reset();
159 while( (*theParticleIterator)() )
160 {
161    G4ParticleDefinition* particle = theParticleIterator->value();
162    pmanager = particle->GetProcessManager();
163    string                pname    = particle->GetParticleName();
164    if (pname == "gamma")
165    {
166       if(PHY_VERBOSITY > 2) cout << hd_msg << " Gamma: inelastic nuclear scattering" << endl;
167       pmanager->AddDiscreteProcess(thePhotoNuclearProcess);
168    }
169    else if (pname == "e-")
170    {
171       if(PHY_VERBOSITY > 2) cout << hd_msg << " Electron: inelastic nuclear scattering" << endl;
172       pmanager->AddDiscreteProcess(thePhotoNuclearProcess);
173
174    }
175    else if (pname == "e+")
176    {
177       if(PHY_VERBOSITY > 2) cout << hd_msg << " Positron: inelastic nuclear scattering" << endl;
178       pmanager->AddDiscreteProcess(thePhotoNuclearProcess);
179
180    }
181
182 }
183
184
185
186
187
188
189
190 //  pi+ physics  //
191 pmanager = G4PionPlus::PionPlus()->GetProcessManager();
192
193 G4PionPlusInelasticProcess* pipinelProc = new G4PionPlusInelasticProcess();
194 G4PiNuclearCrossSection* pion_XC = new G4PiNuclearCrossSection();
195 pipinelProc->AddDataSet(pion_XC);
196 pipinelProc->RegisterMe(bertiniModel);
197
198 G4LEPionPlusInelastic* LEPpipModel = new G4LEPionPlusInelastic();
199 LEPpipModel->SetMinEnergy(LEPpnpiLimit);
200 LEPpipModel->SetMaxEnergy(LEPUpperLimit);
201 pipinelProc->RegisterMe(LEPpipModel);
202
203 pmanager->AddDiscreteProcess(pipinelProc);
204
205 //  pi- physics  //
206 pmanager = G4PionMinus::PionMinus()->GetProcessManager();
207
208 G4PionMinusInelasticProcess* piminelProc = new G4PionMinusInelasticProcess();
209 piminelProc->AddDataSet(pion_XC);
210 piminelProc->RegisterMe(bertiniModel);
211
212 G4LEPionMinusInelastic* LEPpimModel = new G4LEPionMinusInelastic();
213 LEPpimModel->SetMinEnergy(LEPpnpiLimit);
214 LEPpimModel->SetMaxEnergy(LEPUpperLimit);
215 piminelProc->RegisterMe(LEPpimModel);
216
217  pmanager->AddDiscreteProcess(piminelProc);
218
219 // pi- absorption at rest
220 G4PionMinusAbsorptionAtRest* pimAbsorb = new G4PionMinusAbsorptionAtRest();
221 pmanager->AddRestProcess(pimAbsorb);
222
223 //  K+ physics   //
224 pmanager = G4KaonPlus::KaonPlus()->GetProcessManager();
225
226 G4KaonPlusInelasticProcess* kpinelProc = new G4KaonPlusInelasticProcess();
227 G4LEKaonPlusInelastic* LEPkpModel = new G4LEKaonPlusInelastic();
228 LEPkpModel->SetMaxEnergy(LEPUpperLimit);
229 kpinelProc->RegisterMe(LEPkpModel);
230 pmanager->AddDiscreteProcess(kpinelProc);
231
232 //  K- physics   //
233 pmanager = G4KaonMinus::KaonMinus()->GetProcessManager();
234
235 G4KaonMinusInelasticProcess* kminelProc = new G4KaonMinusInelasticProcess();
236 G4LEKaonMinusInelastic* LEPkmModel = new G4LEKaonMinusInelastic();
237 LEPkmModel->SetMaxEnergy(LEPUpperLimit);
238 kminelProc->RegisterMe(LEPkmModel);
239 pmanager->AddDiscreteProcess(kminelProc);
240
241 // K- absorption at rest
242 G4KaonMinusAbsorption* kmAbsorb = new G4KaonMinusAbsorption();
243 pmanager->AddRestProcess(kmAbsorb);
244
245 //  K0L physics  //
246 pmanager = G4KaonZeroLong::KaonZeroLong()->GetProcessManager();
247
248 G4KaonZeroLInelasticProcess* k0LinelProc = new G4KaonZeroLInelasticProcess();
249 k0LinelProc->RegisterMe(LEPk0LModel);
250 pmanager->AddDiscreteProcess(k0LinelProc);
251
252 //  K0S physics  //
253 pmanager = G4KaonZeroShort::KaonZeroShort()->GetProcessManager();
254
255 G4KaonZeroSInelasticProcess* k0SinelProc = new G4KaonZeroSInelasticProcess();
256 k0SinelProc->RegisterMe(LEPk0SModel);
257 pmanager->AddDiscreteProcess(k0SinelProc);
258
259 //    Proton     //
260 pmanager = G4Proton::Proton()->GetProcessManager();
261
262 G4ProtonInelasticProcess* pinelProc = new G4ProtonInelasticProcess();
263 G4ProtonInelasticCrossSection* proton_XC = new G4ProtonInelasticCrossSection();
264 pinelProc->AddDataSet(proton_XC);
265 pinelProc->RegisterMe(bertiniModel);
266
267 G4LEProtonInelastic* LEPpModel = new G4LEProtonInelastic();
268 LEPpModel->SetMinEnergy(LEPpnpiLimit);
269 LEPpModel->SetMaxEnergy(LEPUpperLimit);
270 pinelProc->RegisterMe(LEPpModel);
271
272 pmanager->AddDiscreteProcess(pinelProc);
273
274 //  Anti-Proton  //
275 pmanager = G4AntiProton::AntiProton()->GetProcessManager();
276
277 G4AntiProtonInelasticProcess* apinelProc = new G4AntiProtonInelasticProcess();
278 G4LEAntiProtonInelastic* LEPapModel = new G4LEAntiProtonInelastic();
279 apinelProc->RegisterMe(LEPapModel);
280 pmanager->AddDiscreteProcess(apinelProc);
281
282 // anti-proton annihilation at rest
283 G4AntiProtonAnnihilationAtRest* apAnnihil = new G4AntiProtonAnnihilationAtRest();
284 pmanager->AddRestProcess(apAnnihil);
285
286 //    Neutron    //
287 pmanager = G4Neutron::Neutron()->GetProcessManager();
288
289 // hadron elastic
290 pmanager->AddDiscreteProcess(elasticProcess);
291
292 // hadron inelastic
293 G4NeutronInelasticProcess* ninelProc = new G4NeutronInelasticProcess();
294 G4NeutronInelasticCrossSection* neutron_XC = 
295                                   new G4NeutronInelasticCrossSection();
296 ninelProc->AddDataSet(neutron_XC);
297 ninelProc->RegisterMe(bertiniModel);
298
299 G4LENeutronInelastic* LEPnModel = new G4LENeutronInelastic();
300 LEPnModel->SetMinEnergy(LEPpnpiLimit);
301 LEPnModel->SetMaxEnergy(LEPUpperLimit);
302 ninelProc->RegisterMe(LEPnModel);
303
304 pmanager->AddDiscreteProcess(ninelProc);
305
306 // neutron-induced fission
307 G4HadronFissionProcess* neutronFission = new G4HadronFissionProcess();
308 G4LFission* neutronFissionModel = new G4LFission();
309 neutronFissionModel->SetMinEnergy(0.);
310 neutronFissionModel->SetMaxEnergy(20*TeV);
311 neutronFission->RegisterMe(neutronFissionModel);
312 pmanager->AddDiscreteProcess(neutronFission);
313
314 // neutron capture
315 G4HadronCaptureProcess* neutronCapture = new G4HadronCaptureProcess();
316 G4LCapture* neutronCaptureModel = new G4LCapture();
317 neutronCaptureModel->SetMinEnergy(0.);
318 neutronCaptureModel->SetMaxEnergy(20*TeV);
319 neutronCapture->RegisterMe(neutronCaptureModel);
320 pmanager->AddDiscreteProcess(neutronCapture);
321
322 // Anti-Neutron  //
323 pmanager = G4AntiNeutron::AntiNeutron()->GetProcessManager();
324
325 G4AntiNeutronInelasticProcess* aninelProc = new G4AntiNeutronInelasticProcess();
326 G4LEAntiNeutronInelastic* LEPanModel = new G4LEAntiNeutronInelastic(); 
327 aninelProc->RegisterMe(LEPanModel);
328 pmanager->AddDiscreteProcess(aninelProc);
329
330 // anti-neutron annihilation at rest
331 G4AntiNeutronAnnihilationAtRest* anAnnihil = new G4AntiNeutronAnnihilationAtRest();
332 pmanager->AddRestProcess(anAnnihil);
333
334 //    Lambda     //
335 pmanager = G4Lambda::Lambda()->GetProcessManager();
336
337 G4LambdaInelasticProcess* linelProc = new G4LambdaInelasticProcess();
338 G4LELambdaInelastic* LEPlModel = new G4LELambdaInelastic(); 
339 linelProc->RegisterMe(LEPlModel);
340 pmanager->AddDiscreteProcess(linelProc);
341
342 //  Anti-Lambda  //
343 pmanager = G4AntiLambda::AntiLambda()->GetProcessManager();
344
345 G4AntiLambdaInelasticProcess* alinelProc = new G4AntiLambdaInelasticProcess();
346 G4LEAntiLambdaInelastic* LEPalModel = new G4LEAntiLambdaInelastic(); 
347 alinelProc->RegisterMe(LEPalModel);
348 pmanager->AddDiscreteProcess(alinelProc);
349
350 //    Sigma-     //
351 pmanager = G4SigmaMinus::SigmaMinus()->GetProcessManager();
352
353 G4SigmaMinusInelasticProcess* sminelProc = new G4SigmaMinusInelasticProcess();
354 G4LESigmaMinusInelastic* LEPsmModel = new G4LESigmaMinusInelastic(); 
355 sminelProc->RegisterMe(LEPsmModel);
356 pmanager->AddDiscreteProcess(sminelProc);
357
358 //  Anti-Sigma-  //
359 pmanager = G4AntiSigmaMinus::AntiSigmaMinus()->GetProcessManager();
360
361 G4AntiSigmaMinusInelasticProcess* asminelProc = new G4AntiSigmaMinusInelasticProcess();
362 G4LEAntiSigmaMinusInelastic* LEPasmModel = new G4LEAntiSigmaMinusInelastic(); 
363 asminelProc->RegisterMe(LEPasmModel);
364 pmanager->AddDiscreteProcess(asminelProc);
365
366 //    Sigma+     //
367 pmanager = G4SigmaPlus::SigmaPlus()->GetProcessManager();
368
369
370 G4SigmaPlusInelasticProcess* spinelProc = new G4SigmaPlusInelasticProcess();
371 G4LESigmaPlusInelastic* LEPspModel = new G4LESigmaPlusInelastic(); 
372 spinelProc->RegisterMe(LEPspModel);
373 pmanager->AddDiscreteProcess(spinelProc);
374
375 //  Anti-Sigma+  //
376 pmanager = G4AntiSigmaPlus::AntiSigmaPlus()->GetProcessManager();
377
378 G4AntiSigmaPlusInelasticProcess* aspinelProc = new G4AntiSigmaPlusInelasticProcess();
379 G4LEAntiSigmaPlusInelastic* LEPaspModel = new G4LEAntiSigmaPlusInelastic();
380 aspinelProc->RegisterMe(LEPaspModel);
381 pmanager->AddDiscreteProcess(aspinelProc);
382
383
384}
Note: See TracBrowser for help on using the repository browser.