Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4HadronElasticPhysics.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//
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"
47#include "G4ProcessManager.hh"
48
49#include "G4MesonConstructor.hh"
51#include "G4IonConstructor.hh"
52
54#include "G4HadronElastic.hh"
57#include "G4AntiNuclElastic.hh"
58
60#include "G4BGGPionElasticXS.hh"
61
63
64#include "G4NeutronElasticXS.hh"
65
67#include "G4HadronicBuilder.hh"
68#include "G4HadParticles.hh"
69#include "G4HadProcesses.hh"
70#include "G4PhysListUtil.hh"
71#include "G4BuilderType.hh"
72
73// factory
75//
77//
78
81{
83 if(ver > 1) {
84 G4cout << "### G4HadronElasticPhysics: " << GetPhysicsName()
85 << G4endl;
86 }
88}
89
91{
92 G4MesonConstructor pMesonConstructor;
93 pMesonConstructor.ConstructParticle();
94
95 G4BaryonConstructor pBaryonConstructor;
96 pBaryonConstructor.ConstructParticle();
97
98 G4IonConstructor pConstructor;
99 pConstructor.ConstructParticle();
100}
101
103{
105 G4bool useFactorXS = param->ApplyFactorXS();
108
109 const G4double elimitAntiNuc = 100.*MeV;
110 const G4double delta = 0.1*MeV;
111 G4double emax = std::max(param->GetMaxEnergy(), elimitAntiNuc+delta);
112 if ( param->GetVerboseLevel() > 1 ) {
113 G4cout << "### HadronElasticPhysics::ConstructProcess: "
114 << "Elimit for for anti-neuclei " << elimitAntiNuc/CLHEP::GeV << " GeV"
115 << " for all hadrons Emax(GeV)= " << emax/CLHEP::GeV
116 << G4endl;
117 }
118
119 G4HadronElastic* lhep0 = new G4HadronElastic();
120 G4HadronElastic* lhep2 = new G4HadronElastic();
121 lhep0->SetMaxEnergy(emax);
122 lhep2->SetMaxEnergy(elimitAntiNuc+delta);
123
125 he->SetMaxEnergy(emax);
126
128 anuc->SetMinEnergy(elimitAntiNuc);
129 anuc->SetMaxEnergy(emax);
130
131 auto anucxs = G4HadProcesses::ElasticXS("AntiAGlauber");
132 auto xsNN = G4HadProcesses::ElasticXS("Glauber-Gribov Nucl-nucl");
133
134 // p
137 hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
139 if ( useFactorXS ) hel->MultiplyCrossSectionBy( param->XSFactorNucleonElastic() );
140 ph->RegisterProcess(hel, particle);
141
142 // n
143 hel = new G4HadronElasticProcess();
146
147 // pi+
148 particle = G4PionPlus::PionPlus();
149 hel = new G4HadronElasticProcess();
150 hel->AddDataSet(new G4BGGPionElasticXS(particle));
151 hel->RegisterMe(he);
152 if ( useFactorXS ) hel->MultiplyCrossSectionBy( param->XSFactorPionElastic() );
153 ph->RegisterProcess(hel, particle);
154
155 // pi-
156 particle = G4PionMinus::PionMinus();
157 hel = new G4HadronElasticProcess();
158 hel->AddDataSet(new G4BGGPionElasticXS(particle));
159 hel->RegisterMe(he);
160 if ( useFactorXS ) hel->MultiplyCrossSectionBy( param->XSFactorPionElastic() );
161 ph->RegisterProcess(hel, particle);
162
163 // kaons
165
166 // d, t, He3, alpha
167 for ( auto & pdg : G4HadParticles::GetLightIons() ) {
168 particle = table->FindParticle( pdg );
169 if ( particle == nullptr ) { continue; }
170
171 hel = new G4HadronElasticProcess();
172 hel->AddDataSet(xsNN);
173 hel->RegisterMe(lhep0);
174 if( useFactorXS ) hel->MultiplyCrossSectionBy( param->XSFactorHadronElastic() );
175 ph->RegisterProcess(hel, particle);
176 }
177
178 // high energy particles
179 if( emax > param->EnergyThresholdForHeavyHadrons() ) {
180
181 // pbar, nbar, anti light ions
182 for( auto & pdg : G4HadParticles::GetLightAntiIons() ) {
183 particle = table->FindParticle( pdg );
184 if ( particle == nullptr ) { continue; }
185
186 hel = new G4HadronElasticProcess();
187 hel->RegisterMe(lhep2);
188 hel->RegisterMe(anuc);
189 hel->AddDataSet(anucxs);
190 if( useFactorXS ) hel->MultiplyCrossSectionBy( param->XSFactorHadronElastic() );
191 ph->RegisterProcess(hel, particle);
192 }
193
194 // hyperons
197
198 // b-, c- baryons and mesons
199 if( G4HadronicParameters::Instance()->EnableBCParticles() ) {
201 }
202
203 // light hypernuclei and anti-hypernuclei
204 if ( G4HadronicParameters::Instance()->EnableHyperNuclei() ) {
205 // for light hypernuclei, we can use directly the following method:
207 // but not for light anti-hypernuclei, because they need a different cross section:
208 for ( auto & pdg : G4HadParticles::GetHyperAntiNuclei() ) {
209 particle = table->FindParticle( pdg );
210 if ( particle == nullptr ) continue;
211 hel = new G4HadronElasticProcess;
212 hel->AddDataSet( anucxs );
213 hel->RegisterMe( lhep0 );
214 if ( useFactorXS ) hel->MultiplyCrossSectionBy( param->XSFactorHadronElastic() );
215 ph->RegisterProcess( hel, particle );
216 }
217 }
218 }
219}
220
226
229{
230 G4HadronElastic* mod = nullptr;
232 if ( nullptr != hel ) {
233 const std::vector<G4HadronicInteraction*>& hi = hel->GetHadronicInteractionList();
234 if ( !hi.empty() ) {
235 for (auto const & p : hi) {
236 auto ptr = dynamic_cast<G4HadronElastic*>(p);
237 if ( nullptr != ptr ) {
238 mod = ptr;
239 break;
240 }
241 }
242 }
243 }
244 return mod;
245}
246
251
256
258 G4VCrossSectionDataSet* cross) const
259{
261 if ( nullptr != hel ) { hel->AddDataSet(cross); }
262}
263
264
@ bHadronElastic
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
static void ConstructParticle()
static const std::vector< G4int > & GetBCHadrons()
static const std::vector< G4int > & GetAntiHyperons()
static const std::vector< G4int > & GetLightAntiIons()
static const std::vector< G4int > & GetHyperNuclei()
static const std::vector< G4int > & GetLightIons()
static const std::vector< G4int > & GetKaons()
static const std::vector< G4int > & GetHyperons()
static const std::vector< G4int > & GetHyperAntiNuclei()
static G4CrossSectionElastic * ElasticXS(const G4String &componentName)
static void BuildNeutronElastic(G4HadronicProcess *)
G4HadronElastic * GetElasticModel(const G4ParticleDefinition *part) const
G4HadronElastic * GetNeutronModel() const
G4HadronicProcess * GetNeutronProcess() const
G4HadronElasticPhysics(G4int ver=1, const G4String &nam="hElasticWEL_CHIPS_XS")
G4HadronicProcess * GetElasticProcess(const G4ParticleDefinition *part) const
void AddXSection(const G4ParticleDefinition *, G4VCrossSectionDataSet *) const
static void BuildElastic(const std::vector< G4int > &particleList)
void SetMinEnergy(G4double anEnergy)
void SetMaxEnergy(const G4double anEnergy)
G4double XSFactorPionElastic() const
static G4HadronicParameters * Instance()
G4double XSFactorNucleonElastic() const
void SetVerboseLevel(const G4int val)
G4double EnergyThresholdForHeavyHadrons() const
G4double XSFactorHadronElastic() const
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
std::vector< G4HadronicInteraction * > & GetHadronicInteractionList()
void MultiplyCrossSectionBy(G4double factor)
void RegisterMe(G4HadronicInteraction *a)
static void ConstructParticle()
static void ConstructParticle()
static G4Neutron * Neutron()
Definition G4Neutron.cc:101
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
static G4HadronicProcess * FindElasticProcess(const G4ParticleDefinition *)
G4bool RegisterProcess(G4VProcess *process, G4ParticleDefinition *particle)
static G4PhysicsListHelper * GetPhysicsListHelper()
static G4PionMinus * PionMinus()
static G4PionPlus * PionPlus()
Definition G4PionPlus.cc:93
static G4Proton * Proton()
Definition G4Proton.cc:90
const G4String & GetPhysicsName() const