Geant4  10.02.p03
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"
40 #include "G4ElasticHadrNucleusHE.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 
125  G4ElasticHadrNucleusHE* he = new G4ElasticHadrNucleusHE();
126  he->SetMinEnergy(elimitPi);
127 
129  particleIterator->reset();
130  while( (*particleIterator)() )
131  {
132  G4ParticleDefinition* particle = particleIterator->value();
133  G4ProcessManager* pmanager = particle->GetProcessManager();
134  G4String pname = particle->GetParticleName();
135  if(pname == "anti_lambda" ||
136  pname == "anti_neutron" ||
137  pname == "anti_omega-" ||
138  pname == "anti_sigma-" ||
139  pname == "anti_sigma+" ||
140  pname == "anti_xi-" ||
141  pname == "anti_xi0" ||
142  pname == "lambda" ||
143  pname == "omega-" ||
144  pname == "sigma-" ||
145  pname == "sigma+" ||
146  pname == "xi-" ||
147  pname == "alpha" ||
148  pname == "deuteron" ||
149  pname == "triton"
150  ) {
151 
153  hel->RegisterMe(lhep0);
154 
155  XWrapperDiscreteProcess* hel_wrapper =
157  hel_wrapper->RegisterProcess(hel,1);
158  pmanager->AddDiscreteProcess(hel_wrapper);
159 
160  if(verbose > 1) {
161  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
162  << " added for " << particle->GetParticleName() << G4endl;
163  }
164 
165  } else if(pname == "proton") {
166 
168 
170  Instance()->GetCrossSectionDataSet(
172 
173  hel->RegisterMe(chipsp);
174 
175  XWrapperDiscreteProcess* hel_wrapper =
177  hel_wrapper->RegisterProcess(hel,1);
178  pmanager->AddDiscreteProcess(hel_wrapper);
179  if(verbose > 1) {
180  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
181  << " added for " << particle->GetParticleName() << G4endl;
182  }
183 
184  } else if(pname == "neutron") {
185 
187  //neutronProcess->AddDataSet(new G4BGGNucleonElasticXS(particle));
190  Instance()->GetCrossSectionDataSet(
194  if(verbose > 1) {
195  G4cout << "### HadronElasticPhysics: "
197  << " added for " << particle->GetParticleName() << G4endl;
198  }
199 
200  } else if (pname == "pi+" || pname == "pi-") {
201 
203  hel->AddDataSet(new G4BGGPionElasticXS(particle));
204  hel->RegisterMe(lhep1);
205  hel->RegisterMe(he);
206  XWrapperDiscreteProcess* hel_wrapper =
208  hel_wrapper->RegisterProcess(hel,1);
209  pmanager->AddDiscreteProcess(hel_wrapper);
210 
211  if(verbose > 1) {
212  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
213  << " added for " << particle->GetParticleName() << G4endl;
214  }
215 
216  } else if(pname == "kaon-" ||
217  pname == "kaon+" ||
218  pname == "kaon0S" ||
219  pname == "kaon0L"
220  ) {
221 
223  hel->RegisterMe(lhep0);
224  XWrapperDiscreteProcess* hel_wrapper =
226  hel_wrapper->RegisterProcess(hel,1);
227  pmanager->AddDiscreteProcess(hel_wrapper);
228  if(verbose > 1) {
229  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
230  << " added for " << particle->GetParticleName() << G4endl;
231  }
232 
233  } else if(
234  pname == "anti_proton" ||
235  pname == "anti_alpha" ||
236  pname == "anti_deuteron" ||
237  pname == "anti_triton" ||
238  pname == "anti_He3" ) {
239 
241  hel->AddDataSet(anucxs);
242  hel->RegisterMe(lhep2);
243  hel->RegisterMe(anuc);
244  XWrapperDiscreteProcess* hel_wrapper =
246  hel_wrapper->RegisterProcess(hel,1);
247  pmanager->AddDiscreteProcess(hel_wrapper);
248  }
249  }
250 }
251 
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
G4ProcessManager * GetProcessManager() const
static void ConstructParticle()
#define G4ThreadLocal
Definition: tls.hh:89
static void ConstructParticle()
int G4int
Definition: G4Types.hh:78
G4ComponentAntiNuclNuclearXS * GetComponentCrossSection()
static void ConstructParticle()
void RegisterMe(G4HadronicInteraction *a)
void SetMinEnergy(G4double anEnergy)
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
const G4String & GetParticleName() const
const G4String & GetPhysicsName() const
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
static const char * Default_Name()
static const double GeV
Definition: G4SIunits.hh:214
string pname
Definition: eplot.py:33
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
void RegisterProcess(G4VDiscreteProcess *)
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
double G4double
Definition: G4Types.hh:76
G4_DECLARE_PHYSCONSTR_FACTORY(ExExChHadronElasticPhysics)