ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4HadronDElasticPhysics.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4HadronDElasticPhysics.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 // ClassName: G4HadronDElasticPhysics
29 //
30 // Author: 11 April 2006 V. Ivanchenko
31 //
32 // Modified:
33 // 05.07.2006 V.Ivanchenko define process by particle name;
34 // fix problem of initialisation of HP
35 // 24.07.2006 V.Ivanchenko add G4NeutronHPElasticData
36 // 10.08.2006 V.Ivanchenko separate neutrons from other particles
37 // 17.11.2006 V.Ivanchenko do not redefine G4HadronElastic default parameters
38 // 19.02.2007 V.Ivanchenko set QModelLowLimit and LowestEnergyLimit to zero
39 // 19.02.2007 A.Howard set QModelLowLimit and LowestEnergyLimit to zero
40 // for neutrons
41 // 06.03.2007 V.Ivanchenko use updated interface to G4UElasticCrossSection
42 // 03.06.2010 V.Ivanchenko cleanup constructors and ConstructProcess method
43 //
44 //----------------------------------------------------------------------------
45 //
46 // Diffuse optical model for sampling scattering
47 // BBG cross sections for p, pi+-
48 // XS cross sections for n
49 // LHEP cross sections for other particles
50 
52 
53 #include "G4SystemOfUnits.hh"
54 #include "G4ParticleDefinition.hh"
55 #include "G4ProcessManager.hh"
56 #include "G4HadronicProcess.hh"
57 
58 #include "G4MesonConstructor.hh"
59 #include "G4BaryonConstructor.hh"
60 #include "G4IonConstructor.hh"
61 #include "G4Neutron.hh"
62 
64 #include "G4HadronElastic.hh"
66 #include "G4AntiNuclElastic.hh"
67 
68 #include "G4BGGNucleonElasticXS.hh"
69 #include "G4BGGPionElasticXS.hh"
70 #include "G4NeutronElasticXS.hh"
71 
75 
79 
80 #include "G4CrossSectionElastic.hh"
81 #include "G4DiffuseElastic.hh"
82 
83 // factory
85 //
87 
89  : G4VPhysicsConstructor("hElasticDIFFUSE"), verbose(ver)
90 {
91  if(verbose > 1) {
92  G4cout << "### G4HadronDElasticPhysics: " << GetPhysicsName()
93  << G4endl;
94  }
95 }
96 
98 {}
99 
101 {
102  // G4cout << "G4HadronDElasticPhysics::ConstructParticle" << G4endl;
103  G4MesonConstructor pMesonConstructor;
104  pMesonConstructor.ConstructParticle();
105 
106  G4BaryonConstructor pBaryonConstructor;
107  pBaryonConstructor.ConstructParticle();
108 
109  // Construct light ions
110  G4IonConstructor pConstructor;
111  pConstructor.ConstructParticle();
112 }
113 
115 {
116  const G4double elimitAntiNuc = 100.1*MeV;
117  if(verbose > 1) {
118  G4cout << "### HadronDElasticPhysics Construct Processes "
119  << " for anti-neuclei "
120  << elimitAntiNuc/GeV << " GeV" << G4endl;
121  }
122 
123  G4AntiNuclElastic* anuc = new G4AntiNuclElastic();
124  anuc->SetMinEnergy(elimitAntiNuc);
125  G4CrossSectionElastic* anucxs =
127 
128  G4VCrossSectionDataSet* theComponentGGHadronNucleusData =
130 
131  G4VCrossSectionDataSet* theComponentGGNuclNuclData =
133 
134  G4HadronElastic* lhep0 = new G4HadronElastic();
135  G4HadronElastic* lhep1 = new G4HadronElastic();
136  lhep1->SetMaxEnergy(10.1*MeV);
137  G4HadronElastic* lhep2 = new G4HadronElastic();
138  lhep2->SetMaxEnergy(elimitAntiNuc);
139 
140  G4DiffuseElastic* model = nullptr;
141  G4HadronElasticProcess* hel = nullptr;
142 
143  auto myParticleIterator=GetParticleIterator();
144  myParticleIterator->reset();
145  while( (*myParticleIterator)() )
146  {
147  G4ParticleDefinition* particle = myParticleIterator->value();
148  G4ProcessManager* pmanager = particle->GetProcessManager();
149  G4String pname = particle->GetParticleName();
150  if(pname == "anti_lambda" ||
151  pname == "anti_omega-" ||
152  pname == "anti_sigma-" ||
153  pname == "anti_sigma0" ||
154  pname == "anti_sigma+" ||
155  pname == "anti_xi-" ||
156  pname == "anti_xi0" ||
157  pname == "lambda" ||
158  pname == "omega-" ||
159  pname == "sigma-" ||
160  pname == "sigma0" ||
161  pname == "sigma+" ||
162  pname == "xi-" ||
163  pname == "xi0"
164  ) {
165 
166  hel = new G4HadronElasticProcess();
167  hel->RegisterMe(lhep0);
168  hel->AddDataSet( theComponentGGHadronNucleusData );
169  pmanager->AddDiscreteProcess(hel);
170  if(verbose > 1) {
171  G4cout << "### HadronDElasticPhysics: " << hel->GetProcessName()
172  << " added for " << particle->GetParticleName() << G4endl;
173  }
174 
175  } else if(pname == "proton") {
176 
177  hel = new G4HadronElasticProcess();
178  hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
179  model = new G4DiffuseElastic();
180  hel->RegisterMe(lhep1);
181  hel->RegisterMe(model);
182  pmanager->AddDiscreteProcess(hel);
183  if(verbose > 1) {
184  G4cout << "### HadronDElasticPhysics: " << hel->GetProcessName()
185  << " added for " << particle->GetParticleName() << G4endl;
186  }
187  } else if(pname == "neutron") {
188 
189  hel = new G4HadronElasticProcess();
190  hel->AddDataSet(new G4NeutronElasticXS());
191  model = new G4DiffuseElastic();
192  hel->RegisterMe(lhep1);
193  hel->RegisterMe(model);
194  pmanager->AddDiscreteProcess(hel);
195  if(verbose > 1) {
196  G4cout << "### HadronDElasticPhysics: "
197  << hel->GetProcessName()
198  << " added for " << particle->GetParticleName() << G4endl;
199  }
200  } else if (pname == "pi+" || pname == "pi-") {
201 
202  hel = new G4HadronElasticProcess();
203  hel->AddDataSet(new G4BGGPionElasticXS(particle));
204  model = new G4DiffuseElastic();
205  hel->RegisterMe(lhep1);
206  hel->RegisterMe(model);
207  pmanager->AddDiscreteProcess(hel);
208  if(verbose > 1) {
209  G4cout << "### HadronDElasticPhysics: " << hel->GetProcessName()
210  << " added for " << particle->GetParticleName() << G4endl;
211  }
212  } else if(pname == "kaon-" ||
213  pname == "kaon+" ||
214  pname == "kaon0S" ||
215  pname == "kaon0L"
216  ) {
217 
218  hel = new G4HadronElasticProcess();
219  model = new G4DiffuseElastic();
220  hel->RegisterMe(lhep1);
221  hel->RegisterMe(model);
222  hel->AddDataSet( theComponentGGHadronNucleusData );
223  pmanager->AddDiscreteProcess(hel);
224  if(verbose > 1) {
225  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
226  << " added for " << particle->GetParticleName() << G4endl;
227  }
228  } else if(pname == "alpha" ||
229  pname == "deuteron" ||
230  pname == "triton" ||
231  pname == "He3"
232  ) {
233  hel = new G4HadronElasticProcess();
234  hel->AddDataSet(theComponentGGNuclNuclData);
235  hel->RegisterMe(lhep0);
236  pmanager->AddDiscreteProcess(hel);
237  if(verbose > 1) {
238  G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
239  << " added for " << particle->GetParticleName() << G4endl;
240  }
241 
242  } else if(
243  pname == "anti_neutron" ||
244  pname == "anti_proton" ||
245  pname == "anti_alpha" ||
246  pname == "anti_deuteron" ||
247  pname == "anti_triton" ||
248  pname == "anti_He3" ) {
249 
250  hel = new G4HadronElasticProcess();
251  hel->AddDataSet(anucxs);
252  hel->RegisterMe(lhep2);
253  hel->RegisterMe(anuc);
254  pmanager->AddDiscreteProcess(hel);
255  }
256  }
257  if(verbose > 1) {
258  G4cout << "### HadronDElasticPhysics Construct Processes " << G4endl;
259  }
260 }
261 
262