Geant4 10.7.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 "G4HyperonBuilder.hh"
68
69#include "G4MesonConstructor.hh"
72#include "G4IonConstructor.hh"
73
77#include "G4NeutronCaptureXS.hh"
78
79#include "G4PhysListUtil.hh"
80#include "G4HadParticles.hh"
82#include "G4HadronicBuilder.hh"
83
84// factory
86//
88
90 G4HadronPhysicsFTFP_BERT("hInelastic FTFP_BERT",false)
91{}
92
94 : G4VPhysicsConstructor(name), QuasiElastic(qe)
95{
106 param->SetEnableBCParticles(true);
107}
108
110{}
111
113{
114 G4MesonConstructor pMesonConstructor;
115 pMesonConstructor.ConstructParticle();
116
117 G4BaryonConstructor pBaryonConstructor;
118 pBaryonConstructor.ConstructParticle();
119
120 G4ShortLivedConstructor pShortLivedConstructor;
121 pShortLivedConstructor.ConstructParticle();
122
123 G4IonConstructor pIonConstructor;
124 pIonConstructor.ConstructParticle();
125}
126
128{
129 G4cout << G4endl
130 << " " << GetPhysicsName() << " : threshold between BERT and FTFP is over the interval " << G4endl
131 << " for pions : " << minFTFP_pion/GeV << " to " << maxBERT_pion/GeV << " GeV" << G4endl
132 << " for kaons : " << minFTFP_kaon/GeV << " to " << maxBERT_kaon/GeV << " GeV" << G4endl
133 << " for proton : " << minFTFP_proton/GeV << " to " << maxBERT_proton/GeV << " GeV" << G4endl
134 << " for neutron : " << minFTFP_neutron/GeV << " to " << maxBERT_neutron/GeV << " GeV" << G4endl
135 << G4endl;
136}
137
139{
140 Neutron();
141 Proton();
142 Pion();
143 Kaon();
144 Others();
145}
146
148{
150 G4bool useFactorXS = param->ApplyFactorXS();
151 //General schema:
152 // 1) Create a builder
153 // 2) Call AddBuilder
154 // 3) Configure the builder, possibly with sub-builders
155 // 4) Call builder->Build()
156 auto neu = new G4NeutronBuilder;
157 AddBuilder(neu);
158 auto ftfpn = new G4FTFPNeutronBuilder(QuasiElastic);
159 AddBuilder( ftfpn );
160 neu->RegisterMe(ftfpn);
161 ftfpn->SetMinEnergy(minFTFP_neutron);
162 auto bertn = new G4BertiniNeutronBuilder;
163 AddBuilder(bertn);
164 neu->RegisterMe(bertn);
165 bertn->SetMinEnergy(minBERT_neutron);
166 bertn->SetMaxEnergy(maxBERT_neutron);
167 neu->Build();
168
169 const G4ParticleDefinition* neutron = G4Neutron::Neutron();
171 if(inel) {
172 inel->AddDataSet(new G4NeutronInelasticXS());
173 if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
174 }
176 if (capture) {
177 capture->RegisterMe(new G4NeutronRadCapture());
178 }
179}
180
182{
184 G4bool useFactorXS = param->ApplyFactorXS();
185
186 auto pro = new G4ProtonBuilder;
187 AddBuilder(pro);
188 auto ftfpp = new G4FTFPProtonBuilder(QuasiElastic);
189 AddBuilder(ftfpp);
190 pro->RegisterMe(ftfpp);
191 ftfpp->SetMinEnergy(minFTFP_proton);
192 auto bertp = new G4BertiniProtonBuilder;
193 AddBuilder(bertp);
194 pro->RegisterMe(bertp);
195 bertp->SetMinEnergy(minBERT_proton);
196 bertp->SetMaxEnergy(maxBERT_proton);
197 pro->Build();
198
199 const G4ParticleDefinition* proton = G4Proton::Proton();
201 if(inel) {
202 if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
203 }
204}
205
207{
209 G4bool useFactorXS = param->ApplyFactorXS();
210
211 auto pi = new G4PionBuilder;
212 AddBuilder(pi);
213 auto ftfppi = new G4FTFPPionBuilder(QuasiElastic);
214 AddBuilder(ftfppi);
215 pi->RegisterMe(ftfppi);
216 ftfppi->SetMinEnergy(minFTFP_pion);
217 auto bertpi = new G4BertiniPionBuilder;
218 AddBuilder(bertpi);
219 pi->RegisterMe(bertpi);
220 bertpi->SetMaxEnergy(maxBERT_pion);
221 pi->Build();
222
223 // add cross section factor
224 if( useFactorXS ) {
227 if(inel) {
229 }
230 pion = G4PionMinus::PionMinus();
232 if(inel) {
234 }
235 }
236}
237
239{
241 G4bool useFactorXS = param->ApplyFactorXS();
242
243 auto k = new G4KaonBuilder;
244 AddBuilder(k);
245 auto ftfpk = new G4FTFPKaonBuilder(QuasiElastic);
246 AddBuilder(ftfpk);
247 k->RegisterMe(ftfpk);
248 ftfpk->SetMinEnergy(minFTFP_kaon);
249 auto bertk = new G4BertiniKaonBuilder;
250 AddBuilder(bertk);
251 k->RegisterMe(bertk);
252 bertk->SetMaxEnergy(maxBERT_kaon);
253 k->Build();
254
255 // add cross section factor
256 if( useFactorXS ) {
258 for( auto & pdg : G4HadParticles::GetKaons() ) {
259 auto part = table->FindParticle( pdg );
260 if ( part == nullptr ) { continue; }
262 if(inel) {
264 }
265 }
266 }
267}
268
270{
272
273 // high energy particles
274 if( param->GetMaxEnergy() > param->EnergyThresholdForHeavyHadrons() ) {
275
276 // anti light ions
278
279 // hyperons
281
282 // b-, c- baryons and mesons
283 if( param->EnableBCParticles() ) {
285 }
286 }
287}
288
290{
300
302 DumpBanner();
303 }
304 CreateModels();
305}
#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 BuildBCHadronsFTFP_BERT()
static void BuildHyperonsFTFP_BERT()
static void BuildAntiLightIonsFTFP()
static G4HadronicParameters * Instance()
G4double GetMinEnergyTransitionFTF_Cascade() const
G4double GetMaxEnergyTransitionFTF_Cascade() const
G4bool EnableBCParticles() const
G4double EnergyThresholdForHeavyHadrons() const
G4double XSFactorHadronInelastic() const
void SetEnableBCParticles(G4bool val)
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