Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4HadronPhysicsQGSP_BIC_AllHP.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_AllHP.cc 73040 2013-08-15 09:36:57Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName: G4HadronPhysicsQGSP_BIC_AllHP
31 //
32 // Author: 2013 P. Arce
33 //
34 // based on G4HadronPhysicsQGSP_BIC_HP
35 //
36 //----------------------------------------------------------------------------
37 //
38 #include <iomanip>
39 
41 
42 #include "globals.hh"
43 #include "G4ios.hh"
44 #include "G4SystemOfUnits.hh"
45 #include "G4ParticleDefinition.hh"
46 #include "G4ParticleTable.hh"
47 
48 #include "G4MesonConstructor.hh"
49 #include "G4BaryonConstructor.hh"
51 #include "G4IonConstructor.hh"
52 
56 #include "G4NeutronRadCapture.hh"
57 #include "G4NeutronCaptureXS.hh"
59 #include "G4LFission.hh"
60 
62 
63 #include "G4PhysListUtil.hh"
64 
65 // factory
67 //
69 
70 G4ThreadLocal G4HadronPhysicsQGSP_BIC_AllHP::ThreadPrivate*
71 G4HadronPhysicsQGSP_BIC_AllHP::tpdata = 0;
72 
74  : G4VPhysicsConstructor("hInelastic QGSP_BIC_HP")
75 /* , theNeutrons(0)
76  , theFTFPNeutron(0)
77  , theQGSPNeutron(0)
78  , theBinaryNeutron(0)
79  , theHPNeutron(0)
80  , thePiKB(0)
81  , theFTFPPiK(0)
82  , theQGSPPiK(0)
83  , theBertiniPiK(0)
84  , thePro(0)
85  , theFTFPPro(0)
86  , theQGSPPro(0)
87  , theBinaryPro(0)
88  , theHyperon(0)
89  , theAntiBaryon(0)
90  , theFTFPAntiBaryon(0)
91  , xsKaon(0)
92  , xsNeutronCaptureXS(0)*/
93 // , QuasiElastic(true)
94 {}
95 
97  : G4VPhysicsConstructor(name)
98 /* , theNeutrons(0)
99  , theFTFPNeutron(0)
100  , theQGSPNeutron(0)
101  , theBinaryNeutron(0)
102  , theHPNeutron(0)
103  , thePiKB(0)
104  , theFTFPPiK(0)
105  , theQGSPPiK(0)
106  , theBertiniPiK(0)
107  , thePro(0)
108  , theFTFPPro(0)
109  , theQGSPPro(0)
110  , theBinaryPro(0)
111  , theHyperon(0)
112  , theAntiBaryon(0)
113  , theFTFPAntiBaryon(0)
114  , xsKaon(0)
115  , xsNeutronCaptureXS(0)*/
116 // , QuasiElastic(quasiElastic)
117 {}
118 
119 void G4HadronPhysicsQGSP_BIC_AllHP::CreateModels()
120 {
121  G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
122  G4bool quasiElasticQGS= true; // For QGS, it must use it.
123 
124  const G4double maxFTFP = 25.0*GeV;
125  const G4double minFTFP = 9.5*GeV;
126  const G4double maxBIC = 9.9*GeV;
127  const G4double maxBERT = 5.0*GeV;
128  const G4double maxHP = 19.9*MeV;
129 
130  tpdata->theNeutronB=new G4NeutronBuilder( true ); // Fission on
131  tpdata->theNeutronB->RegisterMe(tpdata->theQGSPNeutron=new G4QGSPNeutronBuilder(quasiElasticQGS));
132  tpdata->theNeutronB->RegisterMe(tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(quasiElasticFTF));
133  tpdata->theFTFPNeutron->SetMinEnergy(minFTFP);
134  tpdata->theFTFPNeutron->SetMaxEnergy(maxFTFP);
135 
136  tpdata->theNeutronB->RegisterMe(tpdata->theBinaryNeutron=new G4BinaryNeutronBuilder);
137  tpdata->theBinaryNeutron->SetMinEnergy(maxHP);
138  tpdata->theBinaryNeutron->SetMaxEnergy(maxBIC);
139 
140  //ParticleHP
141  tpdata->theNeutronB->RegisterMe(tpdata->thePHPNeutron=new G4NeutronPHPBuilder);
142 
143  tpdata->theProtonB=new G4ProtonBuilder;
144  tpdata->theProtonB->RegisterMe(tpdata->theQGSPProton=new G4QGSPProtonBuilder(quasiElasticQGS));
145  tpdata->theProtonB->RegisterMe(tpdata->theFTFPProton=new G4FTFPProtonBuilder(quasiElasticFTF));
146  tpdata->theFTFPProton->SetMinEnergy(minFTFP);
147  tpdata->theFTFPProton->SetMaxEnergy(maxFTFP);
148  tpdata->theProtonB->RegisterMe(tpdata->theBinaryProton=new G4BinaryProtonBuilder);
149  tpdata->theBinaryProton->SetMaxEnergy(maxBIC);
150 
151  //ParticleHP
152  tpdata->theBinaryProton->SetMinEnergy(200*MeV);
153  tpdata->thePHPProton=new G4ProtonPHPBuilder;
154  tpdata->theProtonB->RegisterMe(tpdata->thePHPProton);
155  tpdata->thePHPProton->SetMinEnergy(0.*MeV);
156  tpdata->thePHPProton->SetMaxEnergy(200*MeV);
157 
158  tpdata->thePiKB=new G4PiKBuilder;
159  tpdata->thePiKB->RegisterMe(tpdata->theQGSPPiK=new G4QGSPPiKBuilder(quasiElasticQGS));
160  tpdata->thePiKB->RegisterMe(tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasticFTF));
161  tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP);
162  tpdata->thePiKB->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
163  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
164 
165  tpdata->theHyperon=new G4HyperonFTFPBuilder;
166 
167  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
168  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasticFTF));
169 }
170 
172 {
173  if (!tpdata) return;
174 
175  //ParticleHP
176  delete tpdata->thePHPNeutron;
177  delete tpdata->thePHPProton;
178  delete tpdata->theBinaryNeutron;
179  delete tpdata->theQGSPNeutron;
180  delete tpdata->theFTFPNeutron;
181  delete tpdata->theBertiniPiK;
182  delete tpdata->theQGSPPiK;
183  delete tpdata->theFTFPPiK;
184  delete tpdata->thePiKB;
185  delete tpdata->theBinaryProton;
186  delete tpdata->theQGSPProton;
187  delete tpdata->theFTFPProton;
188  delete tpdata->theProtonB;
189  delete tpdata->theFTFPAntiBaryon;
190  delete tpdata->theAntiBaryon;
191  delete tpdata->theHyperon;
192  delete tpdata->xsNeutronCaptureXS;
193 
194  delete tpdata; tpdata = 0;
195 }
196 
198 {
199  G4MesonConstructor pMesonConstructor;
200  pMesonConstructor.ConstructParticle();
201 
202  G4BaryonConstructor pBaryonConstructor;
203  pBaryonConstructor.ConstructParticle();
204 
205  G4ShortLivedConstructor pShortLivedConstructor;
206  pShortLivedConstructor.ConstructParticle();
207 }
208 
209 #include "G4ProcessManager.hh"
211 {
212  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
213  CreateModels();
214  tpdata->theNeutronB->Build();
215  tpdata->theProtonB->Build();
216  tpdata->thePiKB->Build();
217 
218  // --- Kaons ---
219  tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
220  G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
225 
226  tpdata->theHyperon->Build();
227  tpdata->theAntiBaryon->Build();
228 
229  // --- Neutrons ---
230  G4HadronicProcess* capture = 0;
231  G4HadronicProcess* fission = 0;
233  G4ProcessVector* pv = pmanager->GetProcessList();
234  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
235  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
236  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
237  } else if ( fFission == ((*pv)[i])->GetProcessSubType() ) {
238  fission = static_cast<G4HadronicProcess*>((*pv)[i]);
239  }
240  }
241  if ( ! capture ) {
242  capture = new G4HadronCaptureProcess("nCapture");
243  pmanager->AddDiscreteProcess(capture);
244  }
245  tpdata->xsNeutronCaptureXS = new G4NeutronCaptureXS();
246  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
247  capture->AddDataSet( new G4ParticleHPCaptureData );
248  G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
249  theNeutronRadCapture->SetMinEnergy( 19.9*MeV );
250  capture->RegisterMe( theNeutronRadCapture );
251  if ( ! fission ) {
252  fission = new G4HadronFissionProcess("nFission");
253  pmanager->AddDiscreteProcess(fission);
254  }
255  G4LFission* theNeutronLEPFission = new G4LFission();
256  theNeutronLEPFission->SetMinEnergy( 19.9*MeV );
257  fission->RegisterMe( theNeutronLEPFission );
258 }
259 
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
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 G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4int size() const
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)