Geant4  10.01.p02
G4HadronPhysicsFTFP_BERT_TRV.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: G4HadronPhysicsFTFP_BERT_TRV.cc 83699 2014-09-10 07:18:25Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName:
31 //
32 // Author: 2007 Gunter Folger
33 // created from G4HadronPhysicsFTFP
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"
53 #include "G4NeutronRadCapture.hh"
58 #include "G4NeutronInelasticXS.hh"
59 #include "G4NeutronCaptureXS.hh"
60 
61 #include "G4PhysListUtil.hh"
62 
63 // factory
65 //
67 
70 
72  : G4VPhysicsConstructor("hInelastic FTFP_BERT_TRV")
73 /* , theNeutrons(0)
74  , theBertiniNeutron(0)
75  , theFTFPNeutron(0)
76  , thePiK(0)
77  , theBertiniPiK(0)
78  , theFTFPPiK(0)
79  , thePro(0)
80  , theBertiniPro(0)
81  , theFTFPPro(0)
82  , theHyperon(0)
83  , theAntiBaryon(0)
84  , theFTFPAntiBaryon(0)*/
85  , QuasiElastic(false)
86  /* , ChipsKaonMinus(0)
87  , ChipsKaonPlus(0)
88  , ChipsKaonZero(0)
89  , xsNeutronInelasticXS(0)
90  , xsNeutronCaptureXS(0)*/
91 {}
92 
94  : G4VPhysicsConstructor(name)
95 /* , theNeutrons(0)
96  , theBertiniNeutron(0)
97  , theFTFPNeutron(0)
98  , thePiK(0)
99  , theBertiniPiK(0)
100  , theFTFPPiK(0)
101  , thePro(0)
102  , theBertiniPro(0)
103  , theFTFPPro(0)
104  , theHyperon(0)
105  , theAntiBaryon(0)
106  , theFTFPAntiBaryon(0)*/
107  , QuasiElastic(quasiElastic)
108  /* , ChipsKaonMinus(0)
109  , ChipsKaonPlus(0)
110  , ChipsKaonZero(0)
111  , xsNeutronInelasticXS(0)
112  , xsNeutronCaptureXS(0)*/
113 {}
114 
115 
117 {
118  G4double minFTFP= 3.0 * GeV;
119  G4double maxBERT= 12.0 * GeV;
120  // G4double minFTFP= 5.0 * GeV; G4double maxBERT= 7.0 * GeV;
121  G4cout << " Revised FTFTP_BERT_TRV - new threshold between BERT and FTFP "
122  << " is over the interval " << minFTFP/GeV << " to " << maxBERT/GeV
123  << " GeV. " << G4endl;
124  G4cout << " -- quasiElastic was asked to be " << QuasiElastic
125  << " and it is reset to " << false << G4endl;
126  QuasiElastic= false;
127 
135 
140  tpdata->theFTFPPro->SetMinEnergy(minFTFP);
141  tpdata->theBertiniPro->SetMaxEnergy(maxBERT);
142 
147  tpdata->theFTFPPiK->SetMinEnergy(minFTFP);
148  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
149 
151 
154 }
155 
157 {
158  if (!tpdata) return;
159 
160  delete tpdata->theNeutrons;
161  delete tpdata->theBertiniNeutron;
162  delete tpdata->theFTFPNeutron;
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; tpdata = 0;
177 }
178 
180 {
181  G4MesonConstructor pMesonConstructor;
182  pMesonConstructor.ConstructParticle();
183 
184  G4BaryonConstructor pBaryonConstructor;
185  pBaryonConstructor.ConstructParticle();
186 
187  G4ShortLivedConstructor pShortLivedConstructor;
188  pShortLivedConstructor.ConstructParticle();
189 }
190 
191 #include "G4ProcessManager.hh"
193 {
194  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
195 
196  CreateModels();
197 
199  tpdata->thePro->Build();
200  tpdata->thePiK->Build();
201 
202  tpdata->theHyperon->Build();
204 
205  // --- Kaons ---
209 
214 
215  // --- Neutrons ---
218 
219  G4HadronicProcess* capture = 0;
221  G4ProcessVector* pv = pmanager->GetProcessList();
222  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
223  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
224  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
225  }
226  }
227  if ( ! capture ) {
228  capture = new G4HadronCaptureProcess("nCapture");
229  pmanager->AddDiscreteProcess(capture);
230  }
233  capture->RegisterMe(new G4NeutronRadCapture());
234 }
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=true)
G4String name
Definition: TRTMaterials.hh:40
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4KaonZeroLong * KaonZeroLong()
void SetMinEnergy(G4double aM)
static const char * Default_Name()
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT_TRV)
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)
static G4HadronicProcess * FindInelasticProcess(const G4ParticleDefinition *)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
G4GLOB_DLL std::ostream G4cout
void SetMinEnergy(G4double aM)
static G4KaonZeroShort * KaonZeroShort()
bool G4bool
Definition: G4Types.hh:79
static G4CrossSectionDataSetRegistry * Instance()
void SetMaxEnergy(G4double aM)
static const double GeV
Definition: G4SIunits.hh:196
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
static G4ThreadLocal ThreadPrivate * tpdata
void SetMinEnergy(G4double aM)
G4int size() const
static const char * Default_Name()
void RegisterMe(G4VAntiBarionBuilder *aB)
void RegisterMe(G4VPiKBuilder *aB)
Definition: G4PiKBuilder.hh:58
void RegisterMe(G4VProtonBuilder *aB)
#define G4endl
Definition: G4ios.hh:61
void RegisterMe(G4VNeutronBuilder *aB)
double G4double
Definition: G4Types.hh:76
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4ProcessVector * GetProcessList() const