Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4HadronPhysicsQGSP_BIC.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_BIC
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// 25.04.2007 G.Folger: Add code for quasielastic
37// 31.10.2012 A.Ribon: Use G4MiscBuilder
38// 19.03.2013 A.Ribon: Replace LEP with FTFP and BERT
39// 05.05.2020 A.Ribon: Use QGSP for antibaryons at high energies
40// 07.05.2020 A.Ribon: Use QGSP for hyperons (and anti-hyperons) at high energies
41//
42//----------------------------------------------------------------------------
43//
44#include <iomanip>
45
47
48#include "G4PiKBuilder.hh"
49#include "G4FTFPPiKBuilder.hh"
50#include "G4QGSPPiKBuilder.hh"
52
53#include "G4ProtonBuilder.hh"
57
58#include "G4NeutronBuilder.hh"
62#include "globals.hh"
63#include "G4ios.hh"
64#include "G4SystemOfUnits.hh"
66#include "G4ParticleTable.hh"
67
68#include "G4MesonConstructor.hh"
71#include "G4IonConstructor.hh"
72
75#include "G4NeutronCaptureXS.hh"
76
77#include "G4PhysListUtil.hh"
78#include "G4HadParticles.hh"
80#include "G4HadronicBuilder.hh"
81#include "G4BuilderType.hh"
82
84
86
88 : G4HadronPhysicsQGSP_BIC("hInelastic QGSP_BIC",true)
89{
91}
92
95{
97 QuasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
98 QuasiElasticQGS= true; // For QGS, it must use it.
109}
110
112{
113 Neutron();
114 Proton();
115 Pion();
116 Others();
117}
118
120{
122 G4bool useFactorXS = param->ApplyFactorXS();
123
124 auto neu = new G4NeutronBuilder;
125 AddBuilder(neu);
127 AddBuilder(qgs);
128 qgs->SetMinEnergy(minQGSP_neutron);
129 neu->RegisterMe(qgs);
131 AddBuilder(ftf);
132 ftf->SetMinEnergy(minFTFP_neutron);
133 ftf->SetMaxEnergy(maxFTFP_neutron);
134 neu->RegisterMe(ftf);
135 auto bic = new G4BinaryNeutronBuilder;
136 AddBuilder(bic);
137 bic->SetMinEnergy(minBIC_neutron);
138 bic->SetMaxEnergy(maxBIC_neutron);
139 neu->RegisterMe(bic);
140 neu->Build();
141
142 const G4ParticleDefinition* neutron = G4Neutron::Neutron();
144 if(inel) {
145 inel->AddDataSet(new G4NeutronInelasticXS());
146 if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
147 }
149 if (capture) {
150 capture->RegisterMe(new G4NeutronRadCapture());
151 }
152}
153
155{
157 G4bool useFactorXS = param->ApplyFactorXS();
158
159 auto pro = new G4ProtonBuilder;
160 AddBuilder(pro);
161 auto qgs = new G4QGSPProtonBuilder(QuasiElasticQGS);
162 AddBuilder(qgs);
163 qgs->SetMinEnergy(minQGSP_proton);
164 pro->RegisterMe(qgs);
165 auto ftf = new G4FTFPProtonBuilder(QuasiElasticFTF);
166 AddBuilder(ftf);
167 ftf->SetMinEnergy(minFTFP_proton);
168 ftf->SetMaxEnergy(maxFTFP_proton);
169 pro->RegisterMe(ftf);
170 auto bic = new G4BinaryProtonBuilder;
171 AddBuilder(bic);
172 bic->SetMinEnergy(minBIC_proton);
173 bic->SetMaxEnergy(maxBIC_proton);
174 pro->RegisterMe(bic);
175 pro->Build();
176
177 const G4ParticleDefinition* proton = G4Proton::Proton();
179 if(inel) {
180 if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
181 }
182}
183
185{
187 G4bool useFactorXS = param->ApplyFactorXS();
188
189 auto pik = new G4PiKBuilder();
190 AddBuilder(pik);
191 auto qgs = new G4QGSPPiKBuilder(QuasiElasticQGS);
192 AddBuilder(qgs);
193 qgs->SetMinEnergy(minQGSP_pik);
194 pik->RegisterMe(qgs);
195 auto ftf = new G4FTFPPiKBuilder(QuasiElasticFTF);
196 AddBuilder(ftf);
197 ftf->SetMaxEnergy(maxFTFP_pik);
198 ftf->SetMinEnergy(minFTFP_pik);
199 pik->RegisterMe(ftf);
200 auto bert = new G4BertiniPiKBuilder();
201 AddBuilder(bert);
202 bert->SetMaxEnergy(maxBERT_pik);
203 pik->RegisterMe(bert);
204 pik->Build();
205
206 // add cross section factor
207 if( useFactorXS ) {
210 if(inel) {
212 }
213 pion = G4PionMinus::PionMinus();
215 if(inel) {
217 }
219 for( auto & pdg : G4HadParticles::GetKaons() ) {
220 auto part = table->FindParticle( pdg );
221 if ( part == nullptr ) { continue; }
223 if(inel) {
225 }
226 }
227 }
228}
229
231{
233
234 // high energy particles
235 if( param->GetMaxEnergy() > param->EnergyThresholdForHeavyHadrons() ) {
236
237 // anti light ions
239
240 // hyperons
242
243 // b-, c- baryons and mesons
244 if( param->EnableBCParticles() ) {
246 }
247 }
248}
249
251{}
252
254{
255 G4MesonConstructor pMesonConstructor;
256 pMesonConstructor.ConstructParticle();
257
258 G4BaryonConstructor pBaryonConstructor;
259 pBaryonConstructor.ConstructParticle();
260
261 G4ShortLivedConstructor pShortLivedConstructor;
262 pShortLivedConstructor.ConstructParticle();
263
264 G4IonConstructor pIonConstructor;
265 pIonConstructor.ConstructParticle();
266}
267
269{
270 // allow changing of parameters at PreInit
280
281 if(G4Threading::IsMasterThread() && param->GetVerboseLevel() > 0) {
282 DumpBanner();
283 }
284 CreateModels();
285}
@ bHadronInelastic
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
static void ConstructParticle()
static const std::vector< G4int > & GetKaons()
G4HadronPhysicsQGSP_BIC(G4int verbose=1)
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)
G4bool EnableBCParticles() const
G4double EnergyThresholdForHeavyHadrons() const
G4double XSFactorHadronInelastic() const
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)
G4bool IsMasterThread()
Definition: G4Threading.cc:124