Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4HadronDElasticPhysics.cc
Go to the documentation of this file.
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$
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName: G4HadronDElasticPhysics
31 //
32 // Author: 11 April 2006 V. Ivanchenko
33 //
34 // Modified:
35 // 05.07.2006 V.Ivanchenko define process by particle name;
36 // fix problem of initialisation of HP
37 // 24.07.2006 V.Ivanchenko add G4NeutronHPElasticData
38 // 10.08.2006 V.Ivanchenko separate neutrons from other particles
39 // 17.11.2006 V.Ivanchenko do not redefine G4HadronElastic default parameters
40 // 19.02.2007 V.Ivanchenko set QModelLowLimit and LowestEnergyLimit to zero
41 // 19.02.2007 A.Howard set QModelLowLimit and LowestEnergyLimit to zero
42 // for neutrons
43 // 06.03.2007 V.Ivanchenko use updated interface to G4UElasticCrossSection
44 // 03.06.2010 V.Ivanchenko cleanup constructors and ConstructProcess method
45 //
46 //----------------------------------------------------------------------------
47 //
48 // Diffuse optical model for sampling scattering
49 // BBG cross sections for p, pi+-
50 // XS cross sections for n
51 // LHEP cross sections for other particles
52 
54 
55 #include "G4SystemOfUnits.hh"
56 #include "G4ParticleDefinition.hh"
57 #include "G4ProcessManager.hh"
58 #include "G4HadronicProcess.hh"
59 
60 #include "G4MesonConstructor.hh"
61 #include "G4BaryonConstructor.hh"
62 #include "G4IonConstructor.hh"
63 #include "G4Neutron.hh"
64 
66 #include "G4HadronElastic.hh"
68 #include "G4AntiNuclElastic.hh"
69 
70 #include "G4BGGNucleonElasticXS.hh"
71 #include "G4BGGPionElasticXS.hh"
72 #include "G4NeutronElasticXS.hh"
73 
75 
79 
81 #include "G4CrossSectionElastic.hh"
82 #include "G4DiffuseElastic.hh"
83 
84 // factory
86 //
88 
90  : G4VPhysicsConstructor("hElasticDIFFUSE"), verbose(ver),
91  wasActivated(false)
92 {
93  if(verbose > 1) {
94  G4cout << "### G4HadronDElasticPhysics: " << GetPhysicsName()
95  << G4endl;
96  }
97 }
98 
100 {}
101 
103 {
104  // G4cout << "G4HadronDElasticPhysics::ConstructParticle" << G4endl;
105  G4MesonConstructor pMesonConstructor;
106  pMesonConstructor.ConstructParticle();
107 
108  G4BaryonConstructor pBaryonConstructor;
109  pBaryonConstructor.ConstructParticle();
110 
111  // Construct light ions
112  G4IonConstructor pConstructor;
113  pConstructor.ConstructParticle();
114 }
115 
117 {
118  if(wasActivated) return;
119  wasActivated = true;
120 
121  G4double elimitAntiNuc = 100*MeV;
122  if(verbose > 1) {
123  G4cout << "### HadronDElasticPhysics Construct Processes "
124  << " for anti-neuclei "
125  << elimitAntiNuc/GeV << " GeV" << G4endl;
126  }
127 
128  G4AntiNuclElastic* anuc = new G4AntiNuclElastic();
129  anuc->SetMinEnergy(elimitAntiNuc);
130  G4CrossSectionElastic* anucxs =
132 
133  G4HadronElastic* lhep0 = new G4HadronElastic();
134  G4HadronElastic* lhep2 = new G4HadronElastic();
135  lhep2->SetMaxEnergy(elimitAntiNuc);
136 
137  G4DiffuseElastic* model = 0;
138 
140  while( (*theParticleIterator)() )
141  {
143  G4ProcessManager* pmanager = particle->GetProcessManager();
144  G4String pname = particle->GetParticleName();
145  if(pname == "anti_lambda" ||
146  pname == "anti_neutron" ||
147  pname == "anti_omega-" ||
148  pname == "anti_sigma-" ||
149  pname == "anti_sigma+" ||
150  pname == "anti_xi-" ||
151  pname == "anti_xi0" ||
152  pname == "lambda" ||
153  pname == "omega-" ||
154  pname == "sigma-" ||
155  pname == "sigma+" ||
156  pname == "xi-" ||
157  pname == "alpha" ||
158  pname == "deuteron" ||
159  pname == "triton"
160  ) {
161 
163  hel->RegisterMe(lhep0);
164  pmanager->AddDiscreteProcess(hel);
165  if(verbose > 1) {
166  G4cout << "### HadronDElasticPhysics: " << hel->GetProcessName()
167  << " added for " << particle->GetParticleName() << G4endl;
168  }
169 
170  } else if(pname == "proton") {
171 
173  hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
174  //hel->AddDataSet(new G4CHIPSElasticXS());
175  model = new G4DiffuseElastic();
176  hel->RegisterMe(model);
177  pmanager->AddDiscreteProcess(hel);
178  if(verbose > 1) {
179  G4cout << "### HadronDElasticPhysics: " << hel->GetProcessName()
180  << " added for " << particle->GetParticleName() << G4endl;
181  }
182 
183  } else if(pname == "neutron") {
184 
186  hel->AddDataSet(new G4NeutronElasticXS());
187  model = new G4DiffuseElastic();
188  hel->RegisterMe(model);
189  pmanager->AddDiscreteProcess(hel);
190  if(verbose > 1) {
191  G4cout << "### HadronDElasticPhysics: "
192  << hel->GetProcessName()
193  << " added for " << particle->GetParticleName() << G4endl;
194  }
195 
196  } else if (pname == "pi+" || pname == "pi-") {
197 
199  hel->AddDataSet(new G4BGGPionElasticXS(particle));
200  model = new G4DiffuseElastic();
201  hel->RegisterMe(model);
202  pmanager->AddDiscreteProcess(hel);
203  if(verbose > 1) {
204  G4cout << "### HadronDElasticPhysics: " << hel->GetProcessName()
205  << " added for " << particle->GetParticleName() << G4endl;
206  }
207 
208  } else if(pname == "kaon-") {
209 
212  model = new G4DiffuseElastic();
213  hel->RegisterMe(model);
214  pmanager->AddDiscreteProcess(hel);
215  if(verbose > 1) {
216  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
217  << " added for " << particle->GetParticleName() << G4endl;
218  }
219  } else if(pname == "kaon+") {
220 
223  model = new G4DiffuseElastic();
224  hel->RegisterMe(model);
225  pmanager->AddDiscreteProcess(hel);
226  if(verbose > 1) {
227  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
228  << " added for " << particle->GetParticleName() << G4endl;
229  }
230  } else if(pname == "kaon0S" ||
231  pname == "kaon0L"
232  ) {
233 
236  model = new G4DiffuseElastic();
237  hel->RegisterMe(model);
238  pmanager->AddDiscreteProcess(hel);
239  if(verbose > 1) {
240  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
241  << " added for " << particle->GetParticleName() << G4endl;
242  }
243  } else if(
244  pname == "anti_proton" ||
245  pname == "anti_alpha" ||
246  pname == "anti_deuteron" ||
247  pname == "anti_triton" ||
248  pname == "anti_He3" ) {
249 
251  hel->AddDataSet(anucxs);
252  hel->RegisterMe(lhep2);
253  hel->RegisterMe(anuc);
254  pmanager->AddDiscreteProcess(hel);
255  }
256  }
257 
258  //G4double elimit = 1.0*GeV;
259 
260  if(verbose > 1) {
261  G4cout << "### HadronDElasticPhysics Construct Processes " << G4endl;
262  }
263 }
264 
265