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 | // $Id: G4HadronElasticPhysics.cc,v 1.8 2008/05/19 10:21:34 vnivanch Exp $ |
---|
27 | // GEANT4 tag $Name: HEAD $ |
---|
28 | // |
---|
29 | //--------------------------------------------------------------------------- |
---|
30 | // |
---|
31 | // ClassName: G4HadronElasticPhysics |
---|
32 | // |
---|
33 | // Author: 11 April 2006 V. Ivanchenko |
---|
34 | // |
---|
35 | // Modified: |
---|
36 | // 05.07.2006 V.Ivanchenko define process by particle name; |
---|
37 | // fix problem of initialisation of HP |
---|
38 | // 24.07.2006 V.Ivanchenko add G4NeutronHPElasticData |
---|
39 | // 10.08.2006 V.Ivanchenko separate neutrons from other particles |
---|
40 | // 17.11.2006 V.Ivanchenko do not redefine G4HadronElastic default parameters |
---|
41 | // 19.02.2007 V.Ivanchenko set QModelLowLimit and LowestEnergyLimit to zero |
---|
42 | // 19.02.2007 A.Howard set QModelLowLimit and LowestEnergyLimit to zero |
---|
43 | // for neutrons |
---|
44 | // 06.03.2007 V.Ivanchenko use updated interface to G4UElasticCrossSection |
---|
45 | // |
---|
46 | //---------------------------------------------------------------------------- |
---|
47 | // |
---|
48 | |
---|
49 | #include "G4HadronElasticPhysics.hh" |
---|
50 | |
---|
51 | #include "G4HadronicProcess.hh" |
---|
52 | #include "G4HadronElasticProcess.hh" |
---|
53 | #include "G4HadronicInteraction.hh" |
---|
54 | #include "G4LElastic.hh" |
---|
55 | |
---|
56 | #include "G4ParticleDefinition.hh" |
---|
57 | #include "G4ProcessManager.hh" |
---|
58 | |
---|
59 | #include "G4MesonConstructor.hh" |
---|
60 | #include "G4BaryonConstructor.hh" |
---|
61 | #include "G4IonConstructor.hh" |
---|
62 | #include "G4Neutron.hh" |
---|
63 | |
---|
64 | #include "G4VQCrossSection.hh" |
---|
65 | #include "G4UElasticCrossSection.hh" |
---|
66 | |
---|
67 | G4HadronElasticPhysics::G4HadronElasticPhysics( |
---|
68 | const G4String& name, G4int ver, G4bool hp, G4bool glauber) |
---|
69 | : G4VPhysicsConstructor(name), mname(name), verbose(ver), hpFlag(hp), |
---|
70 | glFlag(glauber),wasActivated(false) |
---|
71 | { |
---|
72 | if(verbose > 1) G4cout << "### HadronElasticPhysics" << G4endl; |
---|
73 | model = 0; |
---|
74 | neutronModel = 0; |
---|
75 | neutronHPModel = 0; |
---|
76 | } |
---|
77 | |
---|
78 | G4HadronElasticPhysics::~G4HadronElasticPhysics() |
---|
79 | { |
---|
80 | delete model; |
---|
81 | delete neutronModel; |
---|
82 | delete neutronHPModel; |
---|
83 | } |
---|
84 | |
---|
85 | void G4HadronElasticPhysics::ConstructParticle() |
---|
86 | { |
---|
87 | // G4cout << "G4HadronElasticPhysics::ConstructParticle" << G4endl; |
---|
88 | G4MesonConstructor pMesonConstructor; |
---|
89 | pMesonConstructor.ConstructParticle(); |
---|
90 | |
---|
91 | G4BaryonConstructor pBaryonConstructor; |
---|
92 | pBaryonConstructor.ConstructParticle(); |
---|
93 | |
---|
94 | // Construct light ions |
---|
95 | G4IonConstructor pConstructor; |
---|
96 | pConstructor.ConstructParticle(); |
---|
97 | } |
---|
98 | |
---|
99 | void G4HadronElasticPhysics::ConstructProcess() |
---|
100 | { |
---|
101 | if(wasActivated) return; |
---|
102 | wasActivated = true; |
---|
103 | |
---|
104 | if(verbose > 1) { |
---|
105 | G4cout << "### HadronElasticPhysics Construct Processes with the model <" |
---|
106 | << mname << ">" << G4endl; |
---|
107 | } |
---|
108 | G4HadronicProcess* hel = 0; |
---|
109 | G4VQCrossSection* man = 0; |
---|
110 | |
---|
111 | if(mname == "elastic") { |
---|
112 | G4HadronElastic* he = new G4HadronElastic(); |
---|
113 | model = he; |
---|
114 | man = he->GetCS(); |
---|
115 | he->SetQModelLowLimit(0.0); |
---|
116 | he->SetLowestEnergyLimit(0.0); |
---|
117 | } else { |
---|
118 | model = new G4LElastic(); |
---|
119 | } |
---|
120 | |
---|
121 | theParticleIterator->reset(); |
---|
122 | while( (*theParticleIterator)() ) |
---|
123 | { |
---|
124 | G4ParticleDefinition* particle = theParticleIterator->value(); |
---|
125 | G4String pname = particle->GetParticleName(); |
---|
126 | if(pname == "anti_lambda" || |
---|
127 | pname == "anti_neutron" || |
---|
128 | pname == "anti_omega-" || |
---|
129 | pname == "anti_proton" || |
---|
130 | pname == "anti_sigma-" || |
---|
131 | pname == "anti_sigma+" || |
---|
132 | pname == "anti_xi-" || |
---|
133 | pname == "anti_xi0" || |
---|
134 | pname == "kaon-" || |
---|
135 | pname == "kaon+" || |
---|
136 | pname == "kaon0S" || |
---|
137 | pname == "kaon0L" || |
---|
138 | pname == "lambda" || |
---|
139 | pname == "omega-" || |
---|
140 | pname == "pi-" || |
---|
141 | pname == "pi+" || |
---|
142 | pname == "proton" || |
---|
143 | pname == "sigma-" || |
---|
144 | pname == "sigma+" || |
---|
145 | pname == "xi-" || |
---|
146 | pname == "alpha" || |
---|
147 | pname == "deuteron" || |
---|
148 | pname == "triton") { |
---|
149 | |
---|
150 | G4ProcessManager* pmanager = particle->GetProcessManager(); |
---|
151 | if(mname == "elastic") { |
---|
152 | G4UHadronElasticProcess* h = new G4UHadronElasticProcess("hElastic"); |
---|
153 | h->SetQElasticCrossSection(man); |
---|
154 | hel = h; |
---|
155 | if(glFlag) hel->AddDataSet(new G4UElasticCrossSection(particle)); |
---|
156 | } else { |
---|
157 | hel = new G4HadronElasticProcess("hElastic"); |
---|
158 | } |
---|
159 | hel->RegisterMe(model); |
---|
160 | pmanager->AddDiscreteProcess(hel); |
---|
161 | |
---|
162 | // neutron case |
---|
163 | } else if(pname == "neutron") { |
---|
164 | |
---|
165 | G4ProcessManager* pmanager = particle->GetProcessManager(); |
---|
166 | if(mname == "elastic") { |
---|
167 | G4UHadronElasticProcess* h = new G4UHadronElasticProcess("hElastic"); |
---|
168 | G4HadronElastic* nhe = new G4HadronElastic(); |
---|
169 | nhe->SetQModelLowLimit(0.0); |
---|
170 | nhe->SetLowestEnergyLimit(0.0); |
---|
171 | neutronModel = nhe; |
---|
172 | h->SetQElasticCrossSection(nhe->GetCS()); |
---|
173 | hel = h; |
---|
174 | if(glFlag) hel->AddDataSet(new G4UElasticCrossSection(particle)); |
---|
175 | } else { |
---|
176 | hel = new G4HadronElasticProcess("hElastic"); |
---|
177 | neutronModel = new G4LElastic(); |
---|
178 | } |
---|
179 | |
---|
180 | if(hpFlag) { |
---|
181 | neutronModel->SetMinEnergy(19.5*MeV); |
---|
182 | neutronHPModel = new G4NeutronHPElastic(); |
---|
183 | hel->RegisterMe(neutronHPModel); |
---|
184 | hel->AddDataSet(new G4NeutronHPElasticData()); |
---|
185 | } |
---|
186 | |
---|
187 | hel->RegisterMe(neutronModel); |
---|
188 | pmanager->AddDiscreteProcess(hel); |
---|
189 | |
---|
190 | if(verbose > 1) |
---|
191 | G4cout << "### HadronElasticPhysics added for " |
---|
192 | << particle->GetParticleName() << G4endl; |
---|
193 | } |
---|
194 | } |
---|
195 | } |
---|
196 | |
---|
197 | |
---|