Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4HadronPhysicsFTFP_BERT_HP.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 //------------------------------------------------------------------------
27 //
28 // Modified:
29 //
30 //------------------------------------------------------------------------
31 //
33 
34 #include <iomanip>
35 #include "globals.hh"
36 #include "G4ios.hh"
37 #include "G4SystemOfUnits.hh"
38 #include "G4ParticleDefinition.hh"
39 #include "G4ParticleTable.hh"
40 
41 #include "G4MesonConstructor.hh"
42 #include "G4BaryonConstructor.hh"
44 
49 
51 #include "G4NeutronRadCapture.hh"
52 #include "G4NeutronCaptureXS.hh"
54 #include "G4LFission.hh"
55 
56 #include "G4PhysListUtil.hh"
57 
58 // factory
60 //
62 
63 G4ThreadLocal G4HadronPhysicsFTFP_BERT_HP::ThreadPrivate*
64 G4HadronPhysicsFTFP_BERT_HP::tpdata=0;
65 
67  : G4VPhysicsConstructor("hInelastic FTFP_BERT_HP")
68 /* , theNeutrons(0)
69  , theBertiniNeutron(0)
70  , theFTFPNeutron(0)
71  , theHPNeutron(0)
72  , thePiK(0)
73  , theBertiniPiK(0)
74  , theFTFPPiK(0)
75  , thePro(0)
76  , theBertiniPro(0)
77  , theFTFPPro(0)
78  , theHyperon(0)
79  , theAntiBaryon(0)
80  , theFTFPAntiBaryon(0)*/
81  , QuasiElastic(false)
82  /* , ChipsKaonMinus(0)
83  , ChipsKaonPlus(0)
84  , ChipsKaonZero(0)
85  , xsNeutronCaptureXS(0)*/
86 {}
87 
89  : G4VPhysicsConstructor(name)
90 /* , theNeutrons(0)
91  , theBertiniNeutron(0)
92  , theFTFPNeutron(0)
93  , theHPNeutron(0)
94  , thePiK(0)
95  , theBertiniPiK(0)
96  , theFTFPPiK(0)
97  , thePro(0)
98  , theBertiniPro(0)
99  , theFTFPPro(0)
100  , theHyperon(0)
101  , theAntiBaryon(0)
102  , theFTFPAntiBaryon(0)*/
103  , QuasiElastic(quasiElastic)
104  /* , ChipsKaonMinus(0)
105  , ChipsKaonPlus(0)
106  , ChipsKaonZero(0)
107  , xsNeutronCaptureXS(0)*/
108 {}
109 
110 void G4HadronPhysicsFTFP_BERT_HP::CreateModels()
111 {
112 
113  tpdata->theNeutrons=new G4NeutronBuilder( true ); // Fission on
114  tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(QuasiElastic);
115  tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron);
116  tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron=new G4BertiniNeutronBuilder);
117  tpdata->theBertiniNeutron->SetMinEnergy(19.9*MeV);
118  tpdata->theBertiniNeutron->SetMaxEnergy(5*GeV);
119  tpdata->theNeutrons->RegisterMe(tpdata->theHPNeutron=new G4NeutronHPBuilder);
120 
121  tpdata->thePro=new G4ProtonBuilder;
122  tpdata->theFTFPPro=new G4FTFPProtonBuilder(QuasiElastic);
123  tpdata->thePro->RegisterMe(tpdata->theFTFPPro);
124  tpdata->thePro->RegisterMe(tpdata->theBertiniPro=new G4BertiniProtonBuilder);
125  tpdata->theBertiniPro->SetMaxEnergy(5*GeV);
126 
127  tpdata->thePiK=new G4PiKBuilder;
128  tpdata->theFTFPPiK=new G4FTFPPiKBuilder(QuasiElastic);
129  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK);
130  tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
131  tpdata->theBertiniPiK->SetMaxEnergy(5*GeV);
132 
133  tpdata->theHyperon=new G4HyperonFTFPBuilder;
134 
135  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
136  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(QuasiElastic));
137 }
138 
140 {
141  delete tpdata->theNeutrons;
142  delete tpdata->theBertiniNeutron;
143  delete tpdata->theFTFPNeutron;
144  delete tpdata->theHPNeutron;
145 
146  delete tpdata->thePiK;
147  delete tpdata->theBertiniPiK;
148  delete tpdata->theFTFPPiK;
149 
150  delete tpdata->thePro;
151  delete tpdata->theBertiniPro;
152  delete tpdata->theFTFPPro;
153 
154  delete tpdata->theHyperon;
155  delete tpdata->theAntiBaryon;
156  delete tpdata->theFTFPAntiBaryon;
157 
158  delete tpdata->xsNeutronCaptureXS;
159 
160  delete tpdata; tpdata = 0;
161 }
162 
164 {
165  G4MesonConstructor pMesonConstructor;
166  pMesonConstructor.ConstructParticle();
167 
168  G4BaryonConstructor pBaryonConstructor;
169  pBaryonConstructor.ConstructParticle();
170 
171  G4ShortLivedConstructor pShortLivedConstructor;
172  pShortLivedConstructor.ConstructParticle();
173 }
174 
175 #include "G4ProcessManager.hh"
177 {
178  if (tpdata == 0 ) tpdata = new ThreadPrivate;
179  CreateModels();
180  tpdata->theNeutrons->Build();
181  tpdata->thePro->Build();
182  tpdata->thePiK->Build();
183 
184  // --- Kaons ---
188 
193 
194  tpdata->theHyperon->Build();
195  tpdata->theAntiBaryon->Build();
196 
197  // --- Neutrons ---
198  G4HadronicProcess* capture = 0;
199  G4HadronicProcess* fission = 0;
201  G4ProcessVector* pv = pmanager->GetProcessList();
202  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
203  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
204  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
205  } else if ( fFission == ((*pv)[i])->GetProcessSubType() ) {
206  fission = static_cast<G4HadronicProcess*>((*pv)[i]);
207  }
208  }
209  if ( ! capture ) {
210  capture = new G4HadronCaptureProcess("nCapture");
211  pmanager->AddDiscreteProcess(capture);
212  }
213  tpdata->xsNeutronCaptureXS = new G4NeutronCaptureXS();
214  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
215  capture->AddDataSet( new G4NeutronHPCaptureData );
216  G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
217  theNeutronRadCapture->SetMinEnergy( 19.9*MeV );
218  capture->RegisterMe( theNeutronRadCapture );
219  if ( ! fission ) {
220  fission = new G4HadronFissionProcess("nFission");
221  pmanager->AddDiscreteProcess(fission);
222  }
223  G4LFission* theNeutronLEPFission = new G4LFission();
224  theNeutronLEPFission->SetMinEnergy( 19.9*MeV );
225  fission->RegisterMe( theNeutronLEPFission );
226 }
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
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(G4HadronPhysicsFTFP_BERT_HP)
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4ProcessVector * GetProcessList() const