Geant4  10.01.p01
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 83699 2014-09-10 07:18:25Z 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 
61 
66 #include "G4PhysListUtil.hh"
67 
69 #include "G4NeutronRadCapture.hh"
70 #include "G4NeutronCaptureXS.hh"
72 #include "G4LFission.hh"
73 
74 // factory
76 //
78 
81 
83  : G4VPhysicsConstructor("hInelastic Shielding")
84  , useLEND_(false)
85  , evaluation_()
86  , minFTFPEnergy_(9.5*GeV)
87  , maxBertiniEnergy_(9.9*GeV)
88  , minNonHPNeutronEnergy_(19.9*MeV)
89 {}
90 
92  : G4VPhysicsConstructor(name)
93  , useLEND_(false)
94  , evaluation_()
95  , minFTFPEnergy_(9.5*GeV)
96  , maxBertiniEnergy_(9.9*GeV)
97  , minNonHPNeutronEnergy_(19.9*MeV)
98 {}
99 
101  G4int /*verbose*/, G4double minFTFPEnergy, G4double maxBertiniEnergy)
102  : G4VPhysicsConstructor(name)
103  , useLEND_(false)
104  , evaluation_()
105  , minFTFPEnergy_(minFTFPEnergy)
106  , maxBertiniEnergy_(maxBertiniEnergy)
107  , minNonHPNeutronEnergy_(19.9*MeV)
108 {}
109 
110 #include "G4NeutronLENDBuilder.hh"
112 {
113  G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
114 
115  tpdata->theNeutrons=new G4NeutronBuilder( true ); // Fission on
116  tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(quasiElasticFTF);
122  //tpdata->theNeutrons->RegisterMe(tpdata->theHPNeutron=new G4NeutronHPBuilder);
123 
124  if ( useLEND_ != true )
126  else
127  {
129  }
130 
132  tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasticFTF);
137 
139  tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasticFTF);
144 
146 
149 }
150 
152 {
153  if (!tpdata) return;
154 
155  delete tpdata->theNeutrons;
156  delete tpdata->theBertiniNeutron;
157  delete tpdata->theFTFPNeutron;
158  //delete tpdata->theHPNeutron;
159  delete tpdata->theLENeutron;
160 
161  delete tpdata->thePiK;
162  delete tpdata->theBertiniPiK;
163  delete tpdata->theFTFPPiK;
164 
165  delete tpdata->thePro;
166  delete tpdata->theBertiniPro;
167  delete tpdata->theFTFPPro;
168 
169  delete tpdata->theHyperon;
170  delete tpdata->theAntiBaryon;
171  delete tpdata->theFTFPAntiBaryon;
172 
173  delete tpdata->theBGGxsNeutron;
175  delete tpdata->theBGGxsProton;
176 
177  delete tpdata; tpdata=0;
178 }
179 
181 {
182  G4MesonConstructor pMesonConstructor;
183  pMesonConstructor.ConstructParticle();
184 
185  G4BaryonConstructor pBaryonConstructor;
186  pBaryonConstructor.ConstructParticle();
187 
188  G4ShortLivedConstructor pShortLivedConstructor;
189  pShortLivedConstructor.ConstructParticle();
190 
191  G4IonConstructor pIonConstructor;
192  pIonConstructor.ConstructParticle();
193 }
194 
195 #include "G4ProcessManager.hh"
197 {
198  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
199  CreateModels();
200 
201  //tpdata->theBGGxsNeutron=new G4BGGNucleonInelasticXS(G4Neutron::Neutron());
202  tpdata->thePro->Build();
204 
205  tpdata->theBGGxsNeutron = 0; //set explictly to zero or destructor may fail
206 // tpdata->theBGGxsNeutron=new G4NeutronHPBGGNucleonInelasticXS(G4Neutron::Neutron());
207 // FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->theBGGxsNeutron);
208 //
209 
214 
216 // tpdata->theBGGxsProton=new G4BGGNucleonInelasticXS(G4Proton::Proton());
217 // G4PhysListUtil::FindInelasticProcess(G4Proton::Proton())->AddDataSet(tpdata->theBGGxsProton);
218 
219  tpdata->thePiK->Build();
220  // use CHIPS cross sections also for Kaons
221 
225 
230 
231  tpdata->theHyperon->Build();
233 
234  // --- Neutrons ---
235  G4HadronicProcess* capture = 0;
236  G4HadronicProcess* fission = 0;
238  G4ProcessVector* pv = pmanager->GetProcessList();
239  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
240  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
241  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
242  } else if ( fFission == ((*pv)[i])->GetProcessSubType() ) {
243  fission = static_cast<G4HadronicProcess*>((*pv)[i]);
244  }
245  }
246  if ( ! capture ) {
247  capture = new G4HadronCaptureProcess("nCapture");
248  pmanager->AddDiscreteProcess(capture);
249  }
252  capture->AddDataSet( new G4NeutronHPCaptureData );
253  G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
254  theNeutronRadCapture->SetMinEnergy( minNonHPNeutronEnergy_ );
255  capture->RegisterMe( theNeutronRadCapture );
256  if ( ! fission ) {
257  fission = new G4HadronFissionProcess("nFission");
258  pmanager->AddDiscreteProcess(fission);
259  }
260  G4LFission* theNeutronLEPFission = new G4LFission();
261  theNeutronLEPFission->SetMinEnergy( minNonHPNeutronEnergy_ );
262  fission->RegisterMe( theNeutronLEPFission );
263 }
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=true)
static const double MeV
Definition: G4SIunits.hh:193
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:196
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