Geant4 10.7.0
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
72// factory
74//
76//
77
79 : G4VPhysicsConstructor(nam), verbose(ver)
80{
81 if(verbose > 1) {
82 G4cout << "### G4HadronElasticPhysics: " << GetPhysicsName()
83 << G4endl;
84 }
85}
86
88{}
89
91{
92 // G4cout << "G4HadronElasticPhysics::ConstructParticle" << G4endl;
93 G4MesonConstructor pMesonConstructor;
94 pMesonConstructor.ConstructParticle();
95
96 G4BaryonConstructor pBaryonConstructor;
97 pBaryonConstructor.ConstructParticle();
98
99 G4IonConstructor pConstructor;
100 pConstructor.ConstructParticle();
101}
102
104{
106 G4bool useFactorXS = param->ApplyFactorXS();
109
110 const G4double elimitAntiNuc = 100.*MeV;
111 const G4double delta = 0.1*MeV;
112 G4double emax = std::max(param->GetMaxEnergy(), elimitAntiNuc+delta);
113 if(verbose > 1) {
114 G4cout << "### HadronElasticPhysics::ConstructProcess: "
115 << "Elimit for for anti-neuclei " << elimitAntiNuc/CLHEP::GeV << " GeV"
116 << " for all hadrons Emax(GeV)= " << emax/CLHEP::GeV
117 << G4endl;
118 }
119
120 G4HadronElastic* lhep0 = new G4HadronElastic();
121 G4HadronElastic* lhep2 = new G4HadronElastic();
122 lhep0->SetMaxEnergy(emax);
123 lhep2->SetMaxEnergy(elimitAntiNuc+delta);
124
126 he->SetMaxEnergy(emax);
127
129 anuc->SetMinEnergy(elimitAntiNuc);
130 anuc->SetMaxEnergy(emax);
131
132 auto anucxs = G4HadProcesses::ElasticXS("AntiAGlauber");
133 auto xsNN = G4HadProcesses::ElasticXS("Glauber-Gribov Nucl-nucl");
134
135 // p
138 hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
140 if( useFactorXS ) hel->MultiplyCrossSectionBy( param->XSFactorNucleonElastic() );
141 ph->RegisterProcess(hel, particle);
142
143 // n
144 particle = G4Neutron::Neutron();
145 hel = new G4HadronElasticProcess();
146 hel->AddDataSet(new G4NeutronElasticXS());
148 if( useFactorXS ) hel->MultiplyCrossSectionBy( param->XSFactorNucleonElastic() );
149 ph->RegisterProcess(hel, particle);
150
151 // pi+
152 particle = G4PionPlus::PionPlus();
153 hel = new G4HadronElasticProcess();
154 hel->AddDataSet(new G4BGGPionElasticXS(particle));
155 hel->RegisterMe(he);
156 if( useFactorXS ) hel->MultiplyCrossSectionBy( param->XSFactorPionElastic() );
157 ph->RegisterProcess(hel, particle);
158
159 // pi-
160 particle = G4PionMinus::PionMinus();
161 hel = new G4HadronElasticProcess();
162 hel->AddDataSet(new G4BGGPionElasticXS(particle));
163 hel->RegisterMe(he);
164 if( useFactorXS ) hel->MultiplyCrossSectionBy( param->XSFactorPionElastic() );
165 ph->RegisterProcess(hel, particle);
166
167 // kaons
169
170 // d, t, He3, alpha
171 for( auto & pdg : G4HadParticles::GetLightIons() ) {
172 particle = table->FindParticle( pdg );
173 if ( particle == nullptr ) { continue; }
174
175 hel = new G4HadronElasticProcess();
176 hel->AddDataSet(xsNN);
177 hel->RegisterMe(lhep0);
178 if( useFactorXS ) hel->MultiplyCrossSectionBy( param->XSFactorHadronElastic() );
179 ph->RegisterProcess(hel, particle);
180 }
181
182 // high energy particles
183 if( emax > param->EnergyThresholdForHeavyHadrons() ) {
184
185 // pbar, nbar, anti light ions
186 for( auto & pdg : G4HadParticles::GetLightAntiIons() ) {
187 particle = table->FindParticle( pdg );
188 if ( particle == nullptr ) { continue; }
189
190 hel = new G4HadronElasticProcess();
191 hel->RegisterMe(lhep2);
192 hel->RegisterMe(anuc);
193 hel->AddDataSet(anucxs);
194 if( useFactorXS ) hel->MultiplyCrossSectionBy( param->XSFactorHadronElastic() );
195 ph->RegisterProcess(hel, particle);
196 }
197
198 // hyperons
201
202 // b-, c- baryons and mesons
203 if( G4HadronicParameters::Instance()->EnableBCParticles() ) {
205 }
206 }
207}
208
211{
213}
214
217{
218 G4HadronElastic* mod = nullptr;
220 if(hel) {
221 std::vector<G4HadronicInteraction*>& hi = hel->GetHadronicInteractionList();
222 if( !hi.empty() ) { mod = static_cast<G4HadronElastic*>(hi[0]); }
223 }
224 return mod;
225}
226
228{
230}
231
233{
235}
236
238 G4VCrossSectionDataSet* cross) const
239{
241 if(hel) { hel->AddDataSet(cross); }
242}
243
244
#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:57
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 > & GetLightIons()
static const std::vector< G4int > & GetKaons()
static const std::vector< G4int > & GetHyperons()
static G4CrossSectionElastic * ElasticXS(const G4String &componentName)
G4HadronElastic * GetElasticModel(const G4ParticleDefinition *part) const
G4HadronElastic * GetNeutronModel() const
G4HadronicProcess * GetNeutronProcess() const
G4HadronicProcess * GetElasticProcess(const G4ParticleDefinition *part) const
void AddXSection(const G4ParticleDefinition *, G4VCrossSectionDataSet *) const
G4HadronElasticPhysics(G4int ver=0, const G4String &nam="hElasticWEL_CHIPS_XS")
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
G4double EnergyThresholdForHeavyHadrons() const
G4double XSFactorHadronElastic() const
G4double GetMaxEnergy() 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:103
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
static G4HadronicProcess * FindElasticProcess(const G4ParticleDefinition *)
G4bool RegisterProcess(G4VProcess *process, G4ParticleDefinition *particle)
static G4PhysicsListHelper * GetPhysicsListHelper()
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:97
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:97
static G4Proton * Proton()
Definition: G4Proton.cc:92
const G4String & GetPhysicsName() const