Geant4 10.7.0
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
79#include "G4NeutronCaptureXS.hh"
80
81#include "G4PhysListUtil.hh"
82#include "G4HadParticles.hh"
84#include "G4HadronicBuilder.hh"
85
87//
89
91 : G4HadronPhysicsQGSP_BERT("hInelastic QGSP_BERT",true) {}
92
95{
96 QuasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
97 QuasiElasticQGS= true; // For QGS, it must use it.
108 param->SetEnableBCParticles(true);
109}
110
112{
113 Neutron();
114 Proton();
115 Pion();
116 Others();
117}
118
120{
122 G4bool useFactorXS = param->ApplyFactorXS();
123 //General schema:
124 // 1) Create a builder
125 // 2) Call AddBuilder
126 // 3) Configure the builder, possibly with sub-builders
127 // 4) Call builder->Build()
128 auto neu = new G4NeutronBuilder;
129 AddBuilder(neu);
131 AddBuilder(qgs);
132 qgs->SetMinEnergy(minQGSP_neutron);
133 neu->RegisterMe(qgs);
135 AddBuilder(ftf);
136 ftf->SetMinEnergy(minFTFP_neutron);
137 ftf->SetMaxEnergy(maxFTFP_neutron);
138 neu->RegisterMe(ftf);
139 auto bert = new G4BertiniNeutronBuilder;
140 AddBuilder(bert);
141 bert->SetMinEnergy(minBERT_neutron);
142 bert->SetMaxEnergy(maxBERT_neutron);
143 neu->RegisterMe(bert);
144 neu->Build();
145
146 const G4ParticleDefinition* neutron = G4Neutron::Neutron();
148 if(inel) {
149 inel->AddDataSet(new G4NeutronInelasticXS());
150 if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
151 }
153 if (capture) {
154 capture->RegisterMe(new G4NeutronRadCapture());
155 }
156}
157
159{
161 G4bool useFactorXS = param->ApplyFactorXS();
162
163 auto pro = new G4ProtonBuilder;
164 AddBuilder(pro);
165 auto qgs = new G4QGSPProtonBuilder(QuasiElasticQGS);
166 AddBuilder(qgs);
167 qgs->SetMinEnergy(minQGSP_proton);
168 pro->RegisterMe(qgs);
169 auto ftf = new G4FTFPProtonBuilder(QuasiElasticFTF);
170 AddBuilder(ftf);
171 ftf->SetMinEnergy(minFTFP_proton);
172 ftf->SetMaxEnergy(maxFTFP_proton);
173 pro->RegisterMe(ftf);
174 auto bert = new G4BertiniProtonBuilder;
175 AddBuilder(bert);
176 bert->SetMinEnergy(minBERT_proton);
177 bert->SetMaxEnergy(maxBERT_proton);
178 pro->RegisterMe(bert);
179 pro->Build();
180
181 const G4ParticleDefinition* proton = G4Proton::Proton();
183 if(inel) {
184 if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
185 }
186}
187
189{
191 G4bool useFactorXS = param->ApplyFactorXS();
192
193 auto pik = new G4PiKBuilder;
194 AddBuilder(pik);
195 auto qgs = new G4QGSPPiKBuilder(QuasiElasticQGS);
196 AddBuilder(qgs);
197 qgs->SetMinEnergy(minQGSP_pik);
198 pik->RegisterMe(qgs);
199 auto ftf = new G4FTFPPiKBuilder(QuasiElasticFTF);
200 AddBuilder(ftf);
201 ftf->SetMinEnergy(minFTFP_pik);
202 ftf->SetMaxEnergy(maxFTFP_pik);
203 pik->RegisterMe(ftf);
204 auto bert = new G4BertiniPiKBuilder;
205 AddBuilder(bert);
206 bert->SetMinEnergy(minBERT_pik);
207 bert->SetMaxEnergy(maxBERT_pik);
208 pik->RegisterMe(bert);
209 pik->Build();
210
211 // add cross section factor
212 if( useFactorXS ) {
215 if(inel) {
217 }
218 pion = G4PionMinus::PionMinus();
220 if(inel) {
222 }
224 for( auto & pdg : G4HadParticles::GetKaons() ) {
225 auto part = table->FindParticle( pdg );
226 if ( part == nullptr ) { continue; }
228 if(inel) {
230 }
231 }
232 }
233}
234
236{
238
239 // high energy particles
240 if( param->GetMaxEnergy() > param->EnergyThresholdForHeavyHadrons() ) {
241
242 // anti light ions
244
245 // hyperons
247
248 // b-, c- baryons and mesons
249 if( param->EnableBCParticles() ) {
251 }
252 }
253}
254
256{}
257
259{
260 G4MesonConstructor pMesonConstructor;
261 pMesonConstructor.ConstructParticle();
262
263 G4BaryonConstructor pBaryonConstructor;
264 pBaryonConstructor.ConstructParticle();
265
266 G4ShortLivedConstructor pShortLivedConstructor;
267 pShortLivedConstructor.ConstructParticle();
268
269 G4IonConstructor pIonConstructor;
270 pIonConstructor.ConstructParticle();
271}
272
274{
275 // allow changing of parameters at PreInit
284
286 DumpBanner();
287 }
288 CreateModels();
289}
290
292{
293 G4cout << G4endl;
294 G4cout << " " << GetPhysicsName() << " Thresholds: " << G4endl;
295 G4cout << " 1) between BERT and FTF/P over the interval "
296 << minFTFP_proton/GeV << " to " << maxBERT_proton/GeV << " GeV. " << G4endl;
297 G4cout << " 2) between FTF/P and QGS/P over the interval "
298 << minQGSP_proton/GeV << " to " << maxFTFP_proton/GeV << " GeV. " << G4endl;
299 G4cout << " -- quasiElastic: " << QuasiElasticQGS << " for QGS "
300 << " and " << QuasiElasticFTF << " for FTF" << G4endl;
301}
302
303
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)
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 > & 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
G4bool EnableBCParticles() const
G4double EnergyThresholdForHeavyHadrons() const
G4double XSFactorHadronInelastic() const
void SetEnableBCParticles(G4bool val)
G4double GetMaxEnergyTransitionQGS_FTF() const
G4double XSFactorPionInelastic() const
G4double GetMaxEnergy() 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:103
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
static G4HadronicProcess * FindInelasticProcess(const G4ParticleDefinition *)
static G4HadronicProcess * FindCaptureProcess(const G4ParticleDefinition *)
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:97
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:97
static G4Proton * Proton()
Definition: G4Proton.cc:92
void AddBuilder(G4PhysicsBuilderInterface *bld)
const G4String & GetPhysicsName() const
G4bool IsMasterThread()
Definition: G4Threading.cc:124