Geant4  10.01.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 83699 2014-09-10 07:18:25Z 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 
80 #include "G4CrossSectionElastic.hh"
81 #include "G4DiffuseElastic.hh"
82 
83 // factory
85 //
87 
90  : G4VPhysicsConstructor("hElasticDIFFUSE"), verbose(ver)
91 {
92  if(verbose > 1) {
93  G4cout << "### G4HadronDElasticPhysics: " << GetPhysicsName()
94  << G4endl;
95  }
96 }
97 
99 {}
100 
102 {
103  // G4cout << "G4HadronDElasticPhysics::ConstructParticle" << G4endl;
104  G4MesonConstructor pMesonConstructor;
105  pMesonConstructor.ConstructParticle();
106 
107  G4BaryonConstructor pBaryonConstructor;
108  pBaryonConstructor.ConstructParticle();
109 
110  // Construct light ions
111  G4IonConstructor pConstructor;
112  pConstructor.ConstructParticle();
113 }
114 
116 {
117  if(wasActivated) return;
118  wasActivated = true;
119 
120  const G4double elimitAntiNuc = 100.1*MeV;
121  if(verbose > 1) {
122  G4cout << "### HadronDElasticPhysics Construct Processes "
123  << " for anti-neuclei "
124  << elimitAntiNuc/GeV << " GeV" << G4endl;
125  }
126 
127  G4AntiNuclElastic* anuc = new G4AntiNuclElastic();
128  anuc->SetMinEnergy(elimitAntiNuc);
129  G4CrossSectionElastic* anucxs =
131 
132  G4HadronElastic* lhep0 = new G4HadronElastic();
133  G4HadronElastic* lhep1 = new G4HadronElastic();
134  lhep1->SetMaxEnergy(10.1*MeV);
135  G4HadronElastic* lhep2 = new G4HadronElastic();
136  lhep2->SetMaxEnergy(elimitAntiNuc);
137 
138  G4DiffuseElastic* model = 0;
139 
140  aParticleIterator->reset();
141  while( (*aParticleIterator)() )
142  {
143  G4ParticleDefinition* particle = aParticleIterator->value();
144  G4ProcessManager* pmanager = particle->GetProcessManager();
145  G4String pname = particle->GetParticleName();
146  if(pname == "anti_lambda" ||
147  pname == "anti_neutron" ||
148  pname == "anti_omega-" ||
149  pname == "anti_sigma-" ||
150  pname == "anti_sigma+" ||
151  pname == "anti_xi-" ||
152  pname == "anti_xi0" ||
153  pname == "lambda" ||
154  pname == "omega-" ||
155  pname == "sigma-" ||
156  pname == "sigma+" ||
157  pname == "xi-" ||
158  pname == "alpha" ||
159  pname == "deuteron" ||
160  pname == "triton"
161  ) {
162 
164  hel->RegisterMe(lhep0);
165  pmanager->AddDiscreteProcess(hel);
166  if(verbose > 1) {
167  G4cout << "### HadronDElasticPhysics: " << hel->GetProcessName()
168  << " added for " << particle->GetParticleName() << G4endl;
169  }
170 
171  } else if(pname == "proton") {
172 
174  hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
175  //hel->AddDataSet(new G4CHIPSElasticXS());
176  model = new G4DiffuseElastic();
177  hel->RegisterMe(lhep1);
178  hel->RegisterMe(model);
179  pmanager->AddDiscreteProcess(hel);
180  if(verbose > 1) {
181  G4cout << "### HadronDElasticPhysics: " << hel->GetProcessName()
182  << " added for " << particle->GetParticleName() << G4endl;
183  }
184 
185  } else if(pname == "neutron") {
186 
189  model = new G4DiffuseElastic();
190  hel->RegisterMe(lhep1);
191  hel->RegisterMe(model);
192  pmanager->AddDiscreteProcess(hel);
193  if(verbose > 1) {
194  G4cout << "### HadronDElasticPhysics: "
195  << hel->GetProcessName()
196  << " added for " << particle->GetParticleName() << G4endl;
197  }
198 
199  } else if (pname == "pi+" || pname == "pi-") {
200 
202  hel->AddDataSet(new G4BGGPionElasticXS(particle));
203  model = new G4DiffuseElastic();
204  hel->RegisterMe(lhep1);
205  hel->RegisterMe(model);
206  pmanager->AddDiscreteProcess(hel);
207  if(verbose > 1) {
208  G4cout << "### HadronDElasticPhysics: " << hel->GetProcessName()
209  << " added for " << particle->GetParticleName() << G4endl;
210  }
211 
212  } else if(pname == "kaon-") {
213 
216  model = new G4DiffuseElastic();
217  hel->RegisterMe(lhep1);
218  hel->RegisterMe(model);
219  pmanager->AddDiscreteProcess(hel);
220  if(verbose > 1) {
221  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
222  << " added for " << particle->GetParticleName() << G4endl;
223  }
224  } else if(pname == "kaon+") {
225 
228  model = new G4DiffuseElastic();
229  hel->RegisterMe(lhep1);
230  hel->RegisterMe(model);
231  pmanager->AddDiscreteProcess(hel);
232  if(verbose > 1) {
233  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
234  << " added for " << particle->GetParticleName() << G4endl;
235  }
236  } else if(pname == "kaon0S" ||
237  pname == "kaon0L"
238  ) {
239 
242  model = new G4DiffuseElastic();
243  hel->RegisterMe(lhep1);
244  hel->RegisterMe(model);
245  pmanager->AddDiscreteProcess(hel);
246  if(verbose > 1) {
247  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
248  << " added for " << particle->GetParticleName() << G4endl;
249  }
250  } else if(
251  pname == "anti_proton" ||
252  pname == "anti_alpha" ||
253  pname == "anti_deuteron" ||
254  pname == "anti_triton" ||
255  pname == "anti_He3" ) {
256 
258  hel->AddDataSet(anucxs);
259  hel->RegisterMe(lhep2);
260  hel->RegisterMe(anuc);
261  pmanager->AddDiscreteProcess(hel);
262  }
263  }
264  if(verbose > 1) {
265  G4cout << "### HadronDElasticPhysics Construct Processes " << G4endl;
266  }
267 }
268 
269 
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:89
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)
static const char * Default_Name()
void SetMaxEnergy(const G4double anEnergy)
#define G4endl
Definition: G4ios.hh:61
static const char * Default_Name()
double G4double
Definition: G4Types.hh:76