Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4HadronPhysicsFTFP_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 //------------------------------------------------------------------------
27 //
28 // Modified:
29 //
30 //------------------------------------------------------------------------
31 //
33 #include "G4NeutronPHPBuilder.hh"
34 
35 #include <iomanip>
36 #include "globals.hh"
37 #include "G4ios.hh"
38 #include "G4SystemOfUnits.hh"
39 
40 #include "G4ProcessManager.hh"
44 #include "G4NeutronRadCapture.hh"
45 #include "G4NeutronCaptureXS.hh"
47 #include "G4LFission.hh"
48 #include "G4NeutronBuilder.hh"
49 #include "G4FTFPNeutronBuilder.hh"
51 
52 
54 
55 #include "G4PhysListUtil.hh"
56 
57 // factory
59 //
61 
62 
64  : G4HadronPhysicsFTFP_BERT_HP("hInelastic FTFP_BERT_HP",false)
65 {}
66 
68  : G4HadronPhysicsFTFP_BERT(name,quasiElastic)
69 {
70  minBERT_neutron = 19.9*MeV;
71 }
72 
74 {
75  G4cout << G4endl
76  << " FTFP_BERT_HP : new threshold between BERT and FTFP is over the interval " << G4endl
77  << " for pions : " << minFTFP_pion/GeV << " to " << maxBERT_pion/GeV << " GeV" << G4endl
78  << " for kaons : " << minFTFP_kaon/GeV << " to " << maxBERT_kaon/GeV << " GeV" << G4endl
79  << " for proton : " << minFTFP_proton/GeV << " to " << maxBERT_proton/GeV << " GeV" << G4endl
80  << " for neutron : " << minFTFP_neutron/GeV << " to " << maxBERT_neutron/GeV << " GeV" << G4endl
81  << G4endl;
82 }
83 
85 {
86  auto neu = new G4NeutronBuilder( true ); // Fission on
87  AddBuilder(neu);
88  auto ftfpneu = new G4FTFPNeutronBuilder(QuasiElastic);
89  AddBuilder(ftfpneu);
90  ftfpneu->SetMinEnergy(minFTFP_neutron);
91  neu->RegisterMe(ftfpneu);
92  auto bertneu = new G4BertiniNeutronBuilder;
93  AddBuilder(bertneu);
94  bertneu->SetMaxEnergy(maxBERT_neutron);
95  bertneu->SetMinEnergy(minBERT_neutron);
96  neu->RegisterMe(bertneu);
97  auto hpneu = new G4NeutronPHPBuilder;
98  AddBuilder(hpneu);
99  neu->RegisterMe(hpneu);
100  neu->Build();
101 }
102 
104 {
105  //Modify XS for kaons
106  auto xsk = new G4ComponentGGHadronNucleusXsc();
107  xs_k.Put(xsk);
109  xs_ds.Push_back(kaonxs);
114 
115  // --- Neutrons ---
116  G4HadronicProcess* capture = 0;
117  G4HadronicProcess* fission = 0;
119  G4ProcessVector* pv = pmanager->GetProcessList();
120  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
121  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
122  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
123  } else if ( fFission == ((*pv)[i])->GetProcessSubType() ) {
124  fission = static_cast<G4HadronicProcess*>((*pv)[i]);
125  }
126  }
127  if ( ! capture ) {
128  capture = new G4HadronCaptureProcess("nCapture");
129  pmanager->AddDiscreteProcess(capture);
130  }
132  xs_ds.Push_back(xs_n_in);//TODO: Is this needed? Who owns the pointer?
133  capture->AddDataSet( xs_n_in );
134  auto xs_n_hp = new G4ParticleHPCaptureData;
135  xs_ds.Push_back(xs_n_hp);//TODO: Is this needed? Original code does not need this
136  capture->AddDataSet( xs_n_hp );
137  G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
138  theNeutronRadCapture->SetMinEnergy( minBERT_neutron );
139  capture->RegisterMe( theNeutronRadCapture );
140  if ( ! fission ) {
141  fission = new G4HadronFissionProcess("nFission");
142  pmanager->AddDiscreteProcess(fission);
143  }
144  G4LFission* theNeutronLEPFission = new G4LFission();
145  theNeutronLEPFission->SetMinEnergy( minBERT_neutron );
146  fission->RegisterMe( theNeutronLEPFission );
147 }
#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)
#define G4endl
Definition: G4ios.hh:61
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
void AddBuilder(G4PhysicsBuilderInterface *bld)
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
static const char * Default_Name()
G4int size() const
G4GLOB_DLL std::ostream G4cout
virtual void ExtraConfiguration() override
G4Cache< G4ComponentGGHadronNucleusXsc * > xs_k
static constexpr double GeV
Definition: G4SIunits.hh:217
void Push_back(const value_type &val)
Definition: G4Cache.hh:362
G4VectorCache< G4VCrossSectionDataSet * > xs_ds