Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4HadronPhysicsQGSP_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: G4HadronPhysicsQGSP_BIC.cc 105736 2017-08-16 13:01:11Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName: G4HadronPhysicsQGSP_BIC
31 //
32 // Author: 2002 J.P. Wellisch
33 //
34 // Modified:
35 // 23.11.2005 G.Folger: migration to non static particles
36 // 08.06.2006 V.Ivanchenko: remove stopping
37 // 25.04.2007 G.Folger: Add code for quasielastic
38 // 31.10.2012 A.Ribon: Use G4MiscBuilder
39 // 19.03.2013 A.Ribon: Replace LEP with FTFP and BERT
40 //
41 //----------------------------------------------------------------------------
42 //
43 #include <iomanip>
44 
46 
47 #include "G4PiKBuilder.hh"
48 #include "G4FTFPPiKBuilder.hh"
49 #include "G4QGSPPiKBuilder.hh"
50 #include "G4BertiniPiKBuilder.hh"
51 
52 #include "G4ProtonBuilder.hh"
53 #include "G4FTFPProtonBuilder.hh"
54 #include "G4QGSPProtonBuilder.hh"
55 #include "G4BinaryProtonBuilder.hh"
56 
57 #include "G4NeutronBuilder.hh"
58 #include "G4FTFPNeutronBuilder.hh"
59 #include "G4QGSPNeutronBuilder.hh"
61 
62 #include "G4HyperonFTFPBuilder.hh"
63 #include "G4AntiBarionBuilder.hh"
65 #include "globals.hh"
66 #include "G4ios.hh"
67 #include "G4SystemOfUnits.hh"
68 #include "G4ParticleDefinition.hh"
69 #include "G4ParticleTable.hh"
70 
71 #include "G4MesonConstructor.hh"
72 #include "G4BaryonConstructor.hh"
74 #include "G4IonConstructor.hh"
75 
79 #include "G4NeutronRadCapture.hh"
80 #include "G4NeutronInelasticXS.hh"
81 #include "G4NeutronCaptureXS.hh"
82 
84 
85 #include "G4PhysListUtil.hh"
86 #include "G4ProcessManager.hh"
88 
90 
92  : G4HadronPhysicsQGSP_BIC("hInelastic QGSP_BIC",true)
93 {}
94 
96  : G4VPhysicsConstructor(name)
97 {
98  QuasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
99  QuasiElasticQGS= true; // For QGS, it must use it.
103  minFTFP_pik = 4.*GeV;
105  maxBERT_pik = 5.0*GeV;
106 }
107 
109 {
110  Neutron();
111  Proton();
112  Pion();
113  Kaon();
114  Others();
115 }
116 
118 {
119  auto neu = new G4NeutronBuilder;
120  AddBuilder(neu);
121  auto qgs = new G4QGSPNeutronBuilder(QuasiElasticQGS);
122  AddBuilder(qgs);
123  qgs->SetMinEnergy(minQGSP_neutron);
124  neu->RegisterMe(qgs);
125  auto ftf = new G4FTFPNeutronBuilder(QuasiElasticFTF);
126  AddBuilder(ftf);
127  ftf->SetMinEnergy(minFTFP_neutron);
128  ftf->SetMaxEnergy(maxFTFP_neutron);
129  neu->RegisterMe(ftf);
130  auto bic = new G4BinaryNeutronBuilder;
131  AddBuilder(bic);
132  bic->SetMaxEnergy(maxBIC_neutron);
133  neu->RegisterMe(bic);
134  neu->Build();
135 }
136 
138 {
139  auto pro = new G4ProtonBuilder;
140  AddBuilder(pro);
141  auto qgs = new G4QGSPProtonBuilder(QuasiElasticQGS);
142  AddBuilder(qgs);
143  qgs->SetMinEnergy(minQGSP_proton);
144  pro->RegisterMe(qgs);
145  auto ftf = new G4FTFPProtonBuilder(QuasiElasticFTF);
146  AddBuilder(ftf);
147  ftf->SetMinEnergy(minFTFP_proton);
148  ftf->SetMaxEnergy(maxFTFP_proton);
149  pro->RegisterMe(ftf);
150  auto bic = new G4BinaryProtonBuilder;
151  AddBuilder(bic);
152  bic->SetMaxEnergy(maxBIC_proton);
153  pro->RegisterMe(bic);
154  pro->Build();
155 }
156 
158 {
159  auto pik = new G4PiKBuilder;
160  AddBuilder(pik);
161  auto qgs = new G4QGSPPiKBuilder(QuasiElasticQGS);
162  AddBuilder(qgs);
163  qgs->SetMinEnergy(minQGSP_pik);
164  pik->RegisterMe(qgs);
165  auto ftf = new G4FTFPPiKBuilder(QuasiElasticFTF);
166  AddBuilder(ftf);
167  ftf->SetMaxEnergy(maxFTFP_pik);
168  ftf->SetMinEnergy(minFTFP_pik);
169  pik->RegisterMe(ftf);
170  auto bert = new G4BertiniPiKBuilder;
171  AddBuilder(bert);
172  bert->SetMaxEnergy(maxBERT_pik);
173  pik->RegisterMe(bert);
174  pik->Build();
175 }
176 
178 {
179  auto hyp = new G4HyperonFTFPBuilder;
180  AddBuilder(hyp);
181  hyp->Build();
182  auto abar = new G4AntiBarionBuilder;
183  AddBuilder(abar);
185  AddBuilder(ftf);
186  abar->RegisterMe(ftf);
187  abar->Build();
188 }
189 
191 {
192  delete xs_k.Get();
193  std::for_each( xs_ds.Begin(),xs_ds.End(),
194  [](G4VCrossSectionDataSet* el){delete el;});
195 }
196 
198 {
199  delete xs_k.Get();
200  std::for_each( xs_ds.Begin(), xs_ds.End(),[](G4VCrossSectionDataSet* el){ delete el;});
201  xs_ds.Clear();
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 
221 {
223  DumpBanner();
224  }
225  CreateModels();
227 }
228 
230 {
231  // --- Kaons ---
232  auto xsk = new G4ComponentGGHadronNucleusXsc();
233  xs_k.Put(xsk);
235  xs_ds.Push_back(kaonxs);
240 
241  // --- Neutrons ---
243  xs_ds.Push_back(xs_n_in); //TODO: Is this needed? Who owns the pointer?
245 
246  G4HadronicProcess* capture = 0;
248  G4ProcessVector* pv = pmanager->GetProcessList();
249  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
250  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
251  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
252  }
253  }
254  if ( ! capture ) {
255  capture = new G4HadronCaptureProcess("nCapture");
256  pmanager->AddDiscreteProcess(capture);
257  }
259  xs_ds.Push_back(xs_n_c); //TODO: Who owns this?
260  capture->AddDataSet(xs_n_c);
261  capture->RegisterMe(new G4NeutronRadCapture());
262 }
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)
const XML_Char * name
Definition: expat.h:151
static const char * Default_Name()
virtual void TerminateWorker() override
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
void RegisterMe(G4HadronicInteraction *a)
static void ConstructParticle()
virtual void ConstructProcess() override
static void ConstructParticle()
G4Cache< G4ComponentGGHadronNucleusXsc * > xs_k
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)
static G4KaonZeroLong * KaonZeroLong()
bool G4bool
Definition: G4Types.hh:79
virtual void ConstructParticle() override
G4HadronPhysicsQGSP_BIC(G4int verbose=1)
void AddBuilder(G4PhysicsBuilderInterface *bld)
G4VectorCache< G4VCrossSectionDataSet * > xs_ds
value_type & Get() const
Definition: G4Cache.hh:314
void Put(const value_type &val) const
Definition: G4Cache.hh:318
static void ConstructParticle()
static G4KaonZeroShort * KaonZeroShort()
void Clear()
Definition: G4Cache.hh:396
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
iterator Begin()
Definition: G4Cache.hh:384
static constexpr double GeV
Definition: G4SIunits.hh:217
void Push_back(const value_type &val)
Definition: G4Cache.hh:362