Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4HadronPhysicsQGS_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: G4HadronPhysicsQGS_BIC.cc 76703 2013-11-14 10:29:11Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName: G4HadronPhysicsQGS_BIC
31 //
32 // Author: 2007 Gunter Folger
33 // created from G4HadronPhysicsQGSP_BIC by H.P.Wellisch
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"
52 #include "G4IonConstructor.hh"
53 
55 #include "G4NeutronRadCapture.hh"
56 #include "G4NeutronInelasticXS.hh"
57 #include "G4NeutronCaptureXS.hh"
58 
59 #include "G4PhysListUtil.hh"
60 
61 // factory
63 //
65 
66 G4ThreadLocal G4HadronPhysicsQGS_BIC::ThreadPrivate*
67 G4HadronPhysicsQGS_BIC::tpdata = 0;
68 
70  : G4VPhysicsConstructor("hInelastic QGS_BIC")
71 /* , theNeutrons(0)
72  , theFTFBinaryNeutron(0)
73  , theQGSBinaryNeutron(0)
74  , theBinaryNeutron(0)
75  , thePion(0)
76  , theBinaryPion(0)
77  , theBertiniPion(0)
78  , theFTFBinaryPion(0)
79  , theQGSBinaryPion(0)
80  , theKaon(0)
81  , theBertiniKaon(0)
82  , theFTFBinaryKaon(0)
83  , theQGSBinaryKaon(0)
84  , thePro(0)
85  , theFTFBinaryPro(0)
86  , theQGSBinaryPro(0)
87  , theBinaryPro(0)
88  , theHyperon(0)
89  , theAntiBaryon(0)
90  , theFTFPAntiBaryon(0)
91  , xsNeutronInelasticXS(0)
92  , xsNeutronCaptureXS(0)*/
93 // , QuasiElastic(true)
94 {}
95 
97  : G4VPhysicsConstructor(name)
98 /* , theNeutrons(0)
99  , theFTFBinaryNeutron(0)
100  , theQGSBinaryNeutron(0)
101  , theBinaryNeutron(0)
102  , thePion(0)
103  , theBinaryPion(0)
104  , theBertiniPion(0)
105  , theFTFBinaryPion(0)
106  , theQGSBinaryPion(0)
107  , theKaon(0)
108  , theBertiniKaon(0)
109  , theFTFBinaryKaon(0)
110  , theQGSBinaryKaon(0)
111  , thePro(0)
112  , theFTFBinaryPro(0)
113  , theQGSBinaryPro(0)
114  , theBinaryPro(0)
115  , theHyperon(0)
116  , theAntiBaryon(0)
117  , theFTFPAntiBaryon(0)
118  , xsNeutronInelasticXS(0)
119  , xsNeutronCaptureXS(0)*/
120 // , QuasiElastic(quasiElastic)
121 {}
122 
123 void G4HadronPhysicsQGS_BIC::CreateModels()
124 {
125  G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
126  G4bool quasiElasticQGS= true; // For QGS, it must use it.
127 
128  const G4double maxFTFP = 25.0*GeV;
129  const G4double minFTFP = 9.5*GeV;
130  const G4double maxBIC = 9.9*GeV;
131  const G4double maxPionBIC = 1.3*GeV;
132  const G4double maxPionBERT = 5.0*GeV;
133  const G4double minPionBERT = 1.2*GeV;
134  const G4double maxKaonBERT = 5.0*GeV;
135 
136  tpdata->theNeutrons=new G4NeutronBuilder;
137  tpdata->theNeutrons->RegisterMe(tpdata->theQGSBinaryNeutron=new G4QGSBinaryNeutronBuilder(quasiElasticQGS));
138  tpdata->theNeutrons->RegisterMe(tpdata->theFTFBinaryNeutron=new G4FTFBinaryNeutronBuilder(quasiElasticFTF));
139  tpdata->theFTFBinaryNeutron->SetMinEnergy(minFTFP);
140  tpdata->theFTFBinaryNeutron->SetMaxEnergy(maxFTFP);
141 
142  tpdata->theNeutrons->RegisterMe(tpdata->theBinaryNeutron=new G4BinaryNeutronBuilder);
143  tpdata->theBinaryNeutron->SetMaxEnergy(maxBIC);
144 
145  tpdata->thePro=new G4ProtonBuilder;
146  tpdata->thePro->RegisterMe(tpdata->theQGSBinaryPro=new G4QGSBinaryProtonBuilder(quasiElasticQGS));
147  tpdata->thePro->RegisterMe(tpdata->theFTFBinaryPro=new G4FTFBinaryProtonBuilder(quasiElasticFTF));
148  tpdata->theFTFBinaryPro->SetMinEnergy(minFTFP);
149  tpdata->theFTFBinaryPro->SetMaxEnergy(maxFTFP);
150 
151  tpdata->thePro->RegisterMe(tpdata->theBinaryPro=new G4BinaryProtonBuilder);
152  tpdata->theBinaryPro->SetMaxEnergy(maxBIC);
153 
154  tpdata->thePion=new G4PionBuilder;
155  tpdata->thePion->RegisterMe(tpdata->theQGSBinaryPion=new G4QGSBinaryPionBuilder(quasiElasticQGS));
156  tpdata->thePion->RegisterMe(tpdata->theFTFBinaryPion=new G4FTFBinaryPionBuilder(quasiElasticFTF));
157  tpdata->theFTFBinaryPion->SetMaxEnergy(maxFTFP);
158  tpdata->thePion->RegisterMe(tpdata->theBertiniPion=new G4BertiniPionBuilder);
159  tpdata->theBertiniPion->SetMinEnergy(minPionBERT);
160  tpdata->theBertiniPion->SetMaxEnergy(maxPionBERT);
161  tpdata->thePion->RegisterMe(tpdata->theBinaryPion = new G4BinaryPionBuilder);
162  tpdata->theBinaryPion->SetMaxEnergy(maxPionBIC);
163 
164  tpdata->theKaon=new G4KaonBuilder;
165  tpdata->theKaon->RegisterMe(tpdata->theQGSBinaryKaon=new G4QGSBinaryKaonBuilder(quasiElasticQGS));
166  tpdata->theKaon->RegisterMe(tpdata->theFTFBinaryKaon=new G4FTFBinaryKaonBuilder(quasiElasticFTF));
167  tpdata->theFTFBinaryKaon->SetMaxEnergy(maxFTFP);
168  tpdata->theKaon->RegisterMe(tpdata->theBertiniKaon=new G4BertiniKaonBuilder);
169  tpdata->theBertiniKaon->SetMaxEnergy(maxKaonBERT);
170 
171  tpdata->theHyperon=new G4HyperonFTFPBuilder;
172 
173  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
174  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasticFTF));
175 }
176 
178 {
179  delete tpdata->theBinaryNeutron;
180  delete tpdata->theQGSBinaryNeutron;
181  delete tpdata->theFTFBinaryNeutron;
182  delete tpdata->theNeutrons;
183  delete tpdata->theQGSBinaryPion;
184  delete tpdata->theFTFBinaryPion;
185  delete tpdata->theBertiniPion;
186  delete tpdata->theBinaryPion;
187  delete tpdata->thePion;
188  delete tpdata->theQGSBinaryKaon;
189  delete tpdata->theFTFBinaryKaon;
190  delete tpdata->theBertiniKaon;
191  delete tpdata->theKaon;
192  delete tpdata->theBinaryPro;
193  delete tpdata->theQGSBinaryPro;
194  delete tpdata->theFTFBinaryPro;
195  delete tpdata->thePro;
196  delete tpdata->theFTFPAntiBaryon;
197  delete tpdata->theAntiBaryon;
198  delete tpdata->theHyperon;
199  delete tpdata->xsNeutronInelasticXS;
200  delete tpdata->xsNeutronCaptureXS;
201 
202  delete tpdata; tpdata = 0;
203 }
204 
206 {
207  G4MesonConstructor pMesonConstructor;
208  pMesonConstructor.ConstructParticle();
209 
210  G4BaryonConstructor pBaryonConstructor;
211  pBaryonConstructor.ConstructParticle();
212 
213  G4ShortLivedConstructor pShortLivedConstructor;
214  pShortLivedConstructor.ConstructParticle();
215 
216  G4IonConstructor pIonConstructor;
217  pIonConstructor.ConstructParticle();
218 }
219 
220 #include "G4ProcessManager.hh"
222 {
223  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
224  CreateModels();
225  tpdata->theNeutrons->Build();
226  tpdata->thePro->Build();
227  tpdata->thePion->Build();
228  tpdata->theKaon->Build();
229  tpdata->theHyperon->Build();
230  tpdata->theAntiBaryon->Build();
231 
232  // --- Neutrons ---
233  tpdata->xsNeutronInelasticXS = new G4NeutronInelasticXS();
234  G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
235 
236  G4HadronicProcess* capture = 0;
238  G4ProcessVector* pv = pmanager->GetProcessList();
239  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
240  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
241  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
242  }
243  }
244  if ( ! capture ) {
245  capture = new G4HadronCaptureProcess("nCapture");
246  pmanager->AddDiscreteProcess(capture);
247  }
248  tpdata->xsNeutronCaptureXS = new G4NeutronCaptureXS();
249  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
250  capture->RegisterMe(new G4NeutronRadCapture());
251 }
252 
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
static void ConstructParticle()
void RegisterMe(G4HadronicInteraction *a)
static G4HadronicProcess * FindInelasticProcess(const G4ParticleDefinition *)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGS_BIC)
bool G4bool
Definition: G4Types.hh:79
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4HadronPhysicsQGS_BIC(G4int verbose=1)
G4int size() const
double G4double
Definition: G4Types.hh:76
G4ProcessVector * GetProcessList() const