Initial version
[u/mrichter/AliRoot.git] / TGeant4 / TG4PhysicsConstructorHadron.cxx
1 // $Id$
2 // Category: physics
3 //
4 // According to corresponding part of:
5 // ExN04PhysicsList.cc,v 1.7 1999/12/15 14:49:26 gunter
6 // GEANT4 tag Name: geant4-01-01
7
8 #include "TG4PhysicsConstructorHadron.h"
9
10 #include <G4ParticleDefinition.hh>
11 #include <G4ProcessManager.hh>
12
13 // Hadron Processes
14 #include <G4HadronElasticProcess.hh>
15 #include <G4PionPlusInelasticProcess.hh>
16 #include <G4PionMinusInelasticProcess.hh>
17 #include <G4KaonPlusInelasticProcess.hh>
18 #include <G4KaonZeroSInelasticProcess.hh>
19 #include <G4KaonZeroLInelasticProcess.hh>
20 #include <G4KaonMinusInelasticProcess.hh>
21 #include <G4ProtonInelasticProcess.hh>
22 #include <G4AntiProtonInelasticProcess.hh>
23 #include <G4NeutronInelasticProcess.hh>
24 #include <G4AntiNeutronInelasticProcess.hh>
25 #include <G4LambdaInelasticProcess.hh>
26 #include <G4AntiLambdaInelasticProcess.hh>
27 #include <G4SigmaPlusInelasticProcess.hh>
28 #include <G4SigmaMinusInelasticProcess.hh>
29 #include <G4AntiSigmaPlusInelasticProcess.hh>
30 #include <G4AntiSigmaMinusInelasticProcess.hh>
31 #include <G4XiZeroInelasticProcess.hh>
32 #include <G4XiMinusInelasticProcess.hh>
33 #include <G4AntiXiZeroInelasticProcess.hh>
34 #include <G4AntiXiMinusInelasticProcess.hh>
35 #include <G4DeuteronInelasticProcess.hh>
36 #include <G4TritonInelasticProcess.hh>
37 #include <G4AlphaInelasticProcess.hh>
38 #include <G4OmegaMinusInelasticProcess.hh>
39 #include <G4AntiOmegaMinusInelasticProcess.hh>
40
41 // Low-energy Models
42 #include <G4LElastic.hh>
43 #include <G4LEPionPlusInelastic.hh>
44 #include <G4LEPionMinusInelastic.hh>
45 #include <G4LEKaonPlusInelastic.hh>
46 #include <G4LEKaonZeroSInelastic.hh>
47 #include <G4LEKaonZeroLInelastic.hh>
48 #include <G4LEKaonMinusInelastic.hh>
49 #include <G4LEProtonInelastic.hh>
50 #include <G4LEAntiProtonInelastic.hh>
51 #include <G4LENeutronInelastic.hh>
52 #include <G4LEAntiNeutronInelastic.hh>
53 #include <G4LELambdaInelastic.hh>
54 #include <G4LEAntiLambdaInelastic.hh>
55 #include <G4LESigmaPlusInelastic.hh>
56 #include <G4LESigmaMinusInelastic.hh>
57 #include <G4LEAntiSigmaPlusInelastic.hh>
58 #include <G4LEAntiSigmaMinusInelastic.hh>
59 #include <G4LEXiZeroInelastic.hh>
60 #include <G4LEXiMinusInelastic.hh>
61 #include <G4LEAntiXiZeroInelastic.hh>
62 #include <G4LEAntiXiMinusInelastic.hh>
63 #include <G4LEDeuteronInelastic.hh>
64 #include <G4LETritonInelastic.hh>
65 #include <G4LEAlphaInelastic.hh>
66 #include <G4LEOmegaMinusInelastic.hh>
67 #include <G4LEAntiOmegaMinusInelastic.hh>
68
69 // High-energy Models
70 #include <G4HEPionPlusInelastic.hh>
71 #include <G4HEPionMinusInelastic.hh>
72 #include <G4HEKaonPlusInelastic.hh>
73 #include <G4HEKaonZeroInelastic.hh>
74 #include <G4HEKaonZeroInelastic.hh>
75 #include <G4HEKaonMinusInelastic.hh>
76 #include <G4HEProtonInelastic.hh>
77 #include <G4HEAntiProtonInelastic.hh>
78 #include <G4HENeutronInelastic.hh>
79 #include <G4HEAntiNeutronInelastic.hh>
80 #include <G4HELambdaInelastic.hh>
81 #include <G4HEAntiLambdaInelastic.hh>
82 #include <G4HESigmaPlusInelastic.hh>
83 #include <G4HESigmaMinusInelastic.hh>
84 #include <G4HEAntiSigmaPlusInelastic.hh>
85 #include <G4HEAntiSigmaMinusInelastic.hh>
86 #include <G4HEXiZeroInelastic.hh>
87 #include <G4HEXiMinusInelastic.hh>
88 #include <G4HEAntiXiZeroInelastic.hh>
89 #include <G4HEAntiXiMinusInelastic.hh>
90 #include <G4HEOmegaMinusInelastic.hh>
91 #include <G4HEAntiOmegaMinusInelastic.hh>
92
93 // Stopping processes
94 #ifdef TRIUMF_STOP_PIMINUS
95 #include <G4PionMinusAbsorptionAtRest.hh>
96 #else
97 #include <G4PiMinusAbsorptionAtRest.hh>
98 #endif
99 #ifdef TRIUMF_STOP_KMINUS
100 #include <G4KaonMinusAbsorption.hh>
101 #else
102 #include <G4KaonMinusAbsorptionAtRest.hh>
103 #endif
104
105 TG4PhysicsConstructorHadron::TG4PhysicsConstructorHadron(const G4String& name)
106   : G4VPhysicsConstructor(name)
107 {
108 //
109   SetVerboseLevel(1);
110 }
111
112 TG4PhysicsConstructorHadron::~TG4PhysicsConstructorHadron() {
113 //
114 }
115
116 // protected methods
117
118 void TG4PhysicsConstructorHadron::ConstructParticle()
119 {
120 // The particles are constructed in the 
121 // TG4ModularPhysicsList.
122 // ---
123 }
124
125 void TG4PhysicsConstructorHadron::ConstructProcess()
126 {
127 // Makes discrete physics processes for the hadrons, at present limited
128 // to those particles with GHEISHA interactions (INTRC > 0).
129 // The processes are: Elastic scattering and Inelastic scattering.
130 //
131 // F.W.Jones  09-JUL-1998
132 // ---
133
134    G4HadronElasticProcess* theElasticProcess = 
135                                     new G4HadronElasticProcess;
136    G4LElastic* theElasticModel = new G4LElastic;
137    theElasticProcess->RegisterMe(theElasticModel);
138
139    theParticleIterator->reset();
140    while ((*theParticleIterator)()) {
141       G4ParticleDefinition* particle = theParticleIterator->value();
142       G4ProcessManager* pmanager = particle->GetProcessManager();
143       G4String particleName = particle->GetParticleName();
144      
145       if (particleName == "pi+") {
146          pmanager->AddDiscreteProcess(theElasticProcess);
147          G4PionPlusInelasticProcess* theInelasticProcess = 
148                                 new G4PionPlusInelasticProcess("inelastic");
149          G4LEPionPlusInelastic* theLEInelasticModel = 
150                                 new G4LEPionPlusInelastic;
151          theInelasticProcess->RegisterMe(theLEInelasticModel);
152          G4HEPionPlusInelastic* theHEInelasticModel = 
153                                 new G4HEPionPlusInelastic;
154          theInelasticProcess->RegisterMe(theHEInelasticModel);
155          pmanager->AddDiscreteProcess(theInelasticProcess);
156       }
157       else if (particleName == "pi-") {
158          pmanager->AddDiscreteProcess(theElasticProcess);
159          G4PionMinusInelasticProcess* theInelasticProcess = 
160                                 new G4PionMinusInelasticProcess("inelastic");
161          G4LEPionMinusInelastic* theLEInelasticModel = 
162                                 new G4LEPionMinusInelastic;
163          theInelasticProcess->RegisterMe(theLEInelasticModel);
164          G4HEPionMinusInelastic* theHEInelasticModel = 
165                                 new G4HEPionMinusInelastic;
166          theInelasticProcess->RegisterMe(theHEInelasticModel);
167          pmanager->AddDiscreteProcess(theInelasticProcess);
168 #ifdef TRIUMF_STOP_PIMINUS
169          pmanager->AddRestProcess(new G4PionMinusAbsorptionAtRest, ordDefault);
170 #else
171          G4String prcNam;
172          pmanager->AddRestProcess(
173            new G4PiMinusAbsorptionAtRest(
174                 prcNam="PiMinusAbsorptionAtRest"), ordDefault);
175 #endif
176       }
177       else if (particleName == "kaon+") {
178          pmanager->AddDiscreteProcess(theElasticProcess);
179          G4KaonPlusInelasticProcess* theInelasticProcess = 
180                                   new G4KaonPlusInelasticProcess("inelastic");
181          G4LEKaonPlusInelastic* theLEInelasticModel = 
182                                   new G4LEKaonPlusInelastic;
183          theInelasticProcess->RegisterMe(theLEInelasticModel);
184          G4HEKaonPlusInelastic* theHEInelasticModel = 
185                                   new G4HEKaonPlusInelastic;
186          theInelasticProcess->RegisterMe(theHEInelasticModel);
187          pmanager->AddDiscreteProcess(theInelasticProcess);
188       }
189       else if (particleName == "kaon0S") {
190          pmanager->AddDiscreteProcess(theElasticProcess);
191          G4KaonZeroSInelasticProcess* theInelasticProcess = 
192                              new G4KaonZeroSInelasticProcess("inelastic");
193          G4LEKaonZeroSInelastic* theLEInelasticModel = 
194                              new G4LEKaonZeroSInelastic;
195          theInelasticProcess->RegisterMe(theLEInelasticModel);
196          G4HEKaonZeroInelastic* theHEInelasticModel = 
197                              new G4HEKaonZeroInelastic;
198          theInelasticProcess->RegisterMe(theHEInelasticModel);
199          pmanager->AddDiscreteProcess(theInelasticProcess);
200       }
201       else if (particleName == "kaon0L") {
202          pmanager->AddDiscreteProcess(theElasticProcess);
203          G4KaonZeroLInelasticProcess* theInelasticProcess = 
204                              new G4KaonZeroLInelasticProcess("inelastic");
205          G4LEKaonZeroLInelastic* theLEInelasticModel = 
206                              new G4LEKaonZeroLInelastic;
207          theInelasticProcess->RegisterMe(theLEInelasticModel);
208          G4HEKaonZeroInelastic* theHEInelasticModel = 
209                              new G4HEKaonZeroInelastic;
210          theInelasticProcess->RegisterMe(theHEInelasticModel);
211          pmanager->AddDiscreteProcess(theInelasticProcess);
212       }
213       else if (particleName == "kaon-") {
214          pmanager->AddDiscreteProcess(theElasticProcess);
215          G4KaonMinusInelasticProcess* theInelasticProcess = 
216                                  new G4KaonMinusInelasticProcess("inelastic");
217          G4LEKaonMinusInelastic* theLEInelasticModel = 
218                                  new G4LEKaonMinusInelastic;
219          theInelasticProcess->RegisterMe(theLEInelasticModel);
220          G4HEKaonMinusInelastic* theHEInelasticModel = 
221                                  new G4HEKaonMinusInelastic;
222          theInelasticProcess->RegisterMe(theHEInelasticModel);
223          pmanager->AddDiscreteProcess(theInelasticProcess);
224 #ifdef TRIUMF_STOP_KMINUS
225          pmanager->AddRestProcess(new G4KaonMinusAbsorption, ordDefault);
226 #else
227          pmanager->AddRestProcess(new G4KaonMinusAbsorptionAtRest, ordDefault);
228 #endif
229       }
230       else if (particleName == "proton") {
231          pmanager->AddDiscreteProcess(theElasticProcess);
232          G4ProtonInelasticProcess* theInelasticProcess = 
233                                     new G4ProtonInelasticProcess("inelastic");
234          G4LEProtonInelastic* theLEInelasticModel = new G4LEProtonInelastic;
235          theInelasticProcess->RegisterMe(theLEInelasticModel);
236          G4HEProtonInelastic* theHEInelasticModel = new G4HEProtonInelastic;
237          theInelasticProcess->RegisterMe(theHEInelasticModel);
238          pmanager->AddDiscreteProcess(theInelasticProcess);
239       }
240       else if (particleName == "anti_proton") {
241          pmanager->AddDiscreteProcess(theElasticProcess);
242          G4AntiProtonInelasticProcess* theInelasticProcess = 
243                                 new G4AntiProtonInelasticProcess("inelastic");
244          G4LEAntiProtonInelastic* theLEInelasticModel = 
245                                 new G4LEAntiProtonInelastic;
246          theInelasticProcess->RegisterMe(theLEInelasticModel);
247          G4HEAntiProtonInelastic* theHEInelasticModel = 
248                                 new G4HEAntiProtonInelastic;
249          theInelasticProcess->RegisterMe(theHEInelasticModel);
250          pmanager->AddDiscreteProcess(theInelasticProcess);
251       }
252       else if (particleName == "neutron") {
253          pmanager->AddDiscreteProcess(theElasticProcess);
254          G4NeutronInelasticProcess* theInelasticProcess = 
255                                     new G4NeutronInelasticProcess("inelastic");
256          G4LENeutronInelastic* theLEInelasticModel = 
257                                     new G4LENeutronInelastic;
258          theInelasticProcess->RegisterMe(theLEInelasticModel);
259          G4HENeutronInelastic* theHEInelasticModel = 
260                                     new G4HENeutronInelastic;
261          theInelasticProcess->RegisterMe(theHEInelasticModel);
262          pmanager->AddDiscreteProcess(theInelasticProcess);
263       }  
264       else if (particleName == "anti_neutron") {
265          pmanager->AddDiscreteProcess(theElasticProcess);
266          G4AntiNeutronInelasticProcess* theInelasticProcess = 
267                                new G4AntiNeutronInelasticProcess("inelastic");
268          G4LEAntiNeutronInelastic* theLEInelasticModel = 
269                                new G4LEAntiNeutronInelastic;
270          theInelasticProcess->RegisterMe(theLEInelasticModel);
271          G4HEAntiNeutronInelastic* theHEInelasticModel = 
272                                new G4HEAntiNeutronInelastic;
273          theInelasticProcess->RegisterMe(theHEInelasticModel);
274          pmanager->AddDiscreteProcess(theInelasticProcess);
275       }
276       else if (particleName == "lambda") {
277          pmanager->AddDiscreteProcess(theElasticProcess);
278          G4LambdaInelasticProcess* theInelasticProcess = 
279                                     new G4LambdaInelasticProcess("inelastic");
280          G4LELambdaInelastic* theLEInelasticModel = new G4LELambdaInelastic;
281          theInelasticProcess->RegisterMe(theLEInelasticModel);
282          G4HELambdaInelastic* theHEInelasticModel = new G4HELambdaInelastic;
283          theInelasticProcess->RegisterMe(theHEInelasticModel);
284          pmanager->AddDiscreteProcess(theInelasticProcess);
285       }
286       else if (particleName == "anti_lambda") {
287          pmanager->AddDiscreteProcess(theElasticProcess);
288          G4AntiLambdaInelasticProcess* theInelasticProcess = 
289                                 new G4AntiLambdaInelasticProcess("inelastic");
290          G4LEAntiLambdaInelastic* theLEInelasticModel = 
291                                 new G4LEAntiLambdaInelastic;
292          theInelasticProcess->RegisterMe(theLEInelasticModel);
293          G4HEAntiLambdaInelastic* theHEInelasticModel = 
294                                 new G4HEAntiLambdaInelastic;
295          theInelasticProcess->RegisterMe(theHEInelasticModel);
296          pmanager->AddDiscreteProcess(theInelasticProcess);
297       }
298       else if (particleName == "sigma+") {
299          pmanager->AddDiscreteProcess(theElasticProcess);
300          G4SigmaPlusInelasticProcess* theInelasticProcess = 
301                                  new G4SigmaPlusInelasticProcess("inelastic");
302          G4LESigmaPlusInelastic* theLEInelasticModel = 
303                                  new G4LESigmaPlusInelastic;
304          theInelasticProcess->RegisterMe(theLEInelasticModel);
305          G4HESigmaPlusInelastic* theHEInelasticModel = 
306                                  new G4HESigmaPlusInelastic;
307          theInelasticProcess->RegisterMe(theHEInelasticModel);
308          pmanager->AddDiscreteProcess(theInelasticProcess);
309       }
310       else if (particleName == "sigma-") {
311          pmanager->AddDiscreteProcess(theElasticProcess);
312          G4SigmaMinusInelasticProcess* theInelasticProcess = 
313                                  new G4SigmaMinusInelasticProcess("inelastic");
314          G4LESigmaMinusInelastic* theLEInelasticModel = 
315                                  new G4LESigmaMinusInelastic;
316          theInelasticProcess->RegisterMe(theLEInelasticModel);
317          G4HESigmaMinusInelastic* theHEInelasticModel = 
318                                  new G4HESigmaMinusInelastic;
319          theInelasticProcess->RegisterMe(theHEInelasticModel);
320          pmanager->AddDiscreteProcess(theInelasticProcess);
321       }
322       else if (particleName == "anti_sigma+") {
323          pmanager->AddDiscreteProcess(theElasticProcess);
324          G4AntiSigmaPlusInelasticProcess* theInelasticProcess = 
325                              new G4AntiSigmaPlusInelasticProcess("inelastic");
326          G4LEAntiSigmaPlusInelastic* theLEInelasticModel = 
327                                  new G4LEAntiSigmaPlusInelastic;
328          theInelasticProcess->RegisterMe(theLEInelasticModel);
329          G4HEAntiSigmaPlusInelastic* theHEInelasticModel = 
330                                  new G4HEAntiSigmaPlusInelastic;
331          theInelasticProcess->RegisterMe(theHEInelasticModel);
332          pmanager->AddDiscreteProcess(theInelasticProcess);
333       }
334       else if (particleName == "anti_sigma-") {
335          pmanager->AddDiscreteProcess(theElasticProcess);
336          G4AntiSigmaMinusInelasticProcess* theInelasticProcess = 
337                             new G4AntiSigmaMinusInelasticProcess("inelastic");
338          G4LEAntiSigmaMinusInelastic* theLEInelasticModel = 
339                                  new G4LEAntiSigmaMinusInelastic;
340          theInelasticProcess->RegisterMe(theLEInelasticModel);
341          G4HEAntiSigmaMinusInelastic* theHEInelasticModel = 
342                                  new G4HEAntiSigmaMinusInelastic;
343          theInelasticProcess->RegisterMe(theHEInelasticModel);
344          pmanager->AddDiscreteProcess(theInelasticProcess);
345       }
346       else if (particleName == "xi0") {
347          pmanager->AddDiscreteProcess(theElasticProcess);
348          G4XiZeroInelasticProcess* theInelasticProcess = 
349                             new G4XiZeroInelasticProcess("inelastic");
350          G4LEXiZeroInelastic* theLEInelasticModel = 
351                                  new G4LEXiZeroInelastic;
352          theInelasticProcess->RegisterMe(theLEInelasticModel);
353          G4HEXiZeroInelastic* theHEInelasticModel = 
354                                  new G4HEXiZeroInelastic;
355          theInelasticProcess->RegisterMe(theHEInelasticModel);
356          pmanager->AddDiscreteProcess(theInelasticProcess);
357       }
358       else if (particleName == "xi-") {
359          pmanager->AddDiscreteProcess(theElasticProcess);
360          G4XiMinusInelasticProcess* theInelasticProcess = 
361                             new G4XiMinusInelasticProcess("inelastic");
362          G4LEXiMinusInelastic* theLEInelasticModel = 
363                                  new G4LEXiMinusInelastic;
364          theInelasticProcess->RegisterMe(theLEInelasticModel);
365          G4HEXiMinusInelastic* theHEInelasticModel = 
366                                  new G4HEXiMinusInelastic;
367          theInelasticProcess->RegisterMe(theHEInelasticModel);
368          pmanager->AddDiscreteProcess(theInelasticProcess);
369       }
370       else if (particleName == "anti_xi0") {
371          pmanager->AddDiscreteProcess(theElasticProcess);
372          G4AntiXiZeroInelasticProcess* theInelasticProcess = 
373                             new G4AntiXiZeroInelasticProcess("inelastic");
374          G4LEAntiXiZeroInelastic* theLEInelasticModel = 
375                                  new G4LEAntiXiZeroInelastic;
376          theInelasticProcess->RegisterMe(theLEInelasticModel);
377          G4HEAntiXiZeroInelastic* theHEInelasticModel = 
378                                  new G4HEAntiXiZeroInelastic;
379          theInelasticProcess->RegisterMe(theHEInelasticModel);
380          pmanager->AddDiscreteProcess(theInelasticProcess);
381       }
382       else if (particleName == "anti_xi-") {
383          pmanager->AddDiscreteProcess(theElasticProcess);
384          G4AntiXiMinusInelasticProcess* theInelasticProcess = 
385                             new G4AntiXiMinusInelasticProcess("inelastic");
386          G4LEAntiXiMinusInelastic* theLEInelasticModel = 
387                                  new G4LEAntiXiMinusInelastic;
388          theInelasticProcess->RegisterMe(theLEInelasticModel);
389          G4HEAntiXiMinusInelastic* theHEInelasticModel = 
390                                  new G4HEAntiXiMinusInelastic;
391          theInelasticProcess->RegisterMe(theHEInelasticModel);
392          pmanager->AddDiscreteProcess(theInelasticProcess);
393       }
394       else if (particleName == "deuteron") {
395          pmanager->AddDiscreteProcess(theElasticProcess);
396          G4DeuteronInelasticProcess* theInelasticProcess = 
397                             new G4DeuteronInelasticProcess("inelastic");
398          G4LEDeuteronInelastic* theLEInelasticModel = 
399                                  new G4LEDeuteronInelastic;
400          theInelasticProcess->RegisterMe(theLEInelasticModel);
401          pmanager->AddDiscreteProcess(theInelasticProcess);
402       }
403       else if (particleName == "triton") {
404          pmanager->AddDiscreteProcess(theElasticProcess);
405          G4TritonInelasticProcess* theInelasticProcess = 
406                             new G4TritonInelasticProcess("inelastic");
407          G4LETritonInelastic* theLEInelasticModel = 
408                                  new G4LETritonInelastic;
409          theInelasticProcess->RegisterMe(theLEInelasticModel);
410          pmanager->AddDiscreteProcess(theInelasticProcess);
411       }
412       else if (particleName == "alpha") {
413          pmanager->AddDiscreteProcess(theElasticProcess);
414          G4AlphaInelasticProcess* theInelasticProcess = 
415                             new G4AlphaInelasticProcess("inelastic");
416          G4LEAlphaInelastic* theLEInelasticModel = 
417                                  new G4LEAlphaInelastic;
418          theInelasticProcess->RegisterMe(theLEInelasticModel);
419          pmanager->AddDiscreteProcess(theInelasticProcess);
420       }
421       else if (particleName == "omega-") {
422          pmanager->AddDiscreteProcess(theElasticProcess);
423          G4OmegaMinusInelasticProcess* theInelasticProcess = 
424                             new G4OmegaMinusInelasticProcess("inelastic");
425          G4LEOmegaMinusInelastic* theLEInelasticModel = 
426                                  new G4LEOmegaMinusInelastic;
427          theInelasticProcess->RegisterMe(theLEInelasticModel);
428          G4HEOmegaMinusInelastic* theHEInelasticModel = 
429                                  new G4HEOmegaMinusInelastic;
430          theInelasticProcess->RegisterMe(theHEInelasticModel);
431          pmanager->AddDiscreteProcess(theInelasticProcess);
432       }
433       else if (particleName == "anti_omega-") {
434          pmanager->AddDiscreteProcess(theElasticProcess);
435          G4AntiOmegaMinusInelasticProcess* theInelasticProcess = 
436                             new G4AntiOmegaMinusInelasticProcess("inelastic");
437          G4LEAntiOmegaMinusInelastic* theLEInelasticModel = 
438                                  new G4LEAntiOmegaMinusInelastic;
439          theInelasticProcess->RegisterMe(theLEInelasticModel);
440          G4HEAntiOmegaMinusInelastic* theHEInelasticModel = 
441                                  new G4HEAntiOmegaMinusInelastic;
442          theInelasticProcess->RegisterMe(theHEInelasticModel);
443          pmanager->AddDiscreteProcess(theInelasticProcess);
444       }
445    }
446
447    if (verboseLevel>0)
448      G4cout << "### Hadron physics constructed." << G4endl;
449 }
450