Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4HadronPhysicsQGS_BIC.cc
이 파일의 문서화 페이지로 가기
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 105736 2017-08-16 13:01: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 #include "G4PionBuilder.hh"
43 #include "G4BinaryPionBuilder.hh"
44 #include "G4BertiniPionBuilder.hh"
47 
48 #include "G4KaonBuilder.hh"
49 #include "G4BertiniKaonBuilder.hh"
52 
53 #include "G4ProtonBuilder.hh"
56 #include "G4BinaryProtonBuilder.hh"
57 
58 #include "G4NeutronBuilder.hh"
62 
63 #include "G4HyperonFTFPBuilder.hh"
64 #include "G4AntiBarionBuilder.hh"
66 
67 #include "globals.hh"
68 #include "G4ios.hh"
69 #include "G4SystemOfUnits.hh"
70 #include "G4ParticleDefinition.hh"
71 #include "G4ParticleTable.hh"
72 
73 #include "G4MesonConstructor.hh"
74 #include "G4BaryonConstructor.hh"
76 #include "G4IonConstructor.hh"
77 
81 #include "G4NeutronRadCapture.hh"
82 #include "G4NeutronInelasticXS.hh"
83 #include "G4NeutronCaptureXS.hh"
84 
86 
87 #include "G4PhysListUtil.hh"
88 
90 //
92 
94  : G4HadronPhysicsQGS_BIC("hInelastic QGS_BIC",true) {}
95 
97  : G4VPhysicsConstructor(name)
98 {
99  QuasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
100  QuasiElasticQGS= true; // For QGS, it must use it.
101 
105 
106  maxFTF_pion = 25.*GeV;
107  maxBERT_pion = 5.0*GeV;
108  minBERT_pion = 1.2*GeV;
109  maxBIC_pion = 1.3*GeV;
110 
111  maxFTF_kaon = 25.*GeV;
112  maxBERT_kaon = 5.0*GeV;
113 }
114 
116 {
117  delete xs_k.Get();
118  std::for_each( xs_ds.Begin(),xs_ds.End(),
119  [](G4VCrossSectionDataSet* el){delete el;});
120 }
121 
123 {
124  delete xs_k.Get();
125  std::for_each( xs_ds.Begin(), xs_ds.End(),[](G4VCrossSectionDataSet* el){ delete el;});
126  xs_ds.Clear();
128 }
129 
131 {
132  Neutron();
133  Proton();
134  Pion();
135  Kaon();
136  Others();
137 }
138 
140 {
141  //General schema:
142  // 1) Create a builder
143  // 2) Call AddBuilder
144  // 3) Configure the builder, possibly with sub-builders
145  // 4) Call builder->Build()
146  auto neu = new G4NeutronBuilder;
147  AddBuilder(neu);
148  auto qgsneu = new G4QGSBinaryNeutronBuilder(QuasiElasticQGS);
149  AddBuilder(qgsneu);
150  neu->RegisterMe(qgsneu);
151  auto ftfneu = new G4FTFBinaryNeutronBuilder(QuasiElasticFTF);
152  AddBuilder(ftfneu);
153  ftfneu->SetMinEnergy(minFTF_neutron);
154  ftfneu->SetMaxEnergy(maxFTF_neutron);
155  neu->RegisterMe(ftfneu);
156  auto bicn = new G4BinaryNeutronBuilder;
157  AddBuilder(bicn);
158  bicn->SetMaxEnergy(maxBIC_neutron);
159  neu->RegisterMe(bicn);
160  neu->Build();
161 }
162 
164 {
165  auto pro = new G4ProtonBuilder;
166  AddBuilder(pro);
168  AddBuilder(qgs);
169  pro->RegisterMe(qgs);
171  AddBuilder(ftf);
172  ftf->SetMinEnergy(minFTF_proton);
173  ftf->SetMaxEnergy(maxFTF_proton);
174  pro->RegisterMe(ftf);
175  auto bic = new G4BinaryProtonBuilder;
176  AddBuilder(bic);
177  bic->SetMaxEnergy(maxBIC_proton);
178  pro->RegisterMe(bic);
179  pro->Build();
180 }
181 
183 {
184  auto pi = new G4PionBuilder;
185  AddBuilder(pi);
186  auto qgs = new G4QGSBinaryPionBuilder(QuasiElasticQGS);
187  AddBuilder(qgs);
188  pi->RegisterMe(qgs);
189  auto ftf = new G4FTFBinaryPionBuilder(QuasiElasticFTF);
190  AddBuilder(ftf);
191  ftf->SetMaxEnergy(maxFTF_pion);
192  pi->RegisterMe(ftf);
193  auto bert = new G4BertiniPionBuilder;
194  AddBuilder(bert);
195  bert->SetMinEnergy(minBERT_pion);
196  bert->SetMaxEnergy(maxBERT_pion);
197  pi->RegisterMe(bert);
198  auto bic = new G4BinaryPionBuilder;
199  AddBuilder(bic);
200  bic->SetMaxEnergy(maxBIC_pion);
201  pi->RegisterMe(bic);
202  pi->Build();
203 }
204 
206 {
207  auto k = new G4KaonBuilder;
208  AddBuilder(k);
209  auto qgs = new G4QGSBinaryKaonBuilder(QuasiElasticQGS);
210  AddBuilder(qgs);
211  k->RegisterMe(qgs);
212  auto ftf = new G4FTFBinaryKaonBuilder(QuasiElasticFTF);
213  AddBuilder(ftf);
214  ftf->SetMaxEnergy(maxFTF_kaon);
215  k->RegisterMe(ftf);
216  auto bert = new G4BertiniKaonBuilder;
217  AddBuilder(bert);
218  bert->SetMaxEnergy(maxBERT_kaon);
219  k->RegisterMe(bert);
220  k->Build();
221 }
222 
223 
225 {
226  auto hyp = new G4HyperonFTFPBuilder;
227  AddBuilder(hyp);
228  hyp->Build();
229  auto abar = new G4AntiBarionBuilder;
230  AddBuilder(abar);
232  AddBuilder(ftf);
233  abar->RegisterMe(ftf);
234  abar->Build();
235 }
236 
238 {
239  G4MesonConstructor pMesonConstructor;
240  pMesonConstructor.ConstructParticle();
241 
242  G4BaryonConstructor pBaryonConstructor;
243  pBaryonConstructor.ConstructParticle();
244 
245  G4ShortLivedConstructor pShortLivedConstructor;
246  pShortLivedConstructor.ConstructParticle();
247 
248  G4IonConstructor pIonConstructor;
249  pIonConstructor.ConstructParticle();
250 }
251 
252 #include "G4ProcessManager.hh"
254 {
256  DumpBanner();
257  }
258  CreateModels();
260 }
261 
263 {
264  // --- Kaons ---
265  auto xsk = new G4ComponentGGHadronNucleusXsc();
266  xs_k.Put(xsk);
268  xs_ds.Push_back(kaonxs);
273 
274  // --- Neutrons ---
276  xs_ds.Push_back(xs_n_in); //TODO: Is this needed? Who owns the pointer?
278 
279  G4HadronicProcess* capture = 0;
281  G4ProcessVector* pv = pmanager->GetProcessList();
282  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
283  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
284  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
285  }
286  }
287  if ( ! capture ) {
288  capture = new G4HadronCaptureProcess("nCapture");
289  pmanager->AddDiscreteProcess(capture);
290  }
292  xs_ds.Push_back(xs_n_c); //TODO: Who owns this?
293  capture->AddDataSet(xs_n_c);
294  capture->RegisterMe(new G4NeutronRadCapture());
295 }
296 
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)
G4VectorCache< G4VCrossSectionDataSet * > xs_ds
const XML_Char * name
Definition: expat.h:151
static const char * Default_Name()
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
void RegisterMe(G4HadronicInteraction *a)
static void ConstructParticle()
static void ConstructParticle()
G4bool IsMasterThread()
Definition: G4Threading.cc:130
static G4CrossSectionDataSetRegistry * Instance()
G4ProcessVector * GetProcessList() const
static G4KaonMinus * KaonMinus()
Definition: G4KaonMinus.cc:113
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
iterator End()
Definition: G4Cache.hh:390
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=true)
virtual void ConstructProcess() override
static G4KaonZeroLong * KaonZeroLong()
bool G4bool
Definition: G4Types.hh:79
void AddBuilder(G4PhysicsBuilderInterface *bld)
virtual void ConstructParticle() override
value_type & Get() const
Definition: G4Cache.hh:314
G4HadronPhysicsQGS_BIC(G4int verbose=1)
void Put(const value_type &val) const
Definition: G4Cache.hh:318
static void ConstructParticle()
static G4KaonZeroShort * KaonZeroShort()
void Clear()
Definition: G4Cache.hh:396
virtual void TerminateWorker() override
static G4HadronicProcess * FindInelasticProcess(const G4ParticleDefinition *)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
int G4int
Definition: G4Types.hh:78
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4ProcessManager * GetProcessManager() const
static const char * Default_Name()
G4int size() const
G4Cache< G4ComponentGGHadronNucleusXsc * > xs_k
iterator Begin()
Definition: G4Cache.hh:384
static constexpr double pi
Definition: G4SIunits.hh:75
static constexpr double GeV
Definition: G4SIunits.hh:217
void Push_back(const value_type &val)
Definition: G4Cache.hh:362