Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4HadronPhysicsFTF_BIC.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: G4HadronPhysicsFTF_BIC.cc 93617 2015-10-27 09:00:41Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName: G4HadronPhysicsFTF_BIC
31 //
32 // Author: 2007 Gunter Folger
33 //
34 // Modified:
35 //
36 //----------------------------------------------------------------------------
37 //
38 #include <iomanip>
39 
41 
42 #include "globals.hh"
43 #include "G4ios.hh"
44 #include "G4SystemOfUnits.hh"
45 #include "G4ParticleDefinition.hh"
46 #include "G4ParticleTable.hh"
47 
48 #include "G4MesonConstructor.hh"
49 #include "G4BaryonConstructor.hh"
51 
52 #include "G4ProcessManager.hh"
53 #include "G4ProcessVector.hh"
54 
58 #include "G4NeutronRadCapture.hh"
59 #include "G4NeutronInelasticXS.hh"
60 #include "G4NeutronCaptureXS.hh"
61 
63 
64 #include "G4PhysListUtil.hh"
65 
66 // factory
68 //
70 
71 G4ThreadLocal G4HadronPhysicsFTF_BIC::ThreadPrivate*
72 G4HadronPhysicsFTF_BIC::tpdata = 0;
73 
75  : G4VPhysicsConstructor("hInelastic FTF_BIC")
76 /* , theNeutrons(0)
77  , theFTFBinaryNeutron(0)
78  , theBinaryNeutron(0)
79  , thePion(0)
80  , theKaon(0)
81  , theBICPion(0)
82  , theBertiniKaon(0)
83  , theFTFBinaryPion(0)
84  , theFTFBinaryKaon(0)
85  , thePro(0)
86  , theFTFBinaryPro(0)
87  , theBinaryPro(0)
88  , theHyperon(0)
89  , theAntiBaryon(0)
90  , theFTFPAntiBaryon(0)
91  , xsKaon(0)
92  , xsNeutronInelasticXS(0)
93  , xsNeutronCaptureXS(0)*/
94  , QuasiElastic(false)
95 {}
96 
98  : G4VPhysicsConstructor(name)
99 /* , theNeutrons(0)
100  , theFTFBinaryNeutron(0)
101  , theBinaryNeutron(0)
102  , thePion(0)
103  , theKaon(0)
104  , theBICPion(0)
105  , theBertiniKaon(0)
106  , theFTFBinaryPion(0)
107  , theFTFBinaryKaon(0)
108  , thePro(0)
109  , theFTFBinaryPro(0)
110  , theBinaryPro(0)
111  , theHyperon(0)
112  , theAntiBaryon(0)
113  , theFTFPAntiBaryon(0)
114  , xsKaon(0)
115  , xsNeutronInelasticXS(0)
116  , xsNeutronCaptureXS(0)*/
117  , QuasiElastic(quasiElastic)
118 {}
119 
120 void G4HadronPhysicsFTF_BIC::CreateModels()
121 {
122  tpdata->theNeutrons=new G4NeutronBuilder;
123 
124  tpdata->theNeutrons->RegisterMe(tpdata->theFTFBinaryNeutron=new G4FTFBinaryNeutronBuilder(QuasiElastic));
125 
126  tpdata->theNeutrons->RegisterMe(tpdata->theBinaryNeutron=new G4BinaryNeutronBuilder);
127  tpdata->theBinaryNeutron->SetMaxEnergy(5.0*GeV);
128 
129  tpdata->thePro=new G4ProtonBuilder;
130  tpdata->thePro->RegisterMe(tpdata->theFTFBinaryPro=new G4FTFBinaryProtonBuilder(QuasiElastic));
131 
132  tpdata->thePro->RegisterMe(tpdata->theBinaryPro=new G4BinaryProtonBuilder);
133  tpdata->theBinaryPro->SetMaxEnergy(5.0*GeV);
134 
135  tpdata->thePion=new G4PionBuilder;
136  tpdata->thePion->RegisterMe(tpdata->theFTFBinaryPion=new G4FTFBinaryPionBuilder(QuasiElastic));
137  tpdata->thePion->RegisterMe(tpdata->theBICPion = new G4BinaryPionBuilder);
138  tpdata->theBICPion->SetMaxEnergy(5*GeV); // use Binary up to 5GeV for pion
139 
140  tpdata->theKaon=new G4KaonBuilder;
141  tpdata->theKaon->RegisterMe(tpdata->theFTFBinaryKaon=new G4FTFBinaryKaonBuilder(QuasiElastic));
142  tpdata->theKaon->RegisterMe(tpdata->theBertiniKaon=new G4BertiniKaonBuilder);
143  tpdata->theBertiniKaon->SetMaxEnergy(5*GeV);
144 
145  tpdata->theHyperon=new G4HyperonFTFPBuilder;
146 
147  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
148  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(QuasiElastic));
149 }
150 
152 {
153  if (!tpdata) return;
154 
155  delete tpdata->theFTFBinaryNeutron;
156  delete tpdata->theBinaryNeutron;
157  delete tpdata->theNeutrons;
158 
159  delete tpdata->theFTFBinaryPro;
160  delete tpdata->theBinaryPro;
161  delete tpdata->thePro;
162 
163  delete tpdata->theFTFBinaryPion;
164  delete tpdata->theBICPion;
165  delete tpdata->thePion;
166 
167  delete tpdata->theFTFBinaryKaon;
168  delete tpdata->theBertiniKaon;
169  delete tpdata->theKaon;
170 
171  delete tpdata->theHyperon;
172  delete tpdata->theAntiBaryon;
173  delete tpdata->theFTFPAntiBaryon;
174 
175  delete tpdata; tpdata = 0;
176 }
177 
179 {
180  G4MesonConstructor pMesonConstructor;
181  pMesonConstructor.ConstructParticle();
182 
183  G4BaryonConstructor pBaryonConstructor;
184  pBaryonConstructor.ConstructParticle();
185 
186  G4ShortLivedConstructor pShortLivedConstructor;
187  pShortLivedConstructor.ConstructParticle();
188 }
189 
190 //#include "G4ProcessManager.hh"
191 #include "G4PhysListUtil.hh"
193 {
194  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
195  CreateModels();
196  tpdata->theNeutrons->Build();
197  tpdata->thePro->Build();
198  tpdata->thePion->Build();
199  tpdata->theKaon->Build();
200 
201  // --- Kaons ---
202  tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
203  G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
208 
209  tpdata->theHyperon->Build();
210  tpdata->theAntiBaryon->Build();
211 
212  // --- Neutrons ---
214  G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
215 
216  G4HadronicProcess* capture = 0;
218  G4ProcessVector* pv = pmanager->GetProcessList();
219  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
220  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
221  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
222  }
223  }
224  if ( ! capture ) {
225  capture = new G4HadronCaptureProcess("nCapture");
226  pmanager->AddDiscreteProcess(capture);
227  }
229  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
230  capture->RegisterMe(new G4NeutronRadCapture());
231 }
232 
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)
static G4KaonZeroShort * KaonZeroShort()
bool G4bool
Definition: G4Types.hh:79
static G4CrossSectionDataSetRegistry * Instance()
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4HadronPhysicsFTF_BIC(G4int verbose=1)
G4int size() const
static const char * Default_Name()
G4ProcessManager * GetProcessManager() const
static constexpr double GeV
Definition: G4SIunits.hh:217
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4ProcessVector * GetProcessList() const
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)