Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4HadronHElasticPhysics.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: G4HadronHElasticPhysics.cc 73281 2013-08-23 08:21:37Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName: G4HadronHElasticPhysics
31 //
32 // Author: 23 November 2006 V. Ivanchenko
33 //
34 // Modified:
35 // 21.03.07 (V.Ivanchenko) Use G4BGGNucleonElasticXS and G4BGGPionElasticXS;
36 // Reduce thresholds for HE and Q-models to zero
37 // 03.06.2010 V.Ivanchenko cleanup constructors and ConstructProcess method
38 //
39 //----------------------------------------------------------------------------
40 //
41 // CHIPS for sampling scattering for p and n
42 // Glauber model for samplimg of high energy pi+- (E > 1GeV)
43 // LHEP sampling model for the other particle
44 // BBG cross sections for p, n and pi+-
45 // LHEP cross sections for other particles
46 
48 
49 #include "G4SystemOfUnits.hh"
50 #include "G4ParticleDefinition.hh"
51 #include "G4ProcessManager.hh"
52 
53 #include "G4MesonConstructor.hh"
54 #include "G4BaryonConstructor.hh"
55 #include "G4IonConstructor.hh"
56 #include "G4Neutron.hh"
57 
59 #include "G4HadronElastic.hh"
60 #include "G4ChipsElasticModel.hh"
62 #include "G4AntiNuclElastic.hh"
63 
64 #include "G4BGGNucleonElasticXS.hh"
65 #include "G4BGGPionElasticXS.hh"
66 #include "G4NeutronElasticXS.hh"
69 
71 #include "G4CrossSectionElastic.hh"
72 
73 // factory
75 //
77 
78 G4ThreadLocal G4bool G4HadronHElasticPhysics::wasActivated = false;
79 
80 
82  : G4VPhysicsConstructor("hElasticWEL_CHIPS"), verbose(ver)
83 {
84  if(verbose > 1) {
85  G4cout << "### G4HadronHElasticPhysics: " << GetPhysicsName()
86  << G4endl;
87  }
88 }
89 
91 {}
92 
94 {
95  // G4cout << "G4HadronElasticPhysics::ConstructParticle" << G4endl;
96  G4MesonConstructor pMesonConstructor;
97  pMesonConstructor.ConstructParticle();
98 
99  G4BaryonConstructor pBaryonConstructor;
100  pBaryonConstructor.ConstructParticle();
101 
102  // Construct light ions
103  G4IonConstructor pConstructor;
104  pConstructor.ConstructParticle();
105 }
106 
108 {
109  if(wasActivated) { return; }
110  wasActivated = true;
111 
112  const G4double elimit = 1.0*GeV;
113  const G4double elimitAntiNuc = 100*MeV;
114  const G4double delta = 0.1*MeV;
115  if(verbose > 1) {
116  G4cout << "### HadronElasticPhysics::ConstructProcess: Elimit for HE "
117  << elimit/GeV << " GeV" << G4endl;
118  G4cout << " for anti-neuclei "
119  << elimitAntiNuc/GeV << " GeV" << G4endl;
120  }
121 
122  G4AntiNuclElastic* anuc = new G4AntiNuclElastic();
123  anuc->SetMinEnergy(elimitAntiNuc);
124  G4CrossSectionElastic* anucxs =
126 
127  G4HadronElastic* lhep0 = new G4HadronElastic();
128  G4HadronElastic* lhep1 = new G4HadronElastic();
129  G4HadronElastic* lhep2 = new G4HadronElastic();
130  lhep1->SetMaxEnergy(elimit+delta);
131  lhep2->SetMaxEnergy(elimitAntiNuc+delta);
132 
134  chips->SetMaxEnergy(elimit+delta);
135 
137  he->SetMinEnergy(elimit);
138 
139  aParticleIterator->reset();
140  while( (*aParticleIterator)() )
141  {
142  G4ParticleDefinition* particle = aParticleIterator->value();
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 << "### HadronElasticPhysics: " << hel->GetProcessName()
167  << " added for " << particle->GetParticleName() << G4endl;
168  }
169 
170  } else if(pname == "proton") {
171 
173  hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
174  hel->RegisterMe(chips);
175  hel->RegisterMe(he);
176  pmanager->AddDiscreteProcess(hel);
177  if(verbose > 1) {
178  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
179  << " added for " << particle->GetParticleName() << G4endl;
180  }
181 
182  } else if(pname == "neutron") {
183 
185  hel->AddDataSet(new G4NeutronElasticXS());
186  hel->RegisterMe(chips);
187  hel->RegisterMe(he);
188  pmanager->AddDiscreteProcess(hel);
189  if(verbose > 1) {
190  G4cout << "### HadronElasticPhysics: "
191  << hel->GetProcessName()
192  << " added for " << particle->GetParticleName() << G4endl;
193  }
194 
195  } else if (pname == "pi+" || pname == "pi-") {
196 
198  hel->AddDataSet(new G4BGGPionElasticXS(particle));
199  hel->RegisterMe(lhep1);
200  hel->RegisterMe(he);
201  pmanager->AddDiscreteProcess(hel);
202  if(verbose > 1) {
203  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
204  << " added for " << particle->GetParticleName() << G4endl;
205  }
206 
207  } else if(pname == "kaon-" ||
208  pname == "kaon+" ||
209  pname == "kaon0S" ||
210  pname == "kaon0L"
211  ) {
212 
214  hel->RegisterMe(lhep0);
215  //hel->AddDataSet(new G4CHIPSElasticXS());
216  pmanager->AddDiscreteProcess(hel);
217  if(verbose > 1) {
218  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
219  << " added for " << particle->GetParticleName() << G4endl;
220  }
221 
222  } else if(
223  pname == "anti_proton" ||
224  pname == "anti_alpha" ||
225  pname == "anti_deuteron" ||
226  pname == "anti_triton" ||
227  pname == "anti_He3" ) {
228 
230  hel->AddDataSet(anucxs);
231  hel->RegisterMe(lhep2);
232  hel->RegisterMe(anuc);
233  pmanager->AddDiscreteProcess(hel);
234  }
235  }
236 }
237 
238 
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
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
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronHElasticPhysics)
const G4String & GetPhysicsName() const
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
string pname
Definition: eplot.py:33
void SetMaxEnergy(const G4double anEnergy)
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76