Geant4 11.4.0
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 "G4MesonConstructor.hh"
67#include "G4IonConstructor.hh"
68
71#include "G4NeutronCaptureXS.hh"
72
73#include "G4PhysListUtil.hh"
74#include "G4HadParticles.hh"
76#include "G4HadronicBuilder.hh"
77#include "G4BuilderType.hh"
78
79// factory
81//
83
89
106
108{
109 G4MesonConstructor pMesonConstructor;
110 pMesonConstructor.ConstructParticle();
111
112 G4BaryonConstructor pBaryonConstructor;
113 pBaryonConstructor.ConstructParticle();
114
115 G4ShortLivedConstructor pShortLivedConstructor;
116 pShortLivedConstructor.ConstructParticle();
117
118 G4IonConstructor pIonConstructor;
119 pIonConstructor.ConstructParticle();
120}
121
123{
124 G4cout << G4endl
125 << " " << GetPhysicsName() << " : threshold between BERT and FTFP is over the interval " << G4endl
126 << " for pions : " << minFTFP_pion/GeV << " to " << maxBERT_pion/GeV << " GeV" << G4endl
127 << " for kaons : " << minFTFP_kaon/GeV << " to " << maxBERT_kaon/GeV << " GeV" << G4endl
128 << " for proton : " << minFTFP_proton/GeV << " to " << maxBERT_proton/GeV << " GeV" << G4endl
129 << " for neutron : " << minFTFP_neutron/GeV << " to " << maxBERT_neutron/GeV << " GeV" << G4endl
130 << G4endl;
131}
132
134{
135 Neutron();
136 Proton();
137 Pion();
138 Kaon();
139 Others();
140}
141
143{
145 G4bool useFactorXS = param->ApplyFactorXS();
146 //General schema:
147 // 1) Create a builder
148 // 2) Call AddBuilder
149 // 3) Configure the builder, possibly with sub-builders
150 // 4) Call builder->Build()
151 auto neu = new G4NeutronBuilder;
152 AddBuilder(neu);
153 auto ftfpn = new G4FTFPNeutronBuilder(QuasiElastic);
154 AddBuilder( ftfpn );
155 neu->RegisterMe(ftfpn);
156 ftfpn->SetMinEnergy(minFTFP_neutron);
157 auto bertn = new G4BertiniNeutronBuilder;
158 AddBuilder(bertn);
159 neu->RegisterMe(bertn);
160 bertn->SetMinEnergy(minBERT_neutron);
161 bertn->SetMaxEnergy(maxBERT_neutron);
162 neu->Build();
163
164 const G4ParticleDefinition* neutron = G4Neutron::Neutron();
166 if(nullptr != inel) {
167 inel->AddDataSet(new G4NeutronInelasticXS());
168 if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
169 }
171 if (nullptr != capture) {
172 capture->RegisterMe(new G4NeutronRadCapture());
173 }
174}
175
177{
179 G4bool useFactorXS = param->ApplyFactorXS();
180
181 auto pro = new G4ProtonBuilder;
182 AddBuilder(pro);
183 auto ftfpp = new G4FTFPProtonBuilder(QuasiElastic);
184 AddBuilder(ftfpp);
185 pro->RegisterMe(ftfpp);
186 ftfpp->SetMinEnergy(minFTFP_proton);
187 auto bertp = new G4BertiniProtonBuilder;
188 AddBuilder(bertp);
189 pro->RegisterMe(bertp);
190 bertp->SetMinEnergy(minBERT_proton);
191 bertp->SetMaxEnergy(maxBERT_proton);
192 pro->Build();
193
194 const G4ParticleDefinition* proton = G4Proton::Proton();
196 if(nullptr != inel) {
197 if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
198 }
199}
200
202{
204 G4bool useFactorXS = param->ApplyFactorXS();
205
206 auto pi = new G4PionBuilder;
207 AddBuilder(pi);
208 auto ftfppi = new G4FTFPPionBuilder(QuasiElastic);
209 AddBuilder(ftfppi);
210 pi->RegisterMe(ftfppi);
211 ftfppi->SetMinEnergy(minFTFP_pion);
212 auto bertpi = new G4BertiniPionBuilder;
213 AddBuilder(bertpi);
214 pi->RegisterMe(bertpi);
215 bertpi->SetMaxEnergy(maxBERT_pion);
216 pi->Build();
217
218 // add cross section factor
219 if( useFactorXS ) {
222 if(nullptr != inel) {
224 }
225 pion = G4PionMinus::PionMinus();
227 if(nullptr != inel) {
229 }
230 }
231}
232
234{
236 G4bool useFactorXS = param->ApplyFactorXS();
237
238 auto k = new G4KaonBuilder;
239 AddBuilder(k);
240 auto ftfpk = new G4FTFPKaonBuilder(QuasiElastic);
241 AddBuilder(ftfpk);
242 k->RegisterMe(ftfpk);
243 ftfpk->SetMinEnergy(minFTFP_kaon);
244 auto bertk = new G4BertiniKaonBuilder;
245 AddBuilder(bertk);
246 k->RegisterMe(bertk);
247 bertk->SetMaxEnergy(maxBERT_kaon);
248 k->Build();
249
250 // add cross section factor
251 if( useFactorXS ) {
253 for( auto & pdg : G4HadParticles::GetKaons() ) {
254 auto part = table->FindParticle( pdg );
255 if ( part == nullptr ) { continue; }
257 if(nullptr != inel) {
259 }
260 }
261 }
262}
263
265{
267
268 // high energy particles
269 if( param->GetMaxEnergy() > param->EnergyThresholdForHeavyHadrons() ) {
270
271 // anti light ions
273
274 // hyperons
276
277 // b-, c- baryons and mesons
278 if( param->EnableBCParticles() ) {
280 }
281
282 // light hypernuclei and anti-hypernuclei
283 if ( param->EnableHyperNuclei() ) {
286 }
287 }
288}
289
@ 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
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
G4VPhysicsConstructor(const G4String &="")
void AddBuilder(G4PhysicsBuilderInterface *bld)
const G4String & GetPhysicsName() const
G4bool IsMasterThread()