Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4HadronPhysicsQGSP_BIC_HP.cc
Go to the documentation of this file.
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_HP.cc 93878 2015-11-03 08:18:00Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName: G4HadronPhysicsQGSP_BIC_HP
31 //
32 // Author: 2006 G.Folger
33 //
34 // Based on G4HadronPhysicsQGSP_BIC
35 //
36 // Modified:
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 "globals.hh"
48 #include "G4ios.hh"
49 #include "G4SystemOfUnits.hh"
50 #include "G4ParticleDefinition.hh"
51 #include "G4ParticleTable.hh"
52 
53 #include "G4MesonConstructor.hh"
54 #include "G4BaryonConstructor.hh"
56 #include "G4IonConstructor.hh"
57 
61 #include "G4NeutronRadCapture.hh"
62 #include "G4NeutronCaptureXS.hh"
64 #include "G4LFission.hh"
65 
67 
68 #include "G4PhysListUtil.hh"
69 
70 // factory
72 //
74 
75 G4ThreadLocal G4HadronPhysicsQGSP_BIC_HP::ThreadPrivate*
76 G4HadronPhysicsQGSP_BIC_HP::tpdata = 0;
77 
79  : G4VPhysicsConstructor("hInelastic QGSP_BIC_HP")
80 /* , theNeutrons(0)
81  , theFTFPNeutron(0)
82  , theQGSPNeutron(0)
83  , theBinaryNeutron(0)
84  , theHPNeutron(0)
85  , thePiK(0)
86  , theFTFPPiK(0)
87  , theQGSPPiK(0)
88  , theBertiniPiK(0)
89  , thePro(0)
90  , theFTFPPro(0)
91  , theQGSPPro(0)
92  , theBinaryPro(0)
93  , theHyperon(0)
94  , theAntiBaryon(0)
95  , theFTFPAntiBaryon(0)
96  , xsKaon(0)
97  , xsNeutronCaptureXS(0)*/
98 // , QuasiElastic(true)
99 {}
100 
102  : G4VPhysicsConstructor(name)
103 /* , theNeutrons(0)
104  , theFTFPNeutron(0)
105  , theQGSPNeutron(0)
106  , theBinaryNeutron(0)
107  , theHPNeutron(0)
108  , thePiK(0)
109  , theFTFPPiK(0)
110  , theQGSPPiK(0)
111  , theBertiniPiK(0)
112  , thePro(0)
113  , theFTFPPro(0)
114  , theQGSPPro(0)
115  , theBinaryPro(0)
116  , theHyperon(0)
117  , theAntiBaryon(0)
118  , theFTFPAntiBaryon(0)
119  , xsKaon(0)
120  , xsNeutronCaptureXS(0)*/
121 // , QuasiElastic(quasiElastic)
122 {}
123 
124 void G4HadronPhysicsQGSP_BIC_HP::CreateModels()
125 {
126  G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
127  G4bool quasiElasticQGS= true; // For QGS, it must use it.
128 
129  const G4double maxFTFP = 25.0*GeV;
130  const G4double minFTFP = 9.5*GeV;
131  const G4double maxBIC = 9.9*GeV;
132  const G4double maxBERT = 5.0*GeV;
133  const G4double maxHP = 19.9*MeV;
134 
135  tpdata->theNeutrons=new G4NeutronBuilder( true ); // Fission on
136  tpdata->theNeutrons->RegisterMe(tpdata->theQGSPNeutron=new G4QGSPNeutronBuilder(quasiElasticQGS));
137  tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(quasiElasticFTF));
138  tpdata->theFTFPNeutron->SetMinEnergy(minFTFP);
139  tpdata->theFTFPNeutron->SetMaxEnergy(maxFTFP);
140 
141  tpdata->theNeutrons->RegisterMe(tpdata->theBinaryNeutron=new G4BinaryNeutronBuilder);
142  tpdata->theBinaryNeutron->SetMinEnergy(maxHP);
143  tpdata->theBinaryNeutron->SetMaxEnergy(maxBIC);
144 
145  tpdata->theNeutrons->RegisterMe(tpdata->theHPNeutron=new G4NeutronPHPBuilder);
146 
147  tpdata->thePro=new G4ProtonBuilder;
148  tpdata->thePro->RegisterMe(tpdata->theQGSPPro=new G4QGSPProtonBuilder(quasiElasticQGS));
149  tpdata->thePro->RegisterMe(tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasticFTF));
150  tpdata->theFTFPPro->SetMinEnergy(minFTFP);
151  tpdata->theFTFPPro->SetMaxEnergy(maxFTFP);
152  tpdata->thePro->RegisterMe(tpdata->theBinaryPro=new G4BinaryProtonBuilder);
153  tpdata->theBinaryPro->SetMaxEnergy(maxBIC);
154 
155  tpdata->thePiK=new G4PiKBuilder;
156  tpdata->thePiK->RegisterMe(tpdata->theQGSPPiK=new G4QGSPPiKBuilder(quasiElasticQGS));
157  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasticFTF));
158  tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP);
159  tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
160  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
161 
162  tpdata->theHyperon=new G4HyperonFTFPBuilder;
163 
164  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
165  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasticFTF));
166 }
167 
169 {
170  if (!tpdata) return;
171 
172  delete tpdata->theHPNeutron;
173  delete tpdata->theBinaryNeutron;
174  delete tpdata->theQGSPNeutron;
175  delete tpdata->theFTFPNeutron;
176  delete tpdata->theBertiniPiK;
177  delete tpdata->theQGSPPiK;
178  delete tpdata->theFTFPPiK;
179  delete tpdata->thePiK;
180  delete tpdata->theBinaryPro;
181  delete tpdata->theQGSPPro;
182  delete tpdata->theFTFPPro;
183  delete tpdata->thePro;
184  delete tpdata->theFTFPAntiBaryon;
185  delete tpdata->theAntiBaryon;
186  delete tpdata->theHyperon;
187 
188  delete tpdata; tpdata = 0;
189 }
190 
192 {
193  G4MesonConstructor pMesonConstructor;
194  pMesonConstructor.ConstructParticle();
195 
196  G4BaryonConstructor pBaryonConstructor;
197  pBaryonConstructor.ConstructParticle();
198 
199  G4ShortLivedConstructor pShortLivedConstructor;
200  pShortLivedConstructor.ConstructParticle();
201 
202  G4IonConstructor pIonConstructor;
203  pIonConstructor.ConstructParticle();
204 }
205 
206 #include "G4ProcessManager.hh"
208 {
209  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
210  CreateModels();
211  tpdata->theNeutrons->Build();
212  tpdata->thePro->Build();
213  tpdata->thePiK->Build();
214 
215  // --- Kaons ---
216  tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
217  G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
222 
223  tpdata->theHyperon->Build();
224  tpdata->theAntiBaryon->Build();
225 
226  // --- Neutrons ---
227  G4HadronicProcess* capture = 0;
228  G4HadronicProcess* fission = 0;
230  G4ProcessVector* pv = pmanager->GetProcessList();
231  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
232  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
233  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
234  } else if ( fFission == ((*pv)[i])->GetProcessSubType() ) {
235  fission = static_cast<G4HadronicProcess*>((*pv)[i]);
236  }
237  }
238  if ( ! capture ) {
239  capture = new G4HadronCaptureProcess("nCapture");
240  pmanager->AddDiscreteProcess(capture);
241  }
243  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
244  capture->AddDataSet( new G4ParticleHPCaptureData );
245  G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
246  theNeutronRadCapture->SetMinEnergy( 19.9*MeV );
247  capture->RegisterMe( theNeutronRadCapture );
248  if ( ! fission ) {
249  fission = new G4HadronFissionProcess("nFission");
250  pmanager->AddDiscreteProcess(fission);
251  }
252  G4LFission* theNeutronLEPFission = new G4LFission();
253  theNeutronLEPFission->SetMinEnergy( 19.9*MeV );
254  fission->RegisterMe( theNeutronLEPFission );
255 }
256 
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=true)
const XML_Char * name
Definition: expat.h:151
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4KaonZeroLong * KaonZeroLong()
static void ConstructParticle()
#define G4ThreadLocal
Definition: tls.hh:89
static void ConstructParticle()
int G4int
Definition: G4Types.hh:78
static G4KaonMinus * KaonMinus()
Definition: G4KaonMinus.cc:113
static void ConstructParticle()
void RegisterMe(G4HadronicInteraction *a)
void SetMinEnergy(G4double anEnergy)
static G4HadronicProcess * FindInelasticProcess(const G4ParticleDefinition *)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
static G4KaonZeroShort * KaonZeroShort()
bool G4bool
Definition: G4Types.hh:79
static G4CrossSectionDataSetRegistry * Instance()
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4int size() const
static const char * Default_Name()
G4ProcessManager * GetProcessManager() const
static constexpr double GeV
Definition: G4SIunits.hh:217
static constexpr double MeV
Definition: G4SIunits.hh:214
double G4double
Definition: G4Types.hh:76
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4ProcessVector * GetProcessList() const
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)