ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4HadronElasticPhysics.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4HadronElasticPhysics.cc
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 //
27 //---------------------------------------------------------------------------
28 //
29 // ClassName: G4HadronElasticPhysics
30 //
31 // Author: 23 November 2006 V. Ivanchenko
32 //
33 // Modified:
34 // 21.03.2007 V.Ivanchenko Use G4BGGNucleonElasticXS and G4BGGPionElasticXS;
35 // Reduce thresholds for HE and Q-models to zero
36 // 03.06.2010 V.Ivanchenko cleanup constructors and ConstructProcess method
37 // 29.07.2010 V.Ivanchenko rename this class from G4HadronHElasticPhysics to
38 // G4HadronElasticPhysics, old version of the class
39 // is renamed to G4HadronElasticPhysics93
40 //
41 //----------------------------------------------------------------------------
42 //
44 
45 #include "G4SystemOfUnits.hh"
46 #include "G4ParticleDefinition.hh"
47 #include "G4ProcessManager.hh"
48 
49 #include "G4MesonConstructor.hh"
50 #include "G4BaryonConstructor.hh"
51 #include "G4IonConstructor.hh"
52 
54 #include "G4HadronElastic.hh"
55 #include "G4ChipsElasticModel.hh"
57 #include "G4AntiNuclElastic.hh"
58 
61 
62 #include "G4BGGNucleonElasticXS.hh"
63 #include "G4BGGPionElasticXS.hh"
64 
66 
68 
69 #include "G4NeutronElasticXS.hh"
70 
71 #include "G4CrossSectionElastic.hh"
72 
73 // factory
75 //
77 //
78 
80  : G4VPhysicsConstructor(nam), verbose(ver)
81 {
82  if(verbose > 1) {
83  G4cout << "### G4HadronElasticPhysics: " << GetPhysicsName()
84  << G4endl;
85  }
86 }
87 
89 {}
90 
92 {
93  // G4cout << "G4HadronElasticPhysics::ConstructParticle" << G4endl;
94  G4MesonConstructor pMesonConstructor;
95  pMesonConstructor.ConstructParticle();
96 
97  G4BaryonConstructor pBaryonConstructor;
98  pBaryonConstructor.ConstructParticle();
99 
100  G4IonConstructor pConstructor;
101  pConstructor.ConstructParticle();
102 }
103 
105 {
106  const G4double elimitAntiNuc = 100.*MeV;
107  const G4double delta = 0.1*MeV;
108  if(verbose > 1) {
109  G4cout << "### HadronElasticPhysics::ConstructProcess: "
110  << "Elimit for for anti-neuclei " << elimitAntiNuc/GeV << " GeV"
111  << G4endl;
112  }
113 
114  G4AntiNuclElastic* anuc = new G4AntiNuclElastic();
115  anuc->SetMinEnergy(elimitAntiNuc);
116  G4CrossSectionElastic* anucxs =
118 
119  G4HadronElastic* lhep0 = new G4HadronElastic();
120  G4HadronElastic* lhep2 = new G4HadronElastic();
121  lhep2->SetMaxEnergy(elimitAntiNuc+delta);
122 
124 
125  G4VCrossSectionDataSet* theComponentGGHadronNucleusData =
127 
128  G4VCrossSectionDataSet* theComponentGGNuclNuclData =
130 
131  G4HadronElasticProcess* hel = nullptr;
132 
133  auto myParticleIterator=GetParticleIterator();
134  myParticleIterator->reset();
135  while( (*myParticleIterator)() )
136  {
137  G4ParticleDefinition* particle = myParticleIterator->value();
138  G4ProcessManager* pmanager = particle->GetProcessManager();
139  G4String pname = particle->GetParticleName();
140  if(pname == "anti_lambda" ||
141  pname == "anti_omega-" ||
142  pname == "anti_sigma-" ||
143  pname == "anti_sigma0" ||
144  pname == "anti_sigma+" ||
145  pname == "anti_xi-" ||
146  pname == "anti_xi0" ||
147  pname == "lambda" ||
148  pname == "omega-" ||
149  pname == "sigma-" ||
150  pname == "sigma0" ||
151  pname == "sigma+" ||
152  pname == "xi-" ||
153  pname == "xi0"
154  ) {
155 
156  hel = new G4HadronElasticProcess();
157  hel->RegisterMe(lhep0);
158  hel->AddDataSet( theComponentGGHadronNucleusData );
159  pmanager->AddDiscreteProcess(hel);
160  if(verbose > 1) {
161  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
162  << " added for " << particle->GetParticleName() << G4endl;
163  }
164 
165  } else if(pname == "alpha" ||
166  pname == "deuteron" ||
167  pname == "triton" ||
168  pname == "He3"
169  ) {
170  hel = new G4HadronElasticProcess();
171  hel->AddDataSet(theComponentGGNuclNuclData);
172  hel->RegisterMe(lhep0);
173  pmanager->AddDiscreteProcess(hel);
174  if(verbose > 1) {
175  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
176  << " added for " << particle->GetParticleName() << G4endl;
177  }
178 
179  } else if(pname == "proton") {
180 
181  hel = new G4HadronElasticProcess();
182  hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
183  hel->RegisterMe(new G4ChipsElasticModel());
184  pmanager->AddDiscreteProcess(hel);
185  if(verbose > 1) {
186  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
187  << " added for " << particle->GetParticleName() << G4endl;
188  }
189 
190  } else if(pname == "neutron") {
191 
192  hel = new G4HadronElasticProcess();
193  hel->AddDataSet(new G4NeutronElasticXS());
194  hel->RegisterMe(new G4ChipsElasticModel());
195  pmanager->AddDiscreteProcess(hel);
196  if(verbose > 1) {
197  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
198  << " added for " << particle->GetParticleName() << G4endl;
199  }
200 
201  } else if (pname == "pi+" || pname == "pi-") {
202 
203  hel = new G4HadronElasticProcess();
204  hel->AddDataSet(new G4BGGPionElasticXS(particle));
205  hel->RegisterMe(he);
206  pmanager->AddDiscreteProcess(hel);
207  if(verbose > 1) {
208  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
209  << " added for " << particle->GetParticleName() << G4endl;
210  }
211 
212  } else if(pname == "kaon-" ||
213  pname == "kaon+" ||
214  pname == "kaon0S" ||
215  pname == "kaon0L"
216  ) {
217 
218  hel = new G4HadronElasticProcess();
219  //AR-14Aug2017 : Replaced Gheisha elastic kaon cross sections with
220  // Grichine's Glauber-Gribov ones. In this way, the
221  // total (elastic + inelastic) kaon cross sections
222  // are consistent with the PDG ones.
223  // For the time being, kept Gheisha elastic as
224  // final-state model.
225  hel->AddDataSet( theComponentGGHadronNucleusData );
226  hel->RegisterMe(lhep0);
227  pmanager->AddDiscreteProcess(hel);
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_neutron" ||
236  pname == "anti_alpha" ||
237  pname == "anti_deuteron" ||
238  pname == "anti_triton" ||
239  pname == "anti_He3" ) {
240 
241  hel = new G4HadronElasticProcess();
242  hel->AddDataSet(anucxs);
243  hel->RegisterMe(lhep2);
244  hel->RegisterMe(anuc);
245  pmanager->AddDiscreteProcess(hel);
246  }
247  }
248 }
249 
252 {
253  G4HadronicProcess* hp = nullptr;
255  size_t n = pv->size();
256  for(size_t i=0; i<n; ++i) {
257  if((*pv)[i]->GetProcessSubType() == fHadronElastic) {
258  hp = static_cast<G4HadronicProcess*>((*pv)[i]);
259  break;
260  }
261  }
262  return hp;
263 }
264 
267 {
268  G4HadronElastic* mod = nullptr;
270  if(hel) {
271  std::vector<G4HadronicInteraction*>& hi = hel->GetHadronicInteractionList();
272  if(hi.size() > 0) { mod = static_cast<G4HadronElastic*>(hi[0]); }
273  }
274  return mod;
275 }
276 
278 {
280 }
281 
283 {
285 }
286 
289 {
291  if(hel) { hel->AddDataSet(cross); }
292 }
293 
294