Geant4.10
 All Data Structures 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 73040 2013-08-15 09:36:57Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName:
31 //
32 // Author: 2010 Tatsumi Koi, Gunter Folger
33 // created from G4HadronPhysicsFTFP_BERT
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 #include "G4IonConstructor.hh"
53 
58 
63 #include "G4PhysListUtil.hh"
64 
66 #include "G4NeutronRadCapture.hh"
67 #include "G4NeutronCaptureXS.hh"
69 #include "G4LFission.hh"
70 
71 // factory
73 //
75 
76 G4ThreadLocal G4HadronPhysicsShielding::ThreadPrivate*
77 G4HadronPhysicsShielding::tpdata = 0;
78 
80  : G4VPhysicsConstructor("hInelastic Shielding")
81 /* , theNeutrons(0)
82  , theLENeutron(0)
83  , theBertiniNeutron(0)
84  , theFTFPNeutron(0)
85  , thePiK(0)
86  , theBertiniPiK(0)
87  , theFTFPPiK(0)
88  , thePro(0)
89  , theBertiniPro(0)
90  , theFTFPPro(0)
91  , theHyperon(0)
92  , theAntiBaryon(0)
93  , theFTFPAntiBaryon(0) */
94 // , QuasiElastic(false)
95  /* , theChipsKaonMinus(0)
96  , theChipsKaonPlus(0)
97  , theChipsKaonZero(0)
98  , theBGGxsNeutron(0)
99  , theNeutronHPJENDLHEInelastic(0)
100  , theBGGxsProton(0)
101  , xsNeutronCaptureXS(0)*/
102  , useLEND(false)
103  , evaluation()
104 {}
105 
107  : G4VPhysicsConstructor(name)
108 /* , theNeutrons(0)
109  , theLENeutron(0)
110  , theBertiniNeutron(0)
111  , theFTFPNeutron(0)
112  , thePiK(0)
113  , theBertiniPiK(0)
114  , theFTFPPiK(0)
115  , thePro(0)
116  , theBertiniPro(0)
117  , theFTFPPro(0)
118  , theHyperon(0)
119  , theAntiBaryon(0)
120  , theFTFPAntiBaryon(0) */
121 // , QuasiElastic(quasiElastic)
122  /* , theChipsKaonMinus(0)
123  , theChipsKaonPlus(0)
124  , theChipsKaonZero(0)
125  , theBGGxsNeutron(0)
126  , theNeutronHPJENDLHEInelastic(0)
127  , theBGGxsProton(0)
128  , xsNeutronCaptureXS(0)*/
129  , useLEND(false)
130  , evaluation()
131 {}
132 
133 #include "G4NeutronLENDBuilder.hh"
134 void G4HadronPhysicsShielding::CreateModels()
135 {
136  G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
137 
138  tpdata->theNeutrons=new G4NeutronBuilder( true ); // Fission on
139  tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(quasiElasticFTF);
140  tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron);
141  tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron=new G4BertiniNeutronBuilder);
142  tpdata->theBertiniNeutron->SetMinEnergy(19.9*MeV);
143  tpdata->theBertiniNeutron->SetMaxEnergy(5*GeV);
144  //tpdata->theNeutrons->RegisterMe(tpdata->theHPNeutron=new G4NeutronHPBuilder);
145 
146  if ( useLEND != true )
147  tpdata->theNeutrons->RegisterMe(tpdata->theLENeutron=new G4NeutronHPBuilder);
148  else
149  {
150  tpdata->theNeutrons->RegisterMe(tpdata->theLENeutron=new G4NeutronLENDBuilder(evaluation));
151  }
152 
153  tpdata->thePro=new G4ProtonBuilder;
154  tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasticFTF);
155  tpdata->thePro->RegisterMe(tpdata->theFTFPPro);
156  tpdata->thePro->RegisterMe(tpdata->theBertiniPro=new G4BertiniProtonBuilder);
157  tpdata->theBertiniPro->SetMaxEnergy(5*GeV);
158 
159  tpdata->thePiK=new G4PiKBuilder;
160  tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasticFTF);
161  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK);
162  tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
163  tpdata->theBertiniPiK->SetMaxEnergy(5*GeV);
164 
165  tpdata->theHyperon=new G4HyperonFTFPBuilder;
166 
167  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
168  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasticFTF));
169 }
170 
172 {
173  delete tpdata->theNeutrons;
174  delete tpdata->theBertiniNeutron;
175  delete tpdata->theFTFPNeutron;
176  //delete tpdata->theHPNeutron;
177  delete tpdata->theLENeutron;
178 
179  delete tpdata->thePiK;
180  delete tpdata->theBertiniPiK;
181  delete tpdata->theFTFPPiK;
182 
183  delete tpdata->thePro;
184  delete tpdata->theBertiniPro;
185  delete tpdata->theFTFPPro;
186 
187  delete tpdata->theHyperon;
188  delete tpdata->theAntiBaryon;
189  delete tpdata->theFTFPAntiBaryon;
190 
191  delete tpdata->theBGGxsNeutron;
192  delete tpdata->theNeutronHPJENDLHEInelastic;
193  delete tpdata->theBGGxsProton;
194 
195  delete tpdata->xsNeutronCaptureXS;
196 
197  delete tpdata; tpdata=0;
198 }
199 
201 {
202  G4MesonConstructor pMesonConstructor;
203  pMesonConstructor.ConstructParticle();
204 
205  G4BaryonConstructor pBaryonConstructor;
206  pBaryonConstructor.ConstructParticle();
207 
208  G4ShortLivedConstructor pShortLivedConstructor;
209  pShortLivedConstructor.ConstructParticle();
210 
211  G4IonConstructor pIonConstructor;
212  pIonConstructor.ConstructParticle();
213 }
214 
215 #include "G4ProcessManager.hh"
217 {
218  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
219  CreateModels();
220 
221  //tpdata->theBGGxsNeutron=new G4BGGNucleonInelasticXS(G4Neutron::Neutron());
222  tpdata->thePro->Build();
223  tpdata->theNeutrons->Build();
224 
225  tpdata->theBGGxsNeutron = 0; //set explictly to zero or destructor may fail
226 // tpdata->theBGGxsNeutron=new G4NeutronHPBGGNucleonInelasticXS(G4Neutron::Neutron());
227 // FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->theBGGxsNeutron);
228 //
229 
231  tpdata->theNeutronHPJENDLHEInelastic=new G4NeutronHPJENDLHEInelasticData;
232  G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->theNeutronHPJENDLHEInelastic);
234 
235  tpdata->theBGGxsProton=0;
236 // tpdata->theBGGxsProton=new G4BGGNucleonInelasticXS(G4Proton::Proton());
237 // G4PhysListUtil::FindInelasticProcess(G4Proton::Proton())->AddDataSet(tpdata->theBGGxsProton);
238 
239  tpdata->thePiK->Build();
240  // use CHIPS cross sections also for Kaons
241 
245 
250 
251  tpdata->theHyperon->Build();
252  tpdata->theAntiBaryon->Build();
253 
254  // --- Neutrons ---
255  G4HadronicProcess* capture = 0;
256  G4HadronicProcess* fission = 0;
258  G4ProcessVector* pv = pmanager->GetProcessList();
259  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
260  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
261  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
262  } else if ( fFission == ((*pv)[i])->GetProcessSubType() ) {
263  fission = static_cast<G4HadronicProcess*>((*pv)[i]);
264  }
265  }
266  if ( ! capture ) {
267  capture = new G4HadronCaptureProcess("nCapture");
268  pmanager->AddDiscreteProcess(capture);
269  }
270  tpdata->xsNeutronCaptureXS = new G4NeutronCaptureXS();
271  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
272  capture->AddDataSet( new G4NeutronHPCaptureData );
273  G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
274  theNeutronRadCapture->SetMinEnergy( 19.9*MeV );
275  capture->RegisterMe( theNeutronRadCapture );
276  if ( ! fission ) {
277  fission = new G4HadronFissionProcess("nFission");
278  pmanager->AddDiscreteProcess(fission);
279  }
280  G4LFission* theNeutronLEPFission = new G4LFission();
281  theNeutronLEPFission->SetMinEnergy( 19.9*MeV );
282  fission->RegisterMe( theNeutronLEPFission );
283 }
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=true)
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4KaonZeroLong * KaonZeroLong()
const XML_Char * name
static void ConstructParticle()
#define G4ThreadLocal
Definition: tls.hh:52
static void ConstructParticle()
G4ProcessManager * GetProcessManager() const
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
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsShielding)
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4ProcessVector * GetProcessList() const