Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 73040 2013-08-15 09:36:57Z 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 
59 #include "G4NeutronRadCapture.hh"
60 #include "G4NeutronCaptureXS.hh"
62 #include "G4LFission.hh"
63 
64 // factory
66 //
68 
69 G4ThreadLocal G4HadronPhysicsQGSP_BIC_HP::ThreadPrivate*
70 G4HadronPhysicsQGSP_BIC_HP::tpdata = 0;
71 
73  : G4VPhysicsConstructor("hInelastic QGSP_BIC_HP")
74 /* , theNeutrons(0)
75  , theFTFPNeutron(0)
76  , theQGSPNeutron(0)
77  , theBinaryNeutron(0)
78  , theHPNeutron(0)
79  , thePiK(0)
80  , theFTFPPiK(0)
81  , theQGSPPiK(0)
82  , theBertiniPiK(0)
83  , thePro(0)
84  , theFTFPPro(0)
85  , theQGSPPro(0)
86  , theBinaryPro(0)
87  , theHyperon(0)
88  , theAntiBaryon(0)
89  , theFTFPAntiBaryon(0)
90  , xsNeutronCaptureXS(0)*/
91 // , QuasiElastic(true)
92 {}
93 
95  : G4VPhysicsConstructor(name)
96 /* , theNeutrons(0)
97  , theFTFPNeutron(0)
98  , theQGSPNeutron(0)
99  , theBinaryNeutron(0)
100  , theHPNeutron(0)
101  , thePiK(0)
102  , theFTFPPiK(0)
103  , theQGSPPiK(0)
104  , theBertiniPiK(0)
105  , thePro(0)
106  , theFTFPPro(0)
107  , theQGSPPro(0)
108  , theBinaryPro(0)
109  , theHyperon(0)
110  , theAntiBaryon(0)
111  , theFTFPAntiBaryon(0)
112  , xsNeutronCaptureXS(0)*/
113 // , QuasiElastic(quasiElastic)
114 {}
115 
116 void G4HadronPhysicsQGSP_BIC_HP::CreateModels()
117 {
118  G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
119  G4bool quasiElasticQGS= true; // For QGS, it must use it.
120 
121  const G4double maxFTFP = 25.0*GeV;
122  const G4double minFTFP = 9.5*GeV;
123  const G4double maxBIC = 9.9*GeV;
124  const G4double maxBERT = 5.0*GeV;
125  const G4double maxHP = 19.9*MeV;
126 
127  tpdata->theNeutrons=new G4NeutronBuilder( true ); // Fission on
128  tpdata->theNeutrons->RegisterMe(tpdata->theQGSPNeutron=new G4QGSPNeutronBuilder(quasiElasticQGS));
129  tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(quasiElasticFTF));
130  tpdata->theFTFPNeutron->SetMinEnergy(minFTFP);
131  tpdata->theFTFPNeutron->SetMaxEnergy(maxFTFP);
132 
133  tpdata->theNeutrons->RegisterMe(tpdata->theBinaryNeutron=new G4BinaryNeutronBuilder);
134  tpdata->theBinaryNeutron->SetMinEnergy(maxHP);
135  tpdata->theBinaryNeutron->SetMaxEnergy(maxBIC);
136 
137  tpdata->theNeutrons->RegisterMe(tpdata->theHPNeutron=new G4NeutronHPBuilder);
138 
139  tpdata->thePro=new G4ProtonBuilder;
140  tpdata->thePro->RegisterMe(tpdata->theQGSPPro=new G4QGSPProtonBuilder(quasiElasticQGS));
141  tpdata->thePro->RegisterMe(tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasticFTF));
142  tpdata->theFTFPPro->SetMinEnergy(minFTFP);
143  tpdata->theFTFPPro->SetMaxEnergy(maxFTFP);
144  tpdata->thePro->RegisterMe(tpdata->theBinaryPro=new G4BinaryProtonBuilder);
145  tpdata->theBinaryPro->SetMaxEnergy(maxBIC);
146 
147  tpdata->thePiK=new G4PiKBuilder;
148  tpdata->thePiK->RegisterMe(tpdata->theQGSPPiK=new G4QGSPPiKBuilder(quasiElasticQGS));
149  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasticFTF));
150  tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP);
151  tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
152  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
153 
154  tpdata->theHyperon=new G4HyperonFTFPBuilder;
155 
156  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
157  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasticFTF));
158 }
159 
161 {
162  delete tpdata->theHPNeutron;
163  delete tpdata->theBinaryNeutron;
164  delete tpdata->theQGSPNeutron;
165  delete tpdata->theFTFPNeutron;
166  delete tpdata->theBertiniPiK;
167  delete tpdata->theQGSPPiK;
168  delete tpdata->theFTFPPiK;
169  delete tpdata->thePiK;
170  delete tpdata->theBinaryPro;
171  delete tpdata->theQGSPPro;
172  delete tpdata->theFTFPPro;
173  delete tpdata->thePro;
174  delete tpdata->theFTFPAntiBaryon;
175  delete tpdata->theAntiBaryon;
176  delete tpdata->theHyperon;
177  delete tpdata->xsNeutronCaptureXS;
178 
179  delete tpdata; tpdata = 0;
180 }
181 
183 {
184  G4MesonConstructor pMesonConstructor;
185  pMesonConstructor.ConstructParticle();
186 
187  G4BaryonConstructor pBaryonConstructor;
188  pBaryonConstructor.ConstructParticle();
189 
190  G4ShortLivedConstructor pShortLivedConstructor;
191  pShortLivedConstructor.ConstructParticle();
192 
193  G4IonConstructor pIonConstructor;
194  pIonConstructor.ConstructParticle();
195 }
196 
197 #include "G4ProcessManager.hh"
199 {
200  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
201  CreateModels();
202  tpdata->theNeutrons->Build();
203  tpdata->thePro->Build();
204  tpdata->thePiK->Build();
205  tpdata->theHyperon->Build();
206  tpdata->theAntiBaryon->Build();
207 
208  // --- Neutrons ---
209  G4HadronicProcess* capture = 0;
210  G4HadronicProcess* fission = 0;
212  G4ProcessVector* pv = pmanager->GetProcessList();
213  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
214  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
215  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
216  } else if ( fFission == ((*pv)[i])->GetProcessSubType() ) {
217  fission = static_cast<G4HadronicProcess*>((*pv)[i]);
218  }
219  }
220  if ( ! capture ) {
221  capture = new G4HadronCaptureProcess("nCapture");
222  pmanager->AddDiscreteProcess(capture);
223  }
224  tpdata->xsNeutronCaptureXS = new G4NeutronCaptureXS();
225  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
226  capture->AddDataSet( new G4NeutronHPCaptureData );
227  G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
228  theNeutronRadCapture->SetMinEnergy( 19.9*MeV );
229  capture->RegisterMe( theNeutronRadCapture );
230  if ( ! fission ) {
231  fission = new G4HadronFissionProcess("nFission");
232  pmanager->AddDiscreteProcess(fission);
233  }
234  G4LFission* theNeutronLEPFission = new G4LFission();
235  theNeutronLEPFission->SetMinEnergy( 19.9*MeV );
236  fission->RegisterMe( theNeutronLEPFission );
237 }
238 
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
const XML_Char * name
static void ConstructParticle()
#define G4ThreadLocal
Definition: tls.hh:52
static void ConstructParticle()
G4ProcessManager * GetProcessManager() const
int G4int
Definition: G4Types.hh:78
static void ConstructParticle()
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BIC_HP)
void RegisterMe(G4HadronicInteraction *a)
void SetMinEnergy(G4double anEnergy)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
bool G4bool
Definition: G4Types.hh:79
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4int size() const
double G4double
Definition: G4Types.hh:76
G4ProcessVector * GetProcessList() const