Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4HadronPhysicsINCLXX.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: G4HadronPhysicsINCLXX.cc 66892 2013-01-17 10:57:59Z gunter $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName: G4HadronPhysicsINCLXX
31 //
32 // Author: 2011 P. Kaitaniemi
33 //
34 // Modified:
35 // 22.05.2014 D. Mancusi: Extend INCL++ to 20 GeV
36 // 19.03.2013 A.Ribon: Replace LEP with FTFP and BERT
37 // 08.03.2013 D. Mancusi: Fix a problem with overlapping model ranges
38 // 01.03.2013 D. Mancusi: Rename to G4HadronPhysicsINCLXX and introduce
39 // parameters for FTFP and NeutronHP
40 // 31.10.2012 A.Ribon: Use G4MiscBuilder
41 // 23.03.2012 D. Mancusi: Extended INCL++ to incident heavy ions up to 16O
42 // 27.11.2011 P.Kaitaniemi: Created physics list for INCL++ using QGSP_INCL_ABLA as a template
43 //
44 //----------------------------------------------------------------------------
45 //
46 #include <iomanip>
47 
48 #include "G4HadronPhysicsINCLXX.hh"
49 
50 #include "globals.hh"
51 #include "G4ios.hh"
52 #include "G4SystemOfUnits.hh"
53 #include "G4ParticleDefinition.hh"
54 #include "G4ParticleTable.hh"
55 
56 #include "G4MesonConstructor.hh"
57 #include "G4BaryonConstructor.hh"
59 #include "G4IonConstructor.hh"
60 
61 #include "G4PionBuilder.hh"
62 #include "G4KaonBuilder.hh"
63 #include "G4QGSPPionBuilder.hh"
64 #include "G4FTFPPionBuilder.hh"
65 #include "G4QGSPKaonBuilder.hh"
66 #include "G4FTFPKaonBuilder.hh"
67 #include "G4INCLXXPionBuilder.hh"
68 #include "G4BertiniKaonBuilder.hh"
69 
70 #include "G4ProtonBuilder.hh"
71 #include "G4QGSPProtonBuilder.hh"
72 #include "G4FTFPProtonBuilder.hh"
73 #include "G4INCLXXProtonBuilder.hh"
74 
75 #include "G4NeutronBuilder.hh"
76 #include "G4QGSPNeutronBuilder.hh"
77 #include "G4FTFPNeutronBuilder.hh"
79 #include "G4NeutronPHPBuilder.hh"
80 
81 #include "G4HyperonFTFPBuilder.hh"
82 #include "G4AntiBarionBuilder.hh"
84 
88 #include "G4NeutronRadCapture.hh"
89 #include "G4NeutronCaptureXS.hh"
91 #include "G4LFission.hh"
92 
94 
95 #include "G4PhysListUtil.hh"
96 
97 // factory
99 //
101 
102 //Constant for configuration
103 namespace {
104  const G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
105  const G4bool quasiElasticQGS= true; // For QGS, it must use it.
106 }
107 
109  : G4HadronPhysicsINCLXX("hInelastic INCLXX")
110 {
111 }
112 
113 G4HadronPhysicsINCLXX::G4HadronPhysicsINCLXX(const G4String& name, const G4bool quasiElastic, const G4bool neutronHP, const G4bool ftfp)
114  : G4VPhysicsConstructor(name)
115  , QuasiElastic(quasiElastic)
116  , withNeutronHP(neutronHP)
117  , withFTFP(ftfp)
118 {
119 }
120 
122 {
123  Neutron();
124  Proton();
125  Pion();
126  Kaon();
127  Others();
128 }
129 
130 
132 {
133  //General schema:
134  // 1) Create a builder
135  // 2) Call AddBuilder
136  // 3) Configure the builder, possibly with sub-builders
137  // 4) Call builder->Build()
138  auto neu = new G4NeutronBuilder( withNeutronHP );
139  AddBuilder(neu);
140  G4PhysicsBuilderInterface* string = nullptr;
141  if(withFTFP) {
142  string = new G4FTFPNeutronBuilder(quasiElasticFTF);
143  } else {
144  string = new G4QGSPNeutronBuilder(quasiElasticQGS);
145  }
146  string->SetMinEnergy(15.*GeV);
147  AddBuilder(string);
148  neu->RegisterMe(string);
149 
150  auto inclxxn = new G4INCLXXNeutronBuilder;
151  inclxxn->SetMaxEnergy(20.*GeV);
152  AddBuilder(inclxxn);
153  neu->RegisterMe(inclxxn);
154 
155  if(withNeutronHP) {
156  inclxxn->UsePreCompound(false);
157  inclxxn->SetMinEnergy(19.9*MeV);
158  auto hpn = new G4NeutronPHPBuilder;
159  AddBuilder(hpn);
160  neu->RegisterMe(hpn);
161  } else {
162  inclxxn->UsePreCompound(true);
163  inclxxn->SetMinPreCompoundEnergy(0.0*MeV);
164  inclxxn->SetMaxPreCompoundEnergy(2.0*MeV);
165  inclxxn->SetMinEnergy(1.0*MeV);
166  }
167 
168  neu->Build();
169 }
170 
172 {
173  auto pro =new G4ProtonBuilder;
174  AddBuilder(pro);
175  G4PhysicsBuilderInterface* string = nullptr;
176  if(withFTFP) {
177  string = new G4FTFPProtonBuilder(quasiElasticFTF);
178  } else {
179  string = new G4QGSPProtonBuilder(quasiElasticQGS);
180  }
181  string->SetMinEnergy(15.*GeV);
182  AddBuilder(string);
183  pro->RegisterMe(string);
184 
185  auto inclxxp = new G4INCLXXProtonBuilder;
186  AddBuilder(inclxxp);
187  inclxxp->SetMinEnergy(1.0*MeV);
188  inclxxp->SetMaxEnergy(20.0*GeV);
189  pro->RegisterMe(inclxxp);
190  pro->Build();
191 }
192 
194 {
195  auto pi = new G4PionBuilder;
196  AddBuilder(pi);
197  G4PhysicsBuilderInterface* string = nullptr;
198  if(withFTFP) {
199  string = new G4FTFPPionBuilder(quasiElasticFTF);
200  } else {
201  string = new G4QGSPPionBuilder(quasiElasticQGS);
202  }
203  string->SetMinEnergy(15.*GeV);
204  AddBuilder(string);
205  pi->RegisterMe(string);
206 
207  auto inclxx = new G4INCLXXPionBuilder;
208  inclxx->SetMinEnergy(0.0*GeV);
209  inclxx->SetMaxEnergy(20.*GeV);
210  AddBuilder(inclxx);
211  pi->RegisterMe(inclxx);
212 
213  pi->Build();
214 }
215 
217 {
218  auto k = new G4KaonBuilder;
219  AddBuilder(k);
220  G4PhysicsBuilderInterface* string = nullptr;
221  if(withFTFP) {
222  string = new G4FTFPKaonBuilder(quasiElasticFTF);
223  } else {
224  string = new G4QGSPKaonBuilder(quasiElasticQGS);
225  }
226  string->SetMinEnergy(14.*GeV);
227  AddBuilder(string);
228  k->RegisterMe(string);
229 
230  auto bert = new G4BertiniKaonBuilder;
231  bert->SetMinEnergy(0.0*GeV);
232  bert->SetMaxEnergy(15.0*GeV);
233  AddBuilder(bert);
234  k->RegisterMe(bert);
235 
236  k->Build();
237 }
238 
240 {
241  auto hyp = new G4HyperonFTFPBuilder;
242  AddBuilder(hyp);
243  hyp->Build();
244 
245  auto abar = new G4AntiBarionBuilder;
246  AddBuilder(abar);
247  auto ftfpabar = new G4FTFPAntiBarionBuilder(quasiElasticFTF);
248  AddBuilder(ftfpabar);
249  abar->RegisterMe(ftfpabar);
250  abar->Build();
251 }
252 
254 {
255  delete xs_k.Get();
256  std::for_each( xs_ds.Begin(), xs_ds.End(),[](G4VCrossSectionDataSet* el){delete el;});
257 }
258 
260 {
261  delete xs_k.Get();
262  std::for_each( xs_ds.Begin(), xs_ds.End(),[](G4VCrossSectionDataSet* el){ delete el;});
263  xs_ds.Clear();
265 }
266 
268 {
269  G4MesonConstructor pMesonConstructor;
270  pMesonConstructor.ConstructParticle();
271 
272  G4BaryonConstructor pBaryonConstructor;
273  pBaryonConstructor.ConstructParticle();
274 
275  G4ShortLivedConstructor pShortLivedConstructor;
276  pShortLivedConstructor.ConstructParticle();
277 
278  G4IonConstructor pIonConstructor;
279  pIonConstructor.ConstructParticle();
280 }
281 
283 {
284  //if ( tpdata == 0 ) tpdata = new ThreadPrivate;
285  CreateModels();
287 }
288 
289 #include "G4ProcessManager.hh"
291 {
292  // --- Kaons ---
293  auto xsk = new G4ComponentGGHadronNucleusXsc();
294  xs_k.Put(xsk);
296  xs_ds.Push_back(kaonxs);
301 
302  // --- Neutrons ---
303  G4HadronicProcess* capture = 0;
304  G4HadronicProcess* fission = 0;
306  G4ProcessVector* pv = pmanager->GetProcessList();
307  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
308  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
309  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
310  } else if ( fFission == ((*pv)[i])->GetProcessSubType() ) {
311  fission = static_cast<G4HadronicProcess*>((*pv)[i]);
312  }
313  }
314  if ( ! capture ) {
315  capture = new G4HadronCaptureProcess("nCapture");
316  pmanager->AddDiscreteProcess(capture);
317  }
319  xs_ds.Push_back(xs_n_in);//TODO: Is this needed? Who owns the pointer?
320  capture->AddDataSet(xs_n_in);
321  G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
322  capture->RegisterMe( theNeutronRadCapture );
323  if ( withNeutronHP ) {
324  capture->AddDataSet( new G4ParticleHPCaptureData );
325  theNeutronRadCapture->SetMinEnergy( 19.9*MeV );
326  if ( ! fission ) {
327  fission = new G4HadronFissionProcess("nFission");
328  pmanager->AddDiscreteProcess(fission);
329  }
330  G4LFission* theNeutronLEPFission = new G4LFission();
331  theNeutronLEPFission->SetMinEnergy( 19.9*MeV );
332  fission->RegisterMe( theNeutronLEPFission );
333  }
334 }
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)
const XML_Char * name
Definition: expat.h:151
virtual void ConstructProcess() override
void SetMinEnergy(G4double anEnergy)
static constexpr double MeV
Definition: G4SIunits.hh:214
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
void RegisterMe(G4HadronicInteraction *a)
static void ConstructParticle()
static void ConstructParticle()
virtual void TerminateWorker() override
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
G4VectorCache< G4VCrossSectionDataSet * > xs_ds
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=true)
static G4KaonZeroLong * KaonZeroLong()
bool G4bool
Definition: G4Types.hh:79
void AddBuilder(G4PhysicsBuilderInterface *bld)
G4Cache< G4ComponentGGHadronNucleusXsc * > xs_k
virtual void SetMaxEnergy(G4double aM) finaloverride
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
virtual void SetMinEnergy(G4double aM) finaloverride
static const char * Default_Name()
G4int size() const
iterator Begin()
Definition: G4Cache.hh:384
static constexpr double pi
Definition: G4SIunits.hh:75
virtual void ConstructParticle() override
static constexpr double GeV
Definition: G4SIunits.hh:217
G4HadronPhysicsINCLXX(G4int verbose=1)
virtual void SetMinEnergy(G4double aM) finaloverride
void Push_back(const value_type &val)
Definition: G4Cache.hh:362