Geant4  10.00.p02
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: G4HadronDElasticPhysics.cc 73281 2013-08-23 08:21:37Z gcosmo $
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 
91  : G4VPhysicsConstructor("hElasticDIFFUSE"), verbose(ver)
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  const G4double elimitAntiNuc = 100.1*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* lhep1 = new G4HadronElastic();
135  lhep1->SetMaxEnergy(10.1*MeV);
136  G4HadronElastic* lhep2 = new G4HadronElastic();
137  lhep2->SetMaxEnergy(elimitAntiNuc);
138 
139  G4DiffuseElastic* model = 0;
140 
141  aParticleIterator->reset();
142  while( (*aParticleIterator)() )
143  {
144  G4ParticleDefinition* particle = aParticleIterator->value();
145  G4ProcessManager* pmanager = particle->GetProcessManager();
146  G4String pname = particle->GetParticleName();
147  if(pname == "anti_lambda" ||
148  pname == "anti_neutron" ||
149  pname == "anti_omega-" ||
150  pname == "anti_sigma-" ||
151  pname == "anti_sigma+" ||
152  pname == "anti_xi-" ||
153  pname == "anti_xi0" ||
154  pname == "lambda" ||
155  pname == "omega-" ||
156  pname == "sigma-" ||
157  pname == "sigma+" ||
158  pname == "xi-" ||
159  pname == "alpha" ||
160  pname == "deuteron" ||
161  pname == "triton"
162  ) {
163 
165  hel->RegisterMe(lhep0);
166  pmanager->AddDiscreteProcess(hel);
167  if(verbose > 1) {
168  G4cout << "### HadronDElasticPhysics: " << hel->GetProcessName()
169  << " added for " << particle->GetParticleName() << G4endl;
170  }
171 
172  } else if(pname == "proton") {
173 
175  hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
176  //hel->AddDataSet(new G4CHIPSElasticXS());
177  model = new G4DiffuseElastic();
178  hel->RegisterMe(lhep1);
179  hel->RegisterMe(model);
180  pmanager->AddDiscreteProcess(hel);
181  if(verbose > 1) {
182  G4cout << "### HadronDElasticPhysics: " << hel->GetProcessName()
183  << " added for " << particle->GetParticleName() << G4endl;
184  }
185 
186  } else if(pname == "neutron") {
187 
189  hel->AddDataSet(new G4NeutronElasticXS());
190  model = new G4DiffuseElastic();
191  hel->RegisterMe(lhep1);
192  hel->RegisterMe(model);
193  pmanager->AddDiscreteProcess(hel);
194  if(verbose > 1) {
195  G4cout << "### HadronDElasticPhysics: "
196  << hel->GetProcessName()
197  << " added for " << particle->GetParticleName() << G4endl;
198  }
199 
200  } else if (pname == "pi+" || pname == "pi-") {
201 
203  hel->AddDataSet(new G4BGGPionElasticXS(particle));
204  model = new G4DiffuseElastic();
205  hel->RegisterMe(lhep1);
206  hel->RegisterMe(model);
207  pmanager->AddDiscreteProcess(hel);
208  if(verbose > 1) {
209  G4cout << "### HadronDElasticPhysics: " << hel->GetProcessName()
210  << " added for " << particle->GetParticleName() << G4endl;
211  }
212 
213  } else if(pname == "kaon-") {
214 
217  model = new G4DiffuseElastic();
218  hel->RegisterMe(lhep1);
219  hel->RegisterMe(model);
220  pmanager->AddDiscreteProcess(hel);
221  if(verbose > 1) {
222  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
223  << " added for " << particle->GetParticleName() << G4endl;
224  }
225  } else if(pname == "kaon+") {
226 
229  model = new G4DiffuseElastic();
230  hel->RegisterMe(lhep1);
231  hel->RegisterMe(model);
232  pmanager->AddDiscreteProcess(hel);
233  if(verbose > 1) {
234  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
235  << " added for " << particle->GetParticleName() << G4endl;
236  }
237  } else if(pname == "kaon0S" ||
238  pname == "kaon0L"
239  ) {
240 
243  model = new G4DiffuseElastic();
244  hel->RegisterMe(lhep1);
245  hel->RegisterMe(model);
246  pmanager->AddDiscreteProcess(hel);
247  if(verbose > 1) {
248  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
249  << " added for " << particle->GetParticleName() << G4endl;
250  }
251  } else if(
252  pname == "anti_proton" ||
253  pname == "anti_alpha" ||
254  pname == "anti_deuteron" ||
255  pname == "anti_triton" ||
256  pname == "anti_He3" ) {
257 
259  hel->AddDataSet(anucxs);
260  hel->RegisterMe(lhep2);
261  hel->RegisterMe(anuc);
262  pmanager->AddDiscreteProcess(hel);
263  }
264  }
265  if(verbose > 1) {
266  G4cout << "### HadronDElasticPhysics Construct Processes " << G4endl;
267  }
268 }
269 
270 
static const double MeV
Definition: G4SIunits.hh:193
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4ThreadLocal G4bool wasActivated
static void ConstructParticle()
#define G4ThreadLocal
Definition: tls.hh:52
static void ConstructParticle()
G4ProcessManager * GetProcessManager() const
int G4int
Definition: G4Types.hh:78
G4ComponentAntiNuclNuclearXS * GetComponentCrossSection()
const G4String & GetParticleName() const
static void ConstructParticle()
void RegisterMe(G4HadronicInteraction *a)
void SetMinEnergy(G4double anEnergy)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
#define aParticleIterator
static G4CrossSectionDataSetRegistry * Instance()
static const char * Default_Name()
static const double GeV
Definition: G4SIunits.hh:196
const G4String & GetPhysicsName() const
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronDElasticPhysics)
void SetMaxEnergy(const G4double anEnergy)
#define G4endl
Definition: G4ios.hh:61
static const char * Default_Name()
double G4double
Definition: G4Types.hh:76