Geant4  10.03
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 // $Id: G4HadronPhysicsFTFP_BERT.cc 101872 2016-12-02 14:02:40Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName:
31 //
32 // Author: 2007 Gunter Folger
33 // created from G4HadronPhysicsFTFP
34 //
35 // Modified:
36 //
37 //----------------------------------------------------------------------------
38 //
39 #include <iomanip>
40 
42 
43 #include "globals.hh"
44 #include "G4ios.hh"
45 #include "G4SystemOfUnits.hh"
46 #include "G4ParticleDefinition.hh"
47 #include "G4ParticleTable.hh"
48 
49 #include "G4MesonConstructor.hh"
50 #include "G4BaryonConstructor.hh"
52 
56 #include "G4NeutronRadCapture.hh"
57 #include "G4NeutronInelasticXS.hh"
58 #include "G4NeutronCaptureXS.hh"
59 
61 
62 #include "G4PhysListUtil.hh"
63 
64 // factory
66 //
68 
70 
72  : G4VPhysicsConstructor("hInelastic FTFP_BERT")
73 /* , theNeutrons(0)
74  , theBertiniNeutron(0)
75  , theFTFPNeutron(0)
76  , thePion(0)
77  , theBertiniPion(0)
78  , theFTFPPion(0)
79  , theKaon(0)
80  , theBertiniKaon(0)
81  , theFTFPKaon(0)
82  , thePro(0)
83  , theBertiniPro(0)
84  , theFTFPPro(0)
85  , theHyperon(0)
86  , theAntiBaryon(0)
87  , theFTFPAntiBaryon(0) */
88  , QuasiElastic(false)
89  /*, xsKaon(0)
90  , xsNeutronInelasticXS(0)
91  , xsNeutronCaptureXS(0)*/
92 {}
93 
95  : G4VPhysicsConstructor(name)
96 /* , theNeutrons(0)
97  , theBertiniNeutron(0)
98  , theFTFPNeutron(0)
99  , thePion(0)
100  , theBertiniPion(0)
101  , theFTFPPion(0)
102  , theKaon(0)
103  , theBertiniKaon(0)
104  , theFTFPKaon(0)
105  , thePro(0)
106  , theBertiniPro(0)
107  , theFTFPPro(0)
108  , theHyperon(0)
109  , theAntiBaryon(0)
110  , theFTFPAntiBaryon(0)*/
111  , QuasiElastic(quasiElastic)
112  /*, xsKaonMinus(0)
113  , xsNeutronInelasticXS(0)
114  , xsNeutronCaptureXS(0)*/
115 {}
116 
118 {
119  G4double minFTFP_pion = 3.0 * GeV;
120  G4double maxBERT_pion = 12.0 * GeV;
121  G4double minFTFP_kaon = 3.0 * GeV;
122  G4double maxBERT_kaon = 12.0 * GeV;
123  G4double minFTFP_proton = 3.0 * GeV;
124  G4double maxBERT_proton = 12.0 * GeV;
125  G4double minFTFP_neutron = 3.0 * GeV;
126  G4double maxBERT_neutron = 12.0 * GeV;
127 
128  G4cout << G4endl
129  << " FTFP_BERT : new threshold between BERT and FTFP is over the interval " << G4endl
130  << " for pions : " << minFTFP_pion/GeV << " to " << maxBERT_pion/GeV << " GeV" << G4endl
131  << " for kaons : " << minFTFP_kaon/GeV << " to " << maxBERT_kaon/GeV << " GeV" << G4endl
132  << " for proton : " << minFTFP_proton/GeV << " to " << maxBERT_proton/GeV << " GeV" << G4endl
133  << " for neutron : " << minFTFP_neutron/GeV << " to " << maxBERT_neutron/GeV << " GeV" << G4endl
134  << G4endl;
135 
139  tpdata->theFTFPNeutron->SetMinEnergy(minFTFP_neutron);
142  tpdata->theBertiniNeutron->SetMaxEnergy(maxBERT_neutron);
143 
147  tpdata->theFTFPPro->SetMinEnergy(minFTFP_proton);
149  tpdata->theBertiniPro->SetMaxEnergy(maxBERT_proton);
150 
154  tpdata->theFTFPPion->SetMinEnergy(minFTFP_pion);
156  tpdata->theBertiniPion->SetMaxEnergy(maxBERT_pion);
157 
161  tpdata->theFTFPKaon->SetMinEnergy(minFTFP_kaon);
163  tpdata->theBertiniKaon->SetMaxEnergy(maxBERT_kaon);
164 
166 
169 }
170 
172 {
173  if (!tpdata) return;
174 
175  delete tpdata->theNeutrons;
176  delete tpdata->theBertiniNeutron;
177  delete tpdata->theFTFPNeutron;
178 
179  delete tpdata->thePion;
180  delete tpdata->theBertiniPion;
181  delete tpdata->theFTFPPion;
182 
183  delete tpdata->theKaon;
184  delete tpdata->theBertiniKaon;
185  delete tpdata->theFTFPKaon;
186 
187  delete tpdata->thePro;
188  delete tpdata->theBertiniPro;
189  delete tpdata->theFTFPPro;
190 
191  delete tpdata->theHyperon;
192  delete tpdata->theAntiBaryon;
193  delete tpdata->theFTFPAntiBaryon;
194 
195  //Note that here we need to set to 0 the pointer
196  //since tpdata is static and if thread are "reused"
197  //it can be problematic
198  delete tpdata; tpdata = 0;
199 }
200 
202 {
203  G4MesonConstructor pMesonConstructor;
204  pMesonConstructor.ConstructParticle();
205 
206  G4BaryonConstructor pBaryonConstructor;
207  pBaryonConstructor.ConstructParticle();
208 
209  G4ShortLivedConstructor pShortLivedConstructor;
210  pShortLivedConstructor.ConstructParticle();
211 }
212 
213 #include "G4ProcessManager.hh"
215 {
216  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
217  CreateModels();
219  tpdata->thePro->Build();
220  tpdata->thePion->Build();
221  tpdata->theKaon->Build();
222 
223  // --- Kaons ---
230 
231  tpdata->theHyperon->Build();
233 
234  // --- Neutrons ---
237 
238  G4HadronicProcess* capture = 0;
240  G4ProcessVector* pv = pmanager->GetProcessList();
241  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
242  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
243  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
244  }
245  }
246  if ( ! capture ) {
247  capture = new G4HadronCaptureProcess("nCapture");
248  pmanager->AddDiscreteProcess(capture);
249  }
252  capture->RegisterMe(new G4NeutronRadCapture());
253 }
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=true)
void RegisterMe(G4VPionBuilder *aB)
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4KaonZeroLong * KaonZeroLong()
void SetMinEnergy(G4double aM)
static const char * Default_Name()
const char * name(G4int ptype)
static void ConstructParticle()
#define G4ThreadLocal
Definition: tls.hh:89
static void ConstructParticle()
int G4int
Definition: G4Types.hh:78
static G4KaonMinus * KaonMinus()
Definition: G4KaonMinus.cc:113
void RegisterMe(G4HadronicInteraction *a)
static G4HadronicProcess * FindInelasticProcess(const G4ParticleDefinition *)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
G4GLOB_DLL std::ostream G4cout
void SetMinEnergy(G4double aM)
static G4KaonZeroShort * KaonZeroShort()
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT)
bool G4bool
Definition: G4Types.hh:79
void SetMaxEnergy(G4double aM)
static G4CrossSectionDataSetRegistry * Instance()
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
void SetMinEnergy(G4double aM)
G4int size() const
static const char * Default_Name()
G4ProcessManager * GetProcessManager() const
static G4ThreadLocal ThreadPrivate * tpdata
void RegisterMe(G4VAntiBarionBuilder *aB)
static constexpr double GeV
Definition: G4SIunits.hh:217
void RegisterMe(G4VProtonBuilder *aB)
void SetMaxEnergy(G4double aM)
#define G4endl
Definition: G4ios.hh:61
void RegisterMe(G4VNeutronBuilder *aB)
void RegisterMe(G4VKaonBuilder *aB)
double G4double
Definition: G4Types.hh:76
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
void SetMinEnergy(G4double aM)
G4ProcessVector * GetProcessList() const