Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 93617 2015-10-27 09:00:41Z 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"
54 
57 #include "G4NeutronInelasticXS.hh"
58 #include "G4NeutronCaptureXS.hh"
59 
61 
62 #include "G4PhysListUtil.hh"
63 
64 // factory
66 //
68 
69 G4ThreadLocal G4HadronPhysicsFTFP_BERT_TRV::ThreadPrivate*
70 G4HadronPhysicsFTFP_BERT_TRV::tpdata = 0;
71 
73  : G4VPhysicsConstructor("hInelastic FTFP_BERT_TRV")
74 /* , theNeutrons(0)
75  , theBertiniNeutron(0)
76  , theFTFPNeutron(0)
77  , thePiK(0)
78  , theBertiniPiK(0)
79  , theFTFPPiK(0)
80  , thePro(0)
81  , theBertiniPro(0)
82  , theFTFPPro(0)
83  , theHyperon(0)
84  , theAntiBaryon(0)
85  , theFTFPAntiBaryon(0)*/
86  , QuasiElastic(false)
87  /*, xsKaon(0)
88  , xsNeutronInelasticXS(0)
89  , xsNeutronCaptureXS(0)*/
90 {}
91 
93  : G4VPhysicsConstructor(name)
94 /* , theNeutrons(0)
95  , theBertiniNeutron(0)
96  , theFTFPNeutron(0)
97  , thePiK(0)
98  , theBertiniPiK(0)
99  , theFTFPPiK(0)
100  , thePro(0)
101  , theBertiniPro(0)
102  , theFTFPPro(0)
103  , theHyperon(0)
104  , theAntiBaryon(0)
105  , theFTFPAntiBaryon(0)*/
106  , QuasiElastic(quasiElastic)
107  /*, xsKaon(0)
108  , xsNeutronInelasticXS(0)
109  , xsNeutronCaptureXS(0)*/
110 {}
111 
112 
113 void G4HadronPhysicsFTFP_BERT_TRV::CreateModels()
114 {
115  G4double minFTFP= 2.0 * GeV;
116  G4double maxBERT= 4.0 * GeV;
117  // G4double minFTFP= 5.0 * GeV; G4double maxBERT= 7.0 * GeV;
118  G4cout << " Revised FTFTP_BERT_TRV - new threshold between BERT and FTFP "
119  << " is over the interval " << minFTFP/GeV << " to " << maxBERT/GeV
120  << " GeV. " << G4endl;
121  G4cout << " -- quasiElastic was asked to be " << QuasiElastic
122  << " and it is reset to " << false << G4endl;
123  QuasiElastic= false;
124 
125  tpdata->theNeutrons=new G4NeutronBuilder;
126  tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron=new G4BertiniNeutronBuilder);
127  tpdata->theBertiniNeutron->SetMinEnergy(0.0*GeV);
128  tpdata->theBertiniNeutron->SetMaxEnergy(maxBERT);
129  tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(QuasiElastic);
130  tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron);
131  tpdata->theFTFPNeutron->SetMinEnergy(minFTFP);
132 
133  tpdata->thePro=new G4ProtonBuilder;
134  tpdata->theFTFPPro=new G4FTFPProtonBuilder(QuasiElastic);
135  tpdata->thePro->RegisterMe(tpdata->theFTFPPro);
136  tpdata->thePro->RegisterMe(tpdata->theBertiniPro=new G4BertiniProtonBuilder);
137  tpdata->theFTFPPro->SetMinEnergy(minFTFP);
138  tpdata->theBertiniPro->SetMaxEnergy(maxBERT);
139 
140  tpdata->thePiK=new G4PiKBuilder;
141  tpdata->theFTFPPiK=new G4FTFPPiKBuilder(QuasiElastic);
142  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK);
143  tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
144  tpdata->theFTFPPiK->SetMinEnergy(minFTFP);
145  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
146 
147  tpdata->theHyperon=new G4HyperonFTFPBuilder;
148 
149  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
150  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(QuasiElastic));
151 }
152 
154 {
155  if (!tpdata) return;
156 
157  delete tpdata->theNeutrons;
158  delete tpdata->theBertiniNeutron;
159  delete tpdata->theFTFPNeutron;
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; tpdata = 0;
174 }
175 
177 {
178  G4MesonConstructor pMesonConstructor;
179  pMesonConstructor.ConstructParticle();
180 
181  G4BaryonConstructor pBaryonConstructor;
182  pBaryonConstructor.ConstructParticle();
183 
184  G4ShortLivedConstructor pShortLivedConstructor;
185  pShortLivedConstructor.ConstructParticle();
186 }
187 
188 #include "G4ProcessManager.hh"
190 {
191  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
192 
193  CreateModels();
194 
195  tpdata->theNeutrons->Build();
196  tpdata->thePro->Build();
197  tpdata->thePiK->Build();
198 
199  tpdata->theHyperon->Build();
200  tpdata->theAntiBaryon->Build();
201 
202  // --- Kaons ---
203  tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
204  G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
209 
210  // --- Neutrons ---
212  G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
213 
214  G4HadronicProcess* capture = 0;
216  G4ProcessVector* pv = pmanager->GetProcessList();
217  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
218  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
219  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
220  }
221  }
222  if ( ! capture ) {
223  capture = new G4HadronCaptureProcess("nCapture");
224  pmanager->AddDiscreteProcess(capture);
225  }
227  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
228  capture->RegisterMe(new G4NeutronRadCapture());
229 }
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=true)
const XML_Char * name
Definition: expat.h:151
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4KaonZeroLong * KaonZeroLong()
static const char * Default_Name()
static void ConstructParticle()
#define G4ThreadLocal
Definition: tls.hh:89
static void ConstructParticle()
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
static G4KaonZeroShort * KaonZeroShort()
bool G4bool
Definition: G4Types.hh:79
static G4CrossSectionDataSetRegistry * Instance()
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4int size() const
static const char * Default_Name()
G4ProcessManager * GetProcessManager() const
static constexpr double GeV
Definition: G4SIunits.hh:217
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4ProcessVector * GetProcessList() const
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)