Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExExChHadronElasticPhysics.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 //
28 //
29 
31 
32 #include "G4SystemOfUnits.hh"
33 #include "G4ParticleDefinition.hh"
34 #include "G4ProcessManager.hh"
35 
36 #include "G4MesonConstructor.hh"
37 #include "G4BaryonConstructor.hh"
38 #include "G4IonConstructor.hh"
39 
41 #include "G4HadronElastic.hh"
42 #include "G4ChipsElasticModel.hh"
44 #include "G4AntiNuclElastic.hh"
45 
46 #include "G4BGGNucleonElasticXS.hh"
47 #include "G4BGGPionElasticXS.hh"
48 #include "G4NeutronElasticXS.hh"
49 
51 
54 
56 #include "G4CrossSectionElastic.hh"
57 
58 // factory
60 //
61 
62 // Wrapper
65 
67 //
68 G4ThreadLocal G4bool ExExChHadronElasticPhysics::wasActivated = false;
70  ExExChHadronElasticPhysics::neutronModel = 0;
72  ExExChHadronElasticPhysics::neutronProcess = 0;
73 
74 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
75 
77 : G4VPhysicsConstructor("hElasticWEL_CHIPS"), verbose(ver)
78 {
79  if(verbose > 1) {
80  G4cout << "### ExExChHadronElasticPhysics: " << GetPhysicsName()
81  << G4endl;
82  }
83 }
84 
85 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
86 
88 {}
89 
90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
91 
93 {
94  G4MesonConstructor pMesonConstructor;
95  pMesonConstructor.ConstructParticle();
96 
97  G4BaryonConstructor pBaryonConstructor;
98  pBaryonConstructor.ConstructParticle();
99 
100  G4IonConstructor pConstructor;
101  pConstructor.ConstructParticle();
102 }
103 
104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
105 
107 {
108  if(wasActivated) { return; }
109  wasActivated = true;
110 
111  const G4double elimitPi = 1.0*GeV;
112  const G4double elimitAntiNuc = 100.*MeV;
113  const G4double delta = 0.1*MeV;
114  if(verbose > 1) {
115  G4cout << "### HadronElasticPhysics::ConstructProcess: Elimit for pi "
116  << elimitPi/GeV << " GeV" << G4endl;
117  G4cout << " for anti-neuclei "
118  << elimitAntiNuc/GeV << " GeV" << G4endl;
119  }
120 
121  G4AntiNuclElastic* anuc = new G4AntiNuclElastic();
122  anuc->SetMinEnergy(elimitAntiNuc);
123  G4CrossSectionElastic* anucxs =
125 
126  G4HadronElastic* lhep0 = new G4HadronElastic();
127  G4HadronElastic* lhep1 = new G4HadronElastic();
128  G4HadronElastic* lhep2 = new G4HadronElastic();
129  lhep1->SetMaxEnergy(elimitPi+delta);
130  lhep2->SetMaxEnergy(elimitAntiNuc+delta);
131 
133  neutronModel = new G4ChipsElasticModel();
134 
136  he->SetMinEnergy(elimitPi);
137 
139  particleIterator->reset();
140  while( (*particleIterator)() )
141  {
142  G4ParticleDefinition* particle = particleIterator->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 
165  XWrapperDiscreteProcess* hel_wrapper =
167  hel_wrapper->RegisterProcess(hel,1);
168  pmanager->AddDiscreteProcess(hel_wrapper);
169 
170  if(verbose > 1) {
171  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
172  << " added for " << particle->GetParticleName() << G4endl;
173  }
174 
175  } else if(pname == "proton") {
176 
178 
180  Instance()->GetCrossSectionDataSet(
182 
183  hel->RegisterMe(chipsp);
184 
185  XWrapperDiscreteProcess* hel_wrapper =
187  hel_wrapper->RegisterProcess(hel,1);
188  pmanager->AddDiscreteProcess(hel_wrapper);
189  if(verbose > 1) {
190  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
191  << " added for " << particle->GetParticleName() << G4endl;
192  }
193 
194  } else if(pname == "neutron") {
195 
196  neutronProcess = new G4HadronElasticProcess();
197  //neutronProcess->AddDataSet(new G4BGGNucleonElasticXS(particle));
198  neutronProcess->AddDataSet(
200  Instance()->GetCrossSectionDataSet(
202  neutronProcess->RegisterMe(neutronModel);
203  pmanager->AddDiscreteProcess(neutronProcess);
204  if(verbose > 1) {
205  G4cout << "### HadronElasticPhysics: "
206  << neutronProcess->GetProcessName()
207  << " added for " << particle->GetParticleName() << G4endl;
208  }
209 
210  } else if (pname == "pi+" || pname == "pi-") {
211 
213  hel->AddDataSet(new G4BGGPionElasticXS(particle));
214  hel->RegisterMe(lhep1);
215  hel->RegisterMe(he);
216  XWrapperDiscreteProcess* hel_wrapper =
218  hel_wrapper->RegisterProcess(hel,1);
219  pmanager->AddDiscreteProcess(hel_wrapper);
220 
221  if(verbose > 1) {
222  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
223  << " added for " << particle->GetParticleName() << G4endl;
224  }
225 
226  } else if(pname == "kaon-" ||
227  pname == "kaon+" ||
228  pname == "kaon0S" ||
229  pname == "kaon0L"
230  ) {
231 
233  hel->RegisterMe(lhep0);
234  XWrapperDiscreteProcess* hel_wrapper =
236  hel_wrapper->RegisterProcess(hel,1);
237  pmanager->AddDiscreteProcess(hel_wrapper);
238  if(verbose > 1) {
239  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
240  << " added for " << particle->GetParticleName() << G4endl;
241  }
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  XWrapperDiscreteProcess* hel_wrapper =
256  hel_wrapper->RegisterProcess(hel,1);
257  pmanager->AddDiscreteProcess(hel_wrapper);
258  }
259  }
260 }
261 
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
Definition of the XWrapperContinuousDiscreteProcess class.
static void ConstructParticle()
#define G4ThreadLocal
Definition: tls.hh:89
static void ConstructParticle()
int G4int
Definition: G4Types.hh:78
G4ComponentAntiNuclNuclearXS * GetComponentCrossSection()
const G4String & GetParticleName() const
static void ConstructParticle()
void RegisterMe(G4HadronicInteraction *a)
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
void SetMinEnergy(G4double anEnergy)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
static const char * Default_Name()
const G4String & GetPhysicsName() const
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
string pname
Definition: eplot.py:33
Definition of the XWrapperDiscreteProcess class.
G4ProcessManager * GetProcessManager() const
static constexpr double GeV
Definition: G4SIunits.hh:217
Definition of the ExExChHadronElasticPhysics class.
void SetMaxEnergy(const G4double anEnergy)
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
static const char * Default_Name()
#define G4endl
Definition: G4ios.hh:61
static constexpr double MeV
Definition: G4SIunits.hh:214
void RegisterProcess(G4VDiscreteProcess *)
double G4double
Definition: G4Types.hh:76
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)