Geant4  10.02
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 
48 #include "G4NeutronRadCapture.hh"
49 #include "G4NeutronCaptureXS.hh"
51 #include "G4LFission.hh"
52 
54 
55 #include "G4PhysListUtil.hh"
56 
57 // factory
59 //
61 
64 
66  : G4VPhysicsConstructor("hInelastic FTFP_BERT_HP")
67 /* , theNeutrons(0)
68  , theBertiniNeutron(0)
69  , theFTFPNeutron(0)
70  , theHPNeutron(0)
71  , thePiK(0)
72  , theBertiniPiK(0)
73  , theFTFPPiK(0)
74  , thePro(0)
75  , theBertiniPro(0)
76  , theFTFPPro(0)
77  , theHyperon(0)
78  , theAntiBaryon(0)
79  , theFTFPAntiBaryon(0)*/
80  , QuasiElastic(false)
81  /*, xsKaon(0)
82  , xsNeutronCaptureXS(0)*/
83 {}
84 
86  : G4VPhysicsConstructor(name)
87 /* , theNeutrons(0)
88  , theBertiniNeutron(0)
89  , theFTFPNeutron(0)
90  , theHPNeutron(0)
91  , thePiK(0)
92  , theBertiniPiK(0)
93  , theFTFPPiK(0)
94  , thePro(0)
95  , theBertiniPro(0)
96  , theFTFPPro(0)
97  , theHyperon(0)
98  , theAntiBaryon(0)
99  , theFTFPAntiBaryon(0)*/
100  , QuasiElastic(quasiElastic)
101  /*, xsKaon(0)
102  , xsNeutronCaptureXS(0)*/
103 {}
104 
106 {
107 
108  tpdata->theNeutrons=new G4NeutronBuilder( true ); // Fission on
115 
121 
127 
129 
132 }
133 
135 {
136  if (!tpdata) return;
137 
138  delete tpdata->theNeutrons;
139  delete tpdata->theBertiniNeutron;
140  delete tpdata->theFTFPNeutron;
141  delete tpdata->theHPNeutron;
142 
143  delete tpdata->thePiK;
144  delete tpdata->theBertiniPiK;
145  delete tpdata->theFTFPPiK;
146 
147  delete tpdata->thePro;
148  delete tpdata->theBertiniPro;
149  delete tpdata->theFTFPPro;
150 
151  delete tpdata->theHyperon;
152  delete tpdata->theAntiBaryon;
153  delete tpdata->theFTFPAntiBaryon;
154 
155  delete tpdata; tpdata = 0;
156 }
157 
159 {
160  G4MesonConstructor pMesonConstructor;
161  pMesonConstructor.ConstructParticle();
162 
163  G4BaryonConstructor pBaryonConstructor;
164  pBaryonConstructor.ConstructParticle();
165 
166  G4ShortLivedConstructor pShortLivedConstructor;
167  pShortLivedConstructor.ConstructParticle();
168 }
169 
170 #include "G4ProcessManager.hh"
172 {
173  if (tpdata == 0 ) tpdata = new ThreadPrivate;
174  CreateModels();
176  tpdata->thePro->Build();
177  tpdata->thePiK->Build();
178 
179  // --- Kaons ---
186 
187  tpdata->theHyperon->Build();
189 
190  // --- Neutrons ---
191  G4HadronicProcess* capture = 0;
192  G4HadronicProcess* fission = 0;
194  G4ProcessVector* pv = pmanager->GetProcessList();
195  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
196  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
197  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
198  } else if ( fFission == ((*pv)[i])->GetProcessSubType() ) {
199  fission = static_cast<G4HadronicProcess*>((*pv)[i]);
200  }
201  }
202  if ( ! capture ) {
203  capture = new G4HadronCaptureProcess("nCapture");
204  pmanager->AddDiscreteProcess(capture);
205  }
208  capture->AddDataSet( new G4ParticleHPCaptureData );
209  G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
210  theNeutronRadCapture->SetMinEnergy( 19.9*MeV );
211  capture->RegisterMe( theNeutronRadCapture );
212  if ( ! fission ) {
213  fission = new G4HadronFissionProcess("nFission");
214  pmanager->AddDiscreteProcess(fission);
215  }
216  G4LFission* theNeutronLEPFission = new G4LFission();
217  theNeutronLEPFission->SetMinEnergy( 19.9*MeV );
218  fission->RegisterMe( theNeutronLEPFission );
219 }
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()
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
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()
void SetMaxEnergy(G4double aM)
static const double GeV
Definition: G4SIunits.hh:214
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4int size() const
static const char * Default_Name()
void RegisterMe(G4VAntiBarionBuilder *aB)
void RegisterMe(G4VPiKBuilder *aB)
Definition: G4PiKBuilder.hh:58
void RegisterMe(G4VProtonBuilder *aB)
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT_HP)
void RegisterMe(G4VNeutronBuilder *aB)
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
static G4ThreadLocal ThreadPrivate * tpdata
G4ProcessVector * GetProcessList() const