Geant4.10
 All Data Structures 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 76703 2013-11-14 10:29:11Z 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"
55 #include "G4NeutronRadCapture.hh"
56 #include "G4NeutronInelasticXS.hh"
57 #include "G4NeutronCaptureXS.hh"
58 
59 // factory
61 //
63 
64 G4ThreadLocal G4HadronPhysicsFTF_BIC::ThreadPrivate*
65 G4HadronPhysicsFTF_BIC::tpdata = 0;
66 
68  : G4VPhysicsConstructor("hInelastic FTF_BIC")
69 /* , theNeutrons(0)
70  , theFTFBinaryNeutron(0)
71  , theBinaryNeutron(0)
72  , thePion(0)
73  , theKaon(0)
74  , theBICPion(0)
75  , theBertiniKaon(0)
76  , theFTFBinaryPion(0)
77  , theFTFBinaryKaon(0)
78  , thePro(0)
79  , theFTFBinaryPro(0)
80  , theBinaryPro(0)
81  , theHyperon(0)
82  , theAntiBaryon(0)
83  , theFTFPAntiBaryon(0)
84  , xsNeutronInelasticXS(0)
85  , xsNeutronCaptureXS(0)*/
86  , QuasiElastic(false)
87 {}
88 
90  : G4VPhysicsConstructor(name)
91 /* , theNeutrons(0)
92  , theFTFBinaryNeutron(0)
93  , theBinaryNeutron(0)
94  , thePion(0)
95  , theKaon(0)
96  , theBICPion(0)
97  , theBertiniKaon(0)
98  , theFTFBinaryPion(0)
99  , theFTFBinaryKaon(0)
100  , thePro(0)
101  , theFTFBinaryPro(0)
102  , theBinaryPro(0)
103  , theHyperon(0)
104  , theAntiBaryon(0)
105  , theFTFPAntiBaryon(0)
106  , xsNeutronInelasticXS(0)
107  , xsNeutronCaptureXS(0)*/
108  , QuasiElastic(quasiElastic)
109 {}
110 
111 void G4HadronPhysicsFTF_BIC::CreateModels()
112 {
113  tpdata->theNeutrons=new G4NeutronBuilder;
114 
115  tpdata->theNeutrons->RegisterMe(tpdata->theFTFBinaryNeutron=new G4FTFBinaryNeutronBuilder(QuasiElastic));
116 
117  tpdata->theNeutrons->RegisterMe(tpdata->theBinaryNeutron=new G4BinaryNeutronBuilder);
118  tpdata->theBinaryNeutron->SetMaxEnergy(5.0*GeV);
119 
120  tpdata->thePro=new G4ProtonBuilder;
121  tpdata->thePro->RegisterMe(tpdata->theFTFBinaryPro=new G4FTFBinaryProtonBuilder(QuasiElastic));
122 
123  tpdata->thePro->RegisterMe(tpdata->theBinaryPro=new G4BinaryProtonBuilder);
124  tpdata->theBinaryPro->SetMaxEnergy(5.0*GeV);
125 
126  tpdata->thePion=new G4PionBuilder;
127  tpdata->thePion->RegisterMe(tpdata->theFTFBinaryPion=new G4FTFBinaryPionBuilder(QuasiElastic));
128  tpdata->thePion->RegisterMe(tpdata->theBICPion = new G4BinaryPionBuilder);
129  tpdata->theBICPion->SetMaxEnergy(5*GeV); // use Binary up to 5GeV for pion
130 
131  tpdata->theKaon=new G4KaonBuilder;
132  tpdata->theKaon->RegisterMe(tpdata->theFTFBinaryKaon=new G4FTFBinaryKaonBuilder(QuasiElastic));
133  tpdata->theKaon->RegisterMe(tpdata->theBertiniKaon=new G4BertiniKaonBuilder);
134  tpdata->theBertiniKaon->SetMaxEnergy(5*GeV);
135 
136  tpdata->theHyperon=new G4HyperonFTFPBuilder;
137 
138  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
139  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(QuasiElastic));
140 }
141 
143 {
144  delete tpdata->theFTFBinaryNeutron;
145  delete tpdata->theBinaryNeutron;
146  delete tpdata->theNeutrons;
147 
148  delete tpdata->theFTFBinaryPro;
149  delete tpdata->theBinaryPro;
150  delete tpdata->thePro;
151 
152  delete tpdata->theFTFBinaryPion;
153  delete tpdata->theBICPion;
154  delete tpdata->thePion;
155 
156  delete tpdata->theFTFBinaryKaon;
157  delete tpdata->theBertiniKaon;
158  delete tpdata->theKaon;
159 
160  delete tpdata->theHyperon;
161  delete tpdata->theAntiBaryon;
162  delete tpdata->theFTFPAntiBaryon;
163 
164  delete tpdata->xsNeutronInelasticXS;
165  delete tpdata->xsNeutronCaptureXS;
166 
167  delete tpdata; tpdata = 0;
168 }
169 
171 {
172  G4MesonConstructor pMesonConstructor;
173  pMesonConstructor.ConstructParticle();
174 
175  G4BaryonConstructor pBaryonConstructor;
176  pBaryonConstructor.ConstructParticle();
177 
178  G4ShortLivedConstructor pShortLivedConstructor;
179  pShortLivedConstructor.ConstructParticle();
180 }
181 
182 //#include "G4ProcessManager.hh"
183 #include "G4PhysListUtil.hh"
185 {
186  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
187  CreateModels();
188  tpdata->theNeutrons->Build();
189  tpdata->thePro->Build();
190  tpdata->thePion->Build();
191  tpdata->theKaon->Build();
192 
193  tpdata->theHyperon->Build();
194  tpdata->theAntiBaryon->Build();
195 
196  // --- Neutrons ---
197  tpdata->xsNeutronInelasticXS = new G4NeutronInelasticXS();
198  G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
199 
200  G4HadronicProcess* capture = 0;
202  G4ProcessVector* pv = pmanager->GetProcessList();
203  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
204  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
205  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
206  }
207  }
208  if ( ! capture ) {
209  capture = new G4HadronCaptureProcess("nCapture");
210  pmanager->AddDiscreteProcess(capture);
211  }
212  tpdata->xsNeutronCaptureXS = new G4NeutronCaptureXS();
213  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
214  capture->RegisterMe(new G4NeutronRadCapture());
215 }
216 
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
const XML_Char * name
static void ConstructParticle()
#define G4ThreadLocal
Definition: tls.hh:52
static void ConstructParticle()
G4ProcessManager * GetProcessManager() const
int G4int
Definition: G4Types.hh:78
void RegisterMe(G4HadronicInteraction *a)
static G4HadronicProcess * FindInelasticProcess(const G4ParticleDefinition *)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
bool G4bool
Definition: G4Types.hh:79
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTF_BIC)
G4HadronPhysicsFTF_BIC(G4int verbose=1)
G4int size() const
G4ProcessVector * GetProcessList() const