Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4HadronPhysicsQGSP_BERT.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: G4HadronPhysicsQGSP_BERT
30//
31// Author: 2002 J.P. Wellisch
32//
33// Modified:
34// 23.11.2005 G.Folger: migration to non static particles
35// 08.06.2006 V.Ivanchenko: remove stopping
36// 20.06.2006 G.Folger: Bertini applies to Kaons, i.e. use SetMinEnergy instead of SetMinPionEnergy
37// 25.04.2007 G.Folger: Add code for quasielastic
38// 10.12.2007 G.Folger: Add projectilediffrative option for proton/neutron, off by default
39// 31.10.2012 A.Ribon: Use G4MiscBuilder
40// 19.03.2013 A.Ribon: Replace LEP with FTFP
41// 05.05.2020 A.Ribon: Use QGSP for antibaryons at high energies
42// 07.05.2020 A.Ribon: Use QGSP for hyperons (and anti-hyperons) at high energies
43//
44//----------------------------------------------------------------------------
45//
46#include <iomanip>
47
49
50#include "globals.hh"
51#include "G4ios.hh"
52#include "G4SystemOfUnits.hh"
54#include "G4ParticleTable.hh"
55
56#include "G4PiKBuilder.hh"
57#include "G4FTFPPiKBuilder.hh"
58#include "G4QGSPPiKBuilder.hh"
60
61#include "G4ProtonBuilder.hh"
65
66#include "G4NeutronBuilder.hh"
70
71#include "G4MesonConstructor.hh"
74#include "G4IonConstructor.hh"
75
78#include "G4NeutronCaptureXS.hh"
79
80#include "G4PhysListUtil.hh"
81#include "G4HadParticles.hh"
83#include "G4HadronicBuilder.hh"
84#include "G4BuilderType.hh"
85
87//
89
95
114
116{
117 Neutron();
118 Proton();
119 Pion();
120 Others();
121}
122
124{
126 G4bool useFactorXS = param->ApplyFactorXS();
127 //General schema:
128 // 1) Create a builder
129 // 2) Call AddBuilder
130 // 3) Configure the builder, possibly with sub-builders
131 // 4) Call builder->Build()
132 auto neu = new G4NeutronBuilder;
133 AddBuilder(neu);
135 AddBuilder(qgs);
136 qgs->SetMinEnergy(minQGSP_neutron);
137 neu->RegisterMe(qgs);
139 AddBuilder(ftf);
140 ftf->SetMinEnergy(minFTFP_neutron);
141 ftf->SetMaxEnergy(maxFTFP_neutron);
142 neu->RegisterMe(ftf);
143 auto bert = new G4BertiniNeutronBuilder;
144 AddBuilder(bert);
145 bert->SetMinEnergy(minBERT_neutron);
146 bert->SetMaxEnergy(maxBERT_neutron);
147 neu->RegisterMe(bert);
148 neu->Build();
149
150 const G4ParticleDefinition* neutron = G4Neutron::Neutron();
152 if(nullptr != inel) {
153 inel->AddDataSet(new G4NeutronInelasticXS());
154 if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
155 }
157 if (nullptr != capture) {
158 capture->RegisterMe(new G4NeutronRadCapture());
159 }
160}
161
163{
165 G4bool useFactorXS = param->ApplyFactorXS();
166
167 auto pro = new G4ProtonBuilder;
168 AddBuilder(pro);
169 auto qgs = new G4QGSPProtonBuilder(QuasiElasticQGS);
170 AddBuilder(qgs);
171 qgs->SetMinEnergy(minQGSP_proton);
172 pro->RegisterMe(qgs);
173 auto ftf = new G4FTFPProtonBuilder(QuasiElasticFTF);
174 AddBuilder(ftf);
175 ftf->SetMinEnergy(minFTFP_proton);
176 ftf->SetMaxEnergy(maxFTFP_proton);
177 pro->RegisterMe(ftf);
178 auto bert = new G4BertiniProtonBuilder;
179 AddBuilder(bert);
180 bert->SetMinEnergy(minBERT_proton);
181 bert->SetMaxEnergy(maxBERT_proton);
182 pro->RegisterMe(bert);
183 pro->Build();
184
185 const G4ParticleDefinition* proton = G4Proton::Proton();
187 if(nullptr != inel) {
188 if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
189 }
190}
191
193{
195 G4bool useFactorXS = param->ApplyFactorXS();
196
197 auto pik = new G4PiKBuilder;
198 AddBuilder(pik);
199 auto qgs = new G4QGSPPiKBuilder(QuasiElasticQGS);
200 AddBuilder(qgs);
201 qgs->SetMinEnergy(minQGSP_pik);
202 pik->RegisterMe(qgs);
203 auto ftf = new G4FTFPPiKBuilder(QuasiElasticFTF);
204 AddBuilder(ftf);
205 ftf->SetMinEnergy(minFTFP_pik);
206 ftf->SetMaxEnergy(maxFTFP_pik);
207 pik->RegisterMe(ftf);
208 auto bert = new G4BertiniPiKBuilder;
209 AddBuilder(bert);
210 bert->SetMinEnergy(minBERT_pik);
211 bert->SetMaxEnergy(maxBERT_pik);
212 pik->RegisterMe(bert);
213 pik->Build();
214
215 // add cross section factor
216 if( useFactorXS ) {
219 if(nullptr != inel) {
221 }
222 pion = G4PionMinus::PionMinus();
224 if(inel) {
226 }
228 for( auto & pdg : G4HadParticles::GetKaons() ) {
229 auto part = table->FindParticle( pdg );
230 if ( part == nullptr ) { continue; }
232 if(nullptr != inel) {
234 }
235 }
236 }
237}
238
240{
242
243 // high energy particles
244 if( param->GetMaxEnergy() > param->EnergyThresholdForHeavyHadrons() ) {
245
246 // anti light ions
248
249 // hyperons
251
252 // b-, c- baryons and mesons
253 if( param->EnableBCParticles() ) {
255 }
256 }
257}
258
261
263{
264 G4MesonConstructor pMesonConstructor;
265 pMesonConstructor.ConstructParticle();
266
267 G4BaryonConstructor pBaryonConstructor;
268 pBaryonConstructor.ConstructParticle();
269
270 G4ShortLivedConstructor pShortLivedConstructor;
271 pShortLivedConstructor.ConstructParticle();
272
273 G4IonConstructor pIonConstructor;
274 pIonConstructor.ConstructParticle();
275}
276
294
296{
297 G4cout << G4endl;
298 G4cout << " " << GetPhysicsName() << " Thresholds: " << G4endl;
299 G4cout << " 1) between BERT and FTF/P over the interval "
300 << minFTFP_proton/GeV << " to " << maxBERT_proton/GeV << " GeV. " << G4endl;
301 G4cout << " 2) between FTF/P and QGS/P over the interval "
302 << minQGSP_proton/GeV << " to " << maxFTFP_proton/GeV << " GeV. " << G4endl;
303 G4cout << " -- quasiElastic: " << QuasiElasticQGS << " for QGS "
304 << " and " << QuasiElasticFTF << " for FTF" << G4endl;
305}
306
307
@ bHadronInelastic
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)
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 > & GetKaons()
static void BuildHyperonsQGSP_FTFP_BERT(G4bool quasiElastic)
static void BuildAntiLightIonsFTFP()
static void BuildBCHadronsQGSP_FTFP_BERT(G4bool quasiElastic)
static G4HadronicParameters * Instance()
G4double GetMinEnergyTransitionFTF_Cascade() const
G4double GetMinEnergyTransitionQGS_FTF() const
G4double GetMaxEnergyTransitionFTF_Cascade() const
void SetVerboseLevel(const G4int val)
G4double EnergyThresholdForHeavyHadrons() const
G4double XSFactorHadronInelastic() const
void SetEnableBCParticles(G4bool val)
G4double GetMaxEnergyTransitionQGS_FTF() const
G4double XSFactorPionInelastic() const
G4double XSFactorNucleonInelastic() const
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
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 * FindInelasticProcess(const G4ParticleDefinition *)
static G4HadronicProcess * FindCaptureProcess(const G4ParticleDefinition *)
static G4PionMinus * PionMinus()
static G4PionPlus * PionPlus()
Definition G4PionPlus.cc:93
static G4Proton * Proton()
Definition G4Proton.cc:90
void AddBuilder(G4PhysicsBuilderInterface *bld)
const G4String & GetPhysicsName() const
G4bool IsMasterThread()