Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4HadronPhysicsShielding.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: G4HadronPhysicsShielding.cc 93878 2015-11-03 08:18:00Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName:
31 //
32 // Author: 2010 Tatsumi Koi, Gunter Folger
33 // created from G4HadronPhysicsFTFP_BERT
34 //
35 // Modified:
36 //
37 // 2014.08.05 K.L.Genser added provisions for modifing the Bertini to
38 // FTF transition energy region
39 //
40 //----------------------------------------------------------------------------
41 //
42 #include <iomanip>
43 
45 
46 #include "globals.hh"
47 #include "G4ios.hh"
48 #include "G4SystemOfUnits.hh"
49 #include "G4ParticleDefinition.hh"
50 #include "G4ParticleTable.hh"
51 
52 #include "G4MesonConstructor.hh"
53 #include "G4BaryonConstructor.hh"
55 #include "G4IonConstructor.hh"
56 
60 
63 #include "G4PhysListUtil.hh"
64 
68 #include "G4NeutronRadCapture.hh"
69 #include "G4NeutronCaptureXS.hh"
71 #include "G4LFission.hh"
72 
74 
75 #include "G4PhysListUtil.hh"
76 
77 // factory
79 //
81 
82 G4ThreadLocal G4HadronPhysicsShielding::ThreadPrivate*
83 G4HadronPhysicsShielding::tpdata = 0;
84 
86  : G4VPhysicsConstructor("hInelastic Shielding")
87  , useLEND_(false)
88  , evaluation_()
89  , minFTFPEnergy_(9.5*GeV)
90  , maxBertiniEnergy_(9.9*GeV)
91  , minNonHPNeutronEnergy_(19.9*MeV)
92 {}
93 
95  : G4VPhysicsConstructor(name)
96  , useLEND_(false)
97  , evaluation_()
98  , minFTFPEnergy_(9.5*GeV)
99  , maxBertiniEnergy_(9.9*GeV)
100  , minNonHPNeutronEnergy_(19.9*MeV)
101 {}
102 
104  G4int /*verbose*/, G4double minFTFPEnergy, G4double maxBertiniEnergy)
105  : G4VPhysicsConstructor(name)
106  , useLEND_(false)
107  , evaluation_()
108  , minFTFPEnergy_(minFTFPEnergy)
109  , maxBertiniEnergy_(maxBertiniEnergy)
110  , minNonHPNeutronEnergy_(19.9*MeV)
111 {}
112 
113 #include "G4NeutronLENDBuilder.hh"
114 void G4HadronPhysicsShielding::CreateModels()
115 {
116  G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
117 
118  tpdata->theNeutrons=new G4NeutronBuilder( true ); // Fission on
119  tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(quasiElasticFTF);
120  tpdata->theFTFPNeutron->SetMinEnergy(minFTFPEnergy_);
121  tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron);
122  tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron=new G4BertiniNeutronBuilder);
123  tpdata->theBertiniNeutron->SetMinEnergy(minNonHPNeutronEnergy_);
124  tpdata->theBertiniNeutron->SetMaxEnergy(maxBertiniEnergy_);
125  //tpdata->theNeutrons->RegisterMe(tpdata->theHPNeutron=new G4NeutronPHPBuilder);
126 
127  if ( useLEND_ != true )
128  tpdata->theNeutrons->RegisterMe(tpdata->theLENeutron=new G4NeutronPHPBuilder);
129  else
130  {
131  tpdata->theNeutrons->RegisterMe(tpdata->theLENeutron=new G4NeutronLENDBuilder(evaluation_));
132  }
133 
134  tpdata->thePro=new G4ProtonBuilder;
135  tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasticFTF);
136  tpdata->theFTFPPro->SetMinEnergy(minFTFPEnergy_);
137  tpdata->thePro->RegisterMe(tpdata->theFTFPPro);
138  tpdata->thePro->RegisterMe(tpdata->theBertiniPro=new G4BertiniProtonBuilder);
139  tpdata->theBertiniPro->SetMaxEnergy(maxBertiniEnergy_);
140 
141  tpdata->thePiK=new G4PiKBuilder;
142  tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasticFTF);
143  tpdata->theFTFPPiK->SetMinEnergy(minFTFPEnergy_);
144  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK);
145  tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
146  tpdata->theBertiniPiK->SetMaxEnergy(maxBertiniEnergy_);
147 
148  tpdata->theHyperon=new G4HyperonFTFPBuilder;
149 
150  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
151  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasticFTF));
152 }
153 
155 {
156  if (!tpdata) return;
157 
158  delete tpdata->theNeutrons;
159  delete tpdata->theBertiniNeutron;
160  delete tpdata->theFTFPNeutron;
161  //delete tpdata->theHPNeutron;
162  delete tpdata->theLENeutron;
163 
164  delete tpdata->thePiK;
165  delete tpdata->theBertiniPiK;
166  delete tpdata->theFTFPPiK;
167 
168  delete tpdata->thePro;
169  delete tpdata->theBertiniPro;
170  delete tpdata->theFTFPPro;
171 
172  delete tpdata->theHyperon;
173  delete tpdata->theAntiBaryon;
174  delete tpdata->theFTFPAntiBaryon;
175 
176  delete tpdata->theBGGxsNeutron;
177  delete tpdata->theNeutronHPJENDLHEInelastic;
178  delete tpdata->theBGGxsProton;
179 
180  delete tpdata; tpdata=0;
181 }
182 
184 {
185  G4MesonConstructor pMesonConstructor;
186  pMesonConstructor.ConstructParticle();
187 
188  G4BaryonConstructor pBaryonConstructor;
189  pBaryonConstructor.ConstructParticle();
190 
191  G4ShortLivedConstructor pShortLivedConstructor;
192  pShortLivedConstructor.ConstructParticle();
193 
194  G4IonConstructor pIonConstructor;
195  pIonConstructor.ConstructParticle();
196 }
197 
198 #include "G4ProcessManager.hh"
200 {
201  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
202  CreateModels();
203 
204  //tpdata->theBGGxsNeutron=new G4BGGNucleonInelasticXS(G4Neutron::Neutron());
205  tpdata->thePro->Build();
206  tpdata->theNeutrons->Build();
207 
208  tpdata->theBGGxsNeutron = 0; //set explictly to zero or destructor may fail
209 // tpdata->theBGGxsNeutron=new G4ParticleHPBGGNucleonInelasticXS(G4Neutron::Neutron());
210 // FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->theBGGxsNeutron);
211 //
212 
214  tpdata->theNeutronHPJENDLHEInelastic=new G4ParticleHPJENDLHEInelasticData;
215  G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->theNeutronHPJENDLHEInelastic);
217 
218  tpdata->theBGGxsProton=0;
219 // tpdata->theBGGxsProton=new G4BGGNucleonInelasticXS(G4Proton::Proton());
220 // G4PhysListUtil::FindInelasticProcess(G4Proton::Proton())->AddDataSet(tpdata->theBGGxsProton);
221 
222  tpdata->thePiK->Build();
223 
224  // --- Kaons ---
225  tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
226  G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
231 
232  tpdata->theHyperon->Build();
233  tpdata->theAntiBaryon->Build();
234 
235  // --- Neutrons ---
236  G4HadronicProcess* capture = 0;
237  G4HadronicProcess* fission = 0;
239  G4ProcessVector* pv = pmanager->GetProcessList();
240  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
241  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
242  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
243  } else if ( fFission == ((*pv)[i])->GetProcessSubType() ) {
244  fission = static_cast<G4HadronicProcess*>((*pv)[i]);
245  }
246  }
247  if ( ! capture ) {
248  capture = new G4HadronCaptureProcess("nCapture");
249  pmanager->AddDiscreteProcess(capture);
250  }
252  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
253  capture->AddDataSet( new G4ParticleHPCaptureData );
254  G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
255  theNeutronRadCapture->SetMinEnergy( minNonHPNeutronEnergy_ );
256  capture->RegisterMe( theNeutronRadCapture );
257  if ( ! fission ) {
258  fission = new G4HadronFissionProcess("nFission");
259  pmanager->AddDiscreteProcess(fission);
260  }
261  G4LFission* theNeutronLEPFission = new G4LFission();
262  theNeutronLEPFission->SetMinEnergy( minNonHPNeutronEnergy_ );
263  fission->RegisterMe( theNeutronLEPFission );
264 }
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=true)
const XML_Char * name
Definition: expat.h:151
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4KaonZeroLong * KaonZeroLong()
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
static void ConstructParticle()
void RegisterMe(G4HadronicInteraction *a)
void SetMinEnergy(G4double anEnergy)
static G4HadronicProcess * FindInelasticProcess(const G4ParticleDefinition *)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
static G4KaonZeroShort * KaonZeroShort()
bool G4bool
Definition: G4Types.hh:79
static G4CrossSectionDataSetRegistry * Instance()
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4int size() const
static const char * Default_Name()
G4ProcessManager * GetProcessManager() const
static constexpr double GeV
Definition: G4SIunits.hh:217
static constexpr double MeV
Definition: G4SIunits.hh:214
double G4double
Definition: G4Types.hh:76
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4ProcessVector * GetProcessList() const
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)