Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4HadronPhysicsQGSP_BERT_HP.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_BERT_HP.cc 105736 2017-08-16 13:01:11Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName: G4HadronPhysicsQGSP_BERT_HP
31 //
32 // Author: 2002 J.P. Wellisch
33 //
34 // Modified:
35 // 15.12.2005 G.Folger: migration to non static particles
36 // 08.06.2006 V.Ivanchenko: remove stopping
37 // 20.06.2006 G.Folger: Bertini applies to Kaons, i.e. use SetMinEnergy instead of SetMinPionEnergy
38 // 25.04.2007 G.Folger: Add code for quasielastic
39 // 31.10.2012 A.Ribon: Use G4MiscBuilder
40 // 19.03.2013 A.Ribon: Replace LEP with FTFP
41 //
42 //----------------------------------------------------------------------------
43 //
44 #include <iomanip>
45 
47 
48 #include "globals.hh"
49 #include "G4ios.hh"
50 #include "G4SystemOfUnits.hh"
51 #include "G4ParticleDefinition.hh"
52 #include "G4ParticleTable.hh"
53 
54 #include "G4NeutronBuilder.hh"
55 #include "G4FTFPNeutronBuilder.hh"
56 #include "G4QGSPNeutronBuilder.hh"
58 #include "G4NeutronPHPBuilder.hh"
59 
63 #include "G4NeutronRadCapture.hh"
64 #include "G4NeutronCaptureXS.hh"
66 #include "G4LFission.hh"
67 #include "G4ProcessVector.hh"
68 #include "G4ProcessManager.hh"
69 
71 
72 #include "G4PhysListUtil.hh"
73 
74 // factory
76 //
78 
80  : G4HadronPhysicsQGSP_BERT_HP("hInelastic QGSP_BERT_HP")
81 {}
82 
85 {
86  minBERT_neutron = 19.9*MeV;
87 }
88 
90 {
91  auto neu = new G4NeutronBuilder( true ); // Fission on
92  AddBuilder(neu);
93  auto qgs = new G4QGSPNeutronBuilder(QuasiElasticQGS);
94  AddBuilder(qgs);
95  qgs->SetMinEnergy(minQGSP_neutron);
96  neu->RegisterMe(qgs);
97  auto ftf = new G4FTFPNeutronBuilder(QuasiElasticFTF);
98  AddBuilder(ftf);
99  ftf->SetMinEnergy(minFTFP_neutron);
100  ftf->SetMaxEnergy(maxFTFP_neutron);
101  neu->RegisterMe(ftf);
102  auto bert = new G4BertiniNeutronBuilder;
103  AddBuilder(bert);
104  bert->SetMinEnergy(minBERT_neutron);
105  bert->SetMaxEnergy(maxBERT_neutron);
106  neu->RegisterMe(bert);
107  auto hp = new G4NeutronPHPBuilder;
108  AddBuilder(hp);
109  neu->RegisterMe(hp);
110  neu->Build();
111 }
112 
113 
115 {
116  //Modify XS for kaons
117  auto xsk = new G4ComponentGGHadronNucleusXsc();
118  xs_k.Put(xsk);
120  xs_ds.Push_back(kaonxs);
125 
126  // --- Neutrons ---
127  G4HadronicProcess* capture = 0;
128  G4HadronicProcess* fission = 0;
130  G4ProcessVector* pv = pmanager->GetProcessList();
131  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
132  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
133  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
134  } else if ( fFission == ((*pv)[i])->GetProcessSubType() ) {
135  fission = static_cast<G4HadronicProcess*>((*pv)[i]);
136  }
137  }
138  if ( ! capture ) {
139  capture = new G4HadronCaptureProcess("nCapture");
140  pmanager->AddDiscreteProcess(capture);
141  }
143  xs_ds.Push_back(xs_n_in);//TODO: Is this needed? Who owns the pointer?
144  capture->AddDataSet( xs_n_in );
145  auto xs_n_hp = new G4ParticleHPCaptureData;
146  xs_ds.Push_back(xs_n_hp);//TODO: Is this needed? Original code does not need this
147  capture->AddDataSet( xs_n_hp );
148  G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
149  theNeutronRadCapture->SetMinEnergy( minBERT_neutron );
150  capture->RegisterMe( theNeutronRadCapture );
151  if ( ! fission ) {
152  fission = new G4HadronFissionProcess("nFission");
153  pmanager->AddDiscreteProcess(fission);
154  }
155  G4LFission* theNeutronLEPFission = new G4LFission();
156  theNeutronLEPFission->SetMinEnergy( minBERT_neutron );
157  fission->RegisterMe( theNeutronLEPFission );
158 }
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)
const XML_Char * name
Definition: expat.h:151
void SetMinEnergy(G4double anEnergy)
static constexpr double MeV
Definition: G4SIunits.hh:214
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
void RegisterMe(G4HadronicInteraction *a)
static G4CrossSectionDataSetRegistry * Instance()
G4ProcessVector * GetProcessList() const
static G4KaonMinus * KaonMinus()
Definition: G4KaonMinus.cc:113
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=true)
static G4KaonZeroLong * KaonZeroLong()
bool G4bool
Definition: G4Types.hh:79
G4Cache< G4ComponentGGHadronNucleusXsc * > xs_k
void AddBuilder(G4PhysicsBuilderInterface *bld)
G4VectorCache< G4VCrossSectionDataSet * > xs_ds
void Put(const value_type &val) const
Definition: G4Cache.hh:318
static G4KaonZeroShort * KaonZeroShort()
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 ExtraConfiguration() override
static const char * Default_Name()
G4int size() const
void Push_back(const value_type &val)
Definition: G4Cache.hh:362