Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 93617 2015-10-27 09:00:41Z 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 
57 #include "G4NeutronRadCapture.hh"
58 #include "G4NeutronInelasticXS.hh"
59 #include "G4NeutronCaptureXS.hh"
60 
62 
63 #include "G4PhysListUtil.hh"
64 
65 // factory
67 //
69 
70 G4ThreadLocal G4HadronPhysicsQGS_BIC::ThreadPrivate*
71 G4HadronPhysicsQGS_BIC::tpdata = 0;
72 
74  : G4VPhysicsConstructor("hInelastic QGS_BIC")
75 /* , theNeutrons(0)
76  , theFTFBinaryNeutron(0)
77  , theQGSBinaryNeutron(0)
78  , theBinaryNeutron(0)
79  , thePion(0)
80  , theBinaryPion(0)
81  , theBertiniPion(0)
82  , theFTFBinaryPion(0)
83  , theQGSBinaryPion(0)
84  , theKaon(0)
85  , theBertiniKaon(0)
86  , theFTFBinaryKaon(0)
87  , theQGSBinaryKaon(0)
88  , thePro(0)
89  , theFTFBinaryPro(0)
90  , theQGSBinaryPro(0)
91  , theBinaryPro(0)
92  , theHyperon(0)
93  , theAntiBaryon(0)
94  , theFTFPAntiBaryon(0)
95  , xsKaon(0)
96  , xsNeutronInelasticXS(0)
97  , xsNeutronCaptureXS(0)*/
98 // , QuasiElastic(true)
99 {}
100 
102  : G4VPhysicsConstructor(name)
103 /* , theNeutrons(0)
104  , theFTFBinaryNeutron(0)
105  , theQGSBinaryNeutron(0)
106  , theBinaryNeutron(0)
107  , thePion(0)
108  , theBinaryPion(0)
109  , theBertiniPion(0)
110  , theFTFBinaryPion(0)
111  , theQGSBinaryPion(0)
112  , theKaon(0)
113  , theBertiniKaon(0)
114  , theFTFBinaryKaon(0)
115  , theQGSBinaryKaon(0)
116  , thePro(0)
117  , theFTFBinaryPro(0)
118  , theQGSBinaryPro(0)
119  , theBinaryPro(0)
120  , theHyperon(0)
121  , theAntiBaryon(0)
122  , theFTFPAntiBaryon(0)
123  , xsKaon(0)
124  , xsNeutronInelasticXS(0)
125  , xsNeutronCaptureXS(0)*/
126 // , QuasiElastic(quasiElastic)
127 {}
128 
129 void G4HadronPhysicsQGS_BIC::CreateModels()
130 {
131  G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
132  G4bool quasiElasticQGS= true; // For QGS, it must use it.
133 
134  const G4double maxFTFP = 25.0*GeV;
135  const G4double minFTFP = 9.5*GeV;
136  const G4double maxBIC = 9.9*GeV;
137  const G4double maxPionBIC = 1.3*GeV;
138  const G4double maxPionBERT = 5.0*GeV;
139  const G4double minPionBERT = 1.2*GeV;
140  const G4double maxKaonBERT = 5.0*GeV;
141 
142  tpdata->theNeutrons=new G4NeutronBuilder;
143  tpdata->theNeutrons->RegisterMe(tpdata->theQGSBinaryNeutron=new G4QGSBinaryNeutronBuilder(quasiElasticQGS));
144  tpdata->theNeutrons->RegisterMe(tpdata->theFTFBinaryNeutron=new G4FTFBinaryNeutronBuilder(quasiElasticFTF));
145  tpdata->theFTFBinaryNeutron->SetMinEnergy(minFTFP);
146  tpdata->theFTFBinaryNeutron->SetMaxEnergy(maxFTFP);
147 
148  tpdata->theNeutrons->RegisterMe(tpdata->theBinaryNeutron=new G4BinaryNeutronBuilder);
149  tpdata->theBinaryNeutron->SetMaxEnergy(maxBIC);
150 
151  tpdata->thePro=new G4ProtonBuilder;
152  tpdata->thePro->RegisterMe(tpdata->theQGSBinaryPro=new G4QGSBinaryProtonBuilder(quasiElasticQGS));
153  tpdata->thePro->RegisterMe(tpdata->theFTFBinaryPro=new G4FTFBinaryProtonBuilder(quasiElasticFTF));
154  tpdata->theFTFBinaryPro->SetMinEnergy(minFTFP);
155  tpdata->theFTFBinaryPro->SetMaxEnergy(maxFTFP);
156 
157  tpdata->thePro->RegisterMe(tpdata->theBinaryPro=new G4BinaryProtonBuilder);
158  tpdata->theBinaryPro->SetMaxEnergy(maxBIC);
159 
160  tpdata->thePion=new G4PionBuilder;
161  tpdata->thePion->RegisterMe(tpdata->theQGSBinaryPion=new G4QGSBinaryPionBuilder(quasiElasticQGS));
162  tpdata->thePion->RegisterMe(tpdata->theFTFBinaryPion=new G4FTFBinaryPionBuilder(quasiElasticFTF));
163  tpdata->theFTFBinaryPion->SetMaxEnergy(maxFTFP);
164  tpdata->thePion->RegisterMe(tpdata->theBertiniPion=new G4BertiniPionBuilder);
165  tpdata->theBertiniPion->SetMinEnergy(minPionBERT);
166  tpdata->theBertiniPion->SetMaxEnergy(maxPionBERT);
167  tpdata->thePion->RegisterMe(tpdata->theBinaryPion = new G4BinaryPionBuilder);
168  tpdata->theBinaryPion->SetMaxEnergy(maxPionBIC);
169 
170  tpdata->theKaon=new G4KaonBuilder;
171  tpdata->theKaon->RegisterMe(tpdata->theQGSBinaryKaon=new G4QGSBinaryKaonBuilder(quasiElasticQGS));
172  tpdata->theKaon->RegisterMe(tpdata->theFTFBinaryKaon=new G4FTFBinaryKaonBuilder(quasiElasticFTF));
173  tpdata->theFTFBinaryKaon->SetMaxEnergy(maxFTFP);
174  tpdata->theKaon->RegisterMe(tpdata->theBertiniKaon=new G4BertiniKaonBuilder);
175  tpdata->theBertiniKaon->SetMaxEnergy(maxKaonBERT);
176 
177  tpdata->theHyperon=new G4HyperonFTFPBuilder;
178 
179  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
180  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasticFTF));
181 }
182 
184 {
185  if (!tpdata) return;
186 
187  delete tpdata->theBinaryNeutron;
188  delete tpdata->theQGSBinaryNeutron;
189  delete tpdata->theFTFBinaryNeutron;
190  delete tpdata->theNeutrons;
191  delete tpdata->theQGSBinaryPion;
192  delete tpdata->theFTFBinaryPion;
193  delete tpdata->theBertiniPion;
194  delete tpdata->theBinaryPion;
195  delete tpdata->thePion;
196  delete tpdata->theQGSBinaryKaon;
197  delete tpdata->theFTFBinaryKaon;
198  delete tpdata->theBertiniKaon;
199  delete tpdata->theKaon;
200  delete tpdata->theBinaryPro;
201  delete tpdata->theQGSBinaryPro;
202  delete tpdata->theFTFBinaryPro;
203  delete tpdata->thePro;
204  delete tpdata->theFTFPAntiBaryon;
205  delete tpdata->theAntiBaryon;
206  delete tpdata->theHyperon;
207 
208  delete tpdata; tpdata = 0;
209 }
210 
212 {
213  G4MesonConstructor pMesonConstructor;
214  pMesonConstructor.ConstructParticle();
215 
216  G4BaryonConstructor pBaryonConstructor;
217  pBaryonConstructor.ConstructParticle();
218 
219  G4ShortLivedConstructor pShortLivedConstructor;
220  pShortLivedConstructor.ConstructParticle();
221 
222  G4IonConstructor pIonConstructor;
223  pIonConstructor.ConstructParticle();
224 }
225 
226 #include "G4ProcessManager.hh"
228 {
229  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
230  CreateModels();
231  tpdata->theNeutrons->Build();
232  tpdata->thePro->Build();
233  tpdata->thePion->Build();
234  tpdata->theKaon->Build();
235  tpdata->theHyperon->Build();
236  tpdata->theAntiBaryon->Build();
237 
238  // --- Kaons ---
239  tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
240  G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
245 
246  // --- Neutrons ---
248  G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
249 
250  G4HadronicProcess* capture = 0;
252  G4ProcessVector* pv = pmanager->GetProcessList();
253  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
254  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
255  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
256  }
257  }
258  if ( ! capture ) {
259  capture = new G4HadronCaptureProcess("nCapture");
260  pmanager->AddDiscreteProcess(capture);
261  }
263  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
264  capture->RegisterMe(new G4NeutronRadCapture());
265 }
266 
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
static void ConstructParticle()
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
G4HadronPhysicsQGS_BIC(G4int verbose=1)
G4int size() const
static const char * Default_Name()
G4ProcessManager * GetProcessManager() const
static constexpr double GeV
Definition: G4SIunits.hh:217
double G4double
Definition: G4Types.hh:76
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4ProcessVector * GetProcessList() const
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)