Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 73040 2013-08-15 09:36:57Z 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 
68 G4ThreadLocal G4HadronPhysicsFTFP_BERT_TRV::ThreadPrivate*
69 G4HadronPhysicsFTFP_BERT_TRV::tpdata = 0;
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 
116 void G4HadronPhysicsFTFP_BERT_TRV::CreateModels()
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 
128  tpdata->theNeutrons=new G4NeutronBuilder;
129  tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron=new G4BertiniNeutronBuilder);
130  tpdata->theBertiniNeutron->SetMinEnergy(0.0*GeV);
131  tpdata->theBertiniNeutron->SetMaxEnergy(maxBERT);
132  tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(QuasiElastic);
133  tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron);
134  tpdata->theFTFPNeutron->SetMinEnergy(minFTFP);
135 
136  tpdata->thePro=new G4ProtonBuilder;
137  tpdata->theFTFPPro=new G4FTFPProtonBuilder(QuasiElastic);
138  tpdata->thePro->RegisterMe(tpdata->theFTFPPro);
139  tpdata->thePro->RegisterMe(tpdata->theBertiniPro=new G4BertiniProtonBuilder);
140  tpdata->theFTFPPro->SetMinEnergy(minFTFP);
141  tpdata->theBertiniPro->SetMaxEnergy(maxBERT);
142 
143  tpdata->thePiK=new G4PiKBuilder;
144  tpdata->theFTFPPiK=new G4FTFPPiKBuilder(QuasiElastic);
145  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK);
146  tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
147  tpdata->theFTFPPiK->SetMinEnergy(minFTFP);
148  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
149 
150  tpdata->theHyperon=new G4HyperonFTFPBuilder;
151 
152  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
153  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(QuasiElastic));
154 }
155 
157 {
158  delete tpdata->theNeutrons;
159  delete tpdata->theBertiniNeutron;
160  delete tpdata->theFTFPNeutron;
161 
162  delete tpdata->thePiK;
163  delete tpdata->theBertiniPiK;
164  delete tpdata->theFTFPPiK;
165 
166  delete tpdata->thePro;
167  delete tpdata->theBertiniPro;
168  delete tpdata->theFTFPPro;
169 
170  delete tpdata->theHyperon;
171  delete tpdata->theAntiBaryon;
172  delete tpdata->theFTFPAntiBaryon;
173 
174  delete tpdata->xsNeutronInelasticXS;
175  delete tpdata->xsNeutronCaptureXS;
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 
192 #include "G4ProcessManager.hh"
194 {
195  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
196 
197  CreateModels();
198 
199  tpdata->theNeutrons->Build();
200  tpdata->thePro->Build();
201  tpdata->thePiK->Build();
202 
203  tpdata->theHyperon->Build();
204  tpdata->theAntiBaryon->Build();
205 
206  // --- Kaons ---
210 
215 
216  // --- Neutrons ---
217  tpdata->xsNeutronInelasticXS = new G4NeutronInelasticXS();
218  G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
219 
220  G4HadronicProcess* capture = 0;
222  G4ProcessVector* pv = pmanager->GetProcessList();
223  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
224  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
225  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
226  }
227  }
228  if ( ! capture ) {
229  capture = new G4HadronCaptureProcess("nCapture");
230  pmanager->AddDiscreteProcess(capture);
231  }
232  tpdata->xsNeutronCaptureXS = new G4NeutronCaptureXS();
233  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
234  capture->RegisterMe(new G4NeutronRadCapture());
235 }
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=true)
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4KaonZeroLong * KaonZeroLong()
const XML_Char * name
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT_TRV)
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)
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
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4ProcessVector * GetProcessList() const