Geant4  10.02.p01
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 //
26 
28 
29 #include "G4SystemOfUnits.hh"
30 #include "G4ParticleDefinition.hh"
31 #include "G4ProcessManager.hh"
32 
33 #include "G4MesonConstructor.hh"
34 #include "G4BaryonConstructor.hh"
35 #include "G4IonConstructor.hh"
36 
38 #include "G4HadronElastic.hh"
39 #include "G4ChipsElasticModel.hh"
41 #include "G4AntiNuclElastic.hh"
42 
43 #include "G4BGGNucleonElasticXS.hh"
44 #include "G4BGGPionElasticXS.hh"
45 #include "G4NeutronElasticXS.hh"
46 
48 
51 
53 #include "G4CrossSectionElastic.hh"
54 
55 // factory
57 //
58 
59 // Wrapper
62 
64 //
70 
71 
73 : G4VPhysicsConstructor("hElasticWEL_CHIPS"), verbose(ver)
74 {
75  if(verbose > 1) {
76  G4cout << "### ExExChHadronElasticPhysics: " << GetPhysicsName()
77  << G4endl;
78  }
79 }
80 
82 {}
83 
85 {
86  G4MesonConstructor pMesonConstructor;
87  pMesonConstructor.ConstructParticle();
88 
89  G4BaryonConstructor pBaryonConstructor;
90  pBaryonConstructor.ConstructParticle();
91 
92  G4IonConstructor pConstructor;
93  pConstructor.ConstructParticle();
94 }
95 
97 {
98  if(wasActivated) { return; }
99  wasActivated = true;
100 
101  const G4double elimitPi = 1.0*GeV;
102  const G4double elimitAntiNuc = 100.*MeV;
103  const G4double delta = 0.1*MeV;
104  if(verbose > 1) {
105  G4cout << "### HadronElasticPhysics::ConstructProcess: Elimit for pi "
106  << elimitPi/GeV << " GeV" << G4endl;
107  G4cout << " for anti-neuclei "
108  << elimitAntiNuc/GeV << " GeV" << G4endl;
109  }
110 
111  G4AntiNuclElastic* anuc = new G4AntiNuclElastic();
112  anuc->SetMinEnergy(elimitAntiNuc);
113  G4CrossSectionElastic* anucxs =
115 
116  G4HadronElastic* lhep0 = new G4HadronElastic();
117  G4HadronElastic* lhep1 = new G4HadronElastic();
118  G4HadronElastic* lhep2 = new G4HadronElastic();
119  lhep1->SetMaxEnergy(elimitPi+delta);
120  lhep2->SetMaxEnergy(elimitAntiNuc+delta);
121 
124 
126  he->SetMinEnergy(elimitPi);
127 
128  aParticleIterator->reset();
129  while( (*aParticleIterator)() )
130  {
131  G4ParticleDefinition* particle = aParticleIterator->value();
132  G4ProcessManager* pmanager = particle->GetProcessManager();
133  G4String pname = particle->GetParticleName();
134  if(pname == "anti_lambda" ||
135  pname == "anti_neutron" ||
136  pname == "anti_omega-" ||
137  pname == "anti_sigma-" ||
138  pname == "anti_sigma+" ||
139  pname == "anti_xi-" ||
140  pname == "anti_xi0" ||
141  pname == "lambda" ||
142  pname == "omega-" ||
143  pname == "sigma-" ||
144  pname == "sigma+" ||
145  pname == "xi-" ||
146  pname == "alpha" ||
147  pname == "deuteron" ||
148  pname == "triton"
149  ) {
150 
152  hel->RegisterMe(lhep0);
153 
154  XWrapperDiscreteProcess* hel_wrapper =
156  hel_wrapper->RegisterProcess(hel,1);
157  pmanager->AddDiscreteProcess(hel_wrapper);
158 
159  if(verbose > 1) {
160  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
161  << " added for " << particle->GetParticleName() << G4endl;
162  }
163 
164  } else if(pname == "proton") {
165 
167 
169  Instance()->GetCrossSectionDataSet(
171 
172  hel->RegisterMe(chipsp);
173 
174  XWrapperDiscreteProcess* hel_wrapper =
176  hel_wrapper->RegisterProcess(hel,1);
177  pmanager->AddDiscreteProcess(hel_wrapper);
178  if(verbose > 1) {
179  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
180  << " added for " << particle->GetParticleName() << G4endl;
181  }
182 
183  } else if(pname == "neutron") {
184 
186  //neutronProcess->AddDataSet(new G4BGGNucleonElasticXS(particle));
189  Instance()->GetCrossSectionDataSet(
193  if(verbose > 1) {
194  G4cout << "### HadronElasticPhysics: "
196  << " added for " << particle->GetParticleName() << G4endl;
197  }
198 
199  } else if (pname == "pi+" || pname == "pi-") {
200 
202  hel->AddDataSet(new G4BGGPionElasticXS(particle));
203  hel->RegisterMe(lhep1);
204  hel->RegisterMe(he);
205  XWrapperDiscreteProcess* hel_wrapper =
207  hel_wrapper->RegisterProcess(hel,1);
208  pmanager->AddDiscreteProcess(hel_wrapper);
209 
210  if(verbose > 1) {
211  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
212  << " added for " << particle->GetParticleName() << G4endl;
213  }
214 
215  } else if(pname == "kaon-" ||
216  pname == "kaon+" ||
217  pname == "kaon0S" ||
218  pname == "kaon0L"
219  ) {
220 
222  hel->RegisterMe(lhep0);
223  XWrapperDiscreteProcess* hel_wrapper =
225  hel_wrapper->RegisterProcess(hel,1);
226  pmanager->AddDiscreteProcess(hel_wrapper);
227  if(verbose > 1) {
228  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
229  << " added for " << particle->GetParticleName() << G4endl;
230  }
231 
232  } else if(
233  pname == "anti_proton" ||
234  pname == "anti_alpha" ||
235  pname == "anti_deuteron" ||
236  pname == "anti_triton" ||
237  pname == "anti_He3" ) {
238 
240  hel->AddDataSet(anucxs);
241  hel->RegisterMe(lhep2);
242  hel->RegisterMe(anuc);
243  XWrapperDiscreteProcess* hel_wrapper =
245  hel_wrapper->RegisterProcess(hel,1);
246  pmanager->AddDiscreteProcess(hel_wrapper);
247  }
248  }
249 }
250 
static const double MeV
Definition: G4SIunits.hh:211
static G4ThreadLocal G4HadronElastic * neutronModel
static G4ThreadLocal G4HadronicProcess * neutronProcess
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 const char * Default_Name()
static const double GeV
Definition: G4SIunits.hh:214
const G4String & GetPhysicsName() const
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
void SetMaxEnergy(const G4double anEnergy)
static const char * Default_Name()
#define G4endl
Definition: G4ios.hh:61
void RegisterProcess(G4VDiscreteProcess *)
double G4double
Definition: G4Types.hh:76
G4_DECLARE_PHYSCONSTR_FACTORY(ExExChHadronElasticPhysics)