Geant4  10.02.p02
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 
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"
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);
125  //tpdata->theNeutrons->RegisterMe(tpdata->theHPNeutron=new G4NeutronPHPBuilder);
126 
127  if ( useLEND_ != true )
129  else
130  {
132  }
133 
135  tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasticFTF);
140 
142  tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasticFTF);
147 
149 
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;
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();
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 
217 
219 // tpdata->theBGGxsProton=new G4BGGNucleonInelasticXS(G4Proton::Proton());
220 // G4PhysListUtil::FindInelasticProcess(G4Proton::Proton())->AddDataSet(tpdata->theBGGxsProton);
221 
222  tpdata->thePiK->Build();
223 
224  // --- Kaons ---
231 
232  tpdata->theHyperon->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  }
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)
static const double MeV
Definition: G4SIunits.hh:211
G4String name
Definition: TRTMaterials.hh:40
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4KaonZeroLong * KaonZeroLong()
void SetMinEnergy(G4double aM)
static void ConstructParticle()
#define G4ThreadLocal
Definition: tls.hh:89
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)
void SetMinEnergy(G4double aM)
static G4KaonZeroShort * KaonZeroShort()
bool G4bool
Definition: G4Types.hh:79
static G4CrossSectionDataSetRegistry * Instance()
void SetMaxEnergy(G4double aM)
static G4ThreadLocal ThreadPrivate * tpdata
static const double GeV
Definition: G4SIunits.hh:214
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
void SetMinEnergy(G4double aM)
G4int size() const
static const char * Default_Name()
void RegisterMe(G4VAntiBarionBuilder *aB)
void RegisterMe(G4VPiKBuilder *aB)
Definition: G4PiKBuilder.hh:58
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsShielding)
void RegisterMe(G4VProtonBuilder *aB)
void RegisterMe(G4VNeutronBuilder *aB)
double G4double
Definition: G4Types.hh:76
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4ProcessVector * GetProcessList() const