Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4HadronPhysicsFTFP_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:
30//
31// Author: 2007 Gunter Folger
32// created from G4HadronPhysicsFTFP
33//
34// Modified:
35//
36//----------------------------------------------------------------------------
37//
38#include <iomanip>
39
41
42#include "globals.hh"
43#include "G4ios.hh"
44#include "G4SystemOfUnits.hh"
46#include "G4ParticleTable.hh"
47#include "G4PionBuilder.hh"
49#include "G4FTFPPionBuilder.hh"
50
51#include "G4KaonBuilder.hh"
53#include "G4FTFPKaonBuilder.hh"
54
55#include "G4ProtonBuilder.hh"
59
60#include "G4NeutronBuilder.hh"
63
64#include "G4HyperonBuilder.hh"
68
69#include "G4MesonConstructor.hh"
72#include "G4IonConstructor.hh"
73
76#include "G4NeutronCaptureXS.hh"
77
78#include "G4PhysListUtil.hh"
79#include "G4HadParticles.hh"
81#include "G4HadronicBuilder.hh"
82#include "G4BuilderType.hh"
83
84// factory
86//
88
94
111
114
116{
117 G4MesonConstructor pMesonConstructor;
118 pMesonConstructor.ConstructParticle();
119
120 G4BaryonConstructor pBaryonConstructor;
121 pBaryonConstructor.ConstructParticle();
122
123 G4ShortLivedConstructor pShortLivedConstructor;
124 pShortLivedConstructor.ConstructParticle();
125
126 G4IonConstructor pIonConstructor;
127 pIonConstructor.ConstructParticle();
128}
129
131{
132 G4cout << G4endl
133 << " " << GetPhysicsName() << " : threshold between BERT and FTFP is over the interval " << G4endl
134 << " for pions : " << minFTFP_pion/GeV << " to " << maxBERT_pion/GeV << " GeV" << G4endl
135 << " for kaons : " << minFTFP_kaon/GeV << " to " << maxBERT_kaon/GeV << " GeV" << G4endl
136 << " for proton : " << minFTFP_proton/GeV << " to " << maxBERT_proton/GeV << " GeV" << G4endl
137 << " for neutron : " << minFTFP_neutron/GeV << " to " << maxBERT_neutron/GeV << " GeV" << G4endl
138 << G4endl;
139}
140
142{
143 Neutron();
144 Proton();
145 Pion();
146 Kaon();
147 Others();
148}
149
151{
153 G4bool useFactorXS = param->ApplyFactorXS();
154 //General schema:
155 // 1) Create a builder
156 // 2) Call AddBuilder
157 // 3) Configure the builder, possibly with sub-builders
158 // 4) Call builder->Build()
159 auto neu = new G4NeutronBuilder;
160 AddBuilder(neu);
161 auto ftfpn = new G4FTFPNeutronBuilder(QuasiElastic);
162 AddBuilder( ftfpn );
163 neu->RegisterMe(ftfpn);
164 ftfpn->SetMinEnergy(minFTFP_neutron);
165 auto bertn = new G4BertiniNeutronBuilder;
166 AddBuilder(bertn);
167 neu->RegisterMe(bertn);
168 bertn->SetMinEnergy(minBERT_neutron);
169 bertn->SetMaxEnergy(maxBERT_neutron);
170 neu->Build();
171
172 const G4ParticleDefinition* neutron = G4Neutron::Neutron();
174 if(nullptr != inel) {
175 inel->AddDataSet(new G4NeutronInelasticXS());
176 if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
177 }
179 if (nullptr != capture) {
180 capture->RegisterMe(new G4NeutronRadCapture());
181 }
182}
183
185{
187 G4bool useFactorXS = param->ApplyFactorXS();
188
189 auto pro = new G4ProtonBuilder;
190 AddBuilder(pro);
191 auto ftfpp = new G4FTFPProtonBuilder(QuasiElastic);
192 AddBuilder(ftfpp);
193 pro->RegisterMe(ftfpp);
194 ftfpp->SetMinEnergy(minFTFP_proton);
195 auto bertp = new G4BertiniProtonBuilder;
196 AddBuilder(bertp);
197 pro->RegisterMe(bertp);
198 bertp->SetMinEnergy(minBERT_proton);
199 bertp->SetMaxEnergy(maxBERT_proton);
200 pro->Build();
201
202 const G4ParticleDefinition* proton = G4Proton::Proton();
204 if(nullptr != inel) {
205 if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
206 }
207}
208
210{
212 G4bool useFactorXS = param->ApplyFactorXS();
213
214 auto pi = new G4PionBuilder;
215 AddBuilder(pi);
216 auto ftfppi = new G4FTFPPionBuilder(QuasiElastic);
217 AddBuilder(ftfppi);
218 pi->RegisterMe(ftfppi);
219 ftfppi->SetMinEnergy(minFTFP_pion);
220 auto bertpi = new G4BertiniPionBuilder;
221 AddBuilder(bertpi);
222 pi->RegisterMe(bertpi);
223 bertpi->SetMaxEnergy(maxBERT_pion);
224 pi->Build();
225
226 // add cross section factor
227 if( useFactorXS ) {
230 if(nullptr != inel) {
232 }
233 pion = G4PionMinus::PionMinus();
235 if(nullptr != inel) {
237 }
238 }
239}
240
242{
244 G4bool useFactorXS = param->ApplyFactorXS();
245
246 auto k = new G4KaonBuilder;
247 AddBuilder(k);
248 auto ftfpk = new G4FTFPKaonBuilder(QuasiElastic);
249 AddBuilder(ftfpk);
250 k->RegisterMe(ftfpk);
251 ftfpk->SetMinEnergy(minFTFP_kaon);
252 auto bertk = new G4BertiniKaonBuilder;
253 AddBuilder(bertk);
254 k->RegisterMe(bertk);
255 bertk->SetMaxEnergy(maxBERT_kaon);
256 k->Build();
257
258 // add cross section factor
259 if( useFactorXS ) {
261 for( auto & pdg : G4HadParticles::GetKaons() ) {
262 auto part = table->FindParticle( pdg );
263 if ( part == nullptr ) { continue; }
265 if(nullptr != inel) {
267 }
268 }
269 }
270}
271
273{
275
276 // high energy particles
277 if( param->GetMaxEnergy() > param->EnergyThresholdForHeavyHadrons() ) {
278
279 // anti light ions
281
282 // hyperons
284
285 // b-, c- baryons and mesons
286 if( param->EnableBCParticles() ) {
288 }
289
290 // light hypernuclei and anti-hypernuclei
291 if ( param->EnableHyperNuclei() ) {
294 }
295 }
296}
297
@ 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 BuildBCHadronsFTFP_BERT()
static void BuildHyperonsFTFP_BERT()
static void BuildAntiLightIonsFTFP()
static void BuildHyperAntiNucleiFTFP_BERT()
static void BuildHyperNucleiFTFP_BERT()
static G4HadronicParameters * Instance()
G4double GetMinEnergyTransitionFTF_Cascade() const
G4double GetMaxEnergyTransitionFTF_Cascade() const
void SetVerboseLevel(const G4int val)
G4double EnergyThresholdForHeavyHadrons() const
G4double XSFactorHadronInelastic() const
void SetEnableBCParticles(G4bool val)
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()