Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4HadronPhysicsQGSP_BIC.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.cc 93617 2015-10-27 09:00:41Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName: G4HadronPhysicsQGSP_BIC
31 //
32 // Author: 2002 J.P. Wellisch
33 //
34 // Modified:
35 // 23.11.2005 G.Folger: migration to non static particles
36 // 08.06.2006 V.Ivanchenko: remove stopping
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 "G4NeutronInelasticXS.hh"
63 #include "G4NeutronCaptureXS.hh"
64 
66 
67 #include "G4PhysListUtil.hh"
68 
69 // factory
71 //
73 
74 G4ThreadLocal G4HadronPhysicsQGSP_BIC::ThreadPrivate*
75 G4HadronPhysicsQGSP_BIC::tpdata = 0;
76 
78  : G4VPhysicsConstructor("hInelastic QGSP_BIC")
79 /* , theNeutrons(0)
80  , theFTFPNeutron(0)
81  , theQGSPNeutron(0)
82  , theBinaryNeutron(0)
83  , thePiK(0)
84  , theFTFPPiK(0)
85  , theQGSPPiK(0)
86  , theBertiniPiK(0)
87  , thePro(0)
88  , theFTFPPro(0)
89  , theQGSPPro(0)
90  , theBinaryPro(0)
91  , theHyperon(0)
92  , theAntiBaryon(0)
93  , theFTFPAntiBaryon(0)
94  , xsKaon(0)
95  , xsNeutronInelasticXS(0)
96  , xsNeutronCaptureXS(0)*/
97 // , QuasiElastic(true)
98 {}
99 
101  : G4VPhysicsConstructor(name)
102 /* , theNeutrons(0)
103  , theFTFPNeutron(0)
104  , theQGSPNeutron(0)
105  , theBinaryNeutron(0)
106  , thePiK(0)
107  , theFTFPPiK(0)
108  , theQGSPPiK(0)
109  , theBertiniPiK(0)
110  , thePro(0)
111  , theFTFPPro(0)
112  , theQGSPPro(0)
113  , theBinaryPro(0)
114  , theHyperon(0)
115  , theAntiBaryon(0)
116  , theFTFPAntiBaryon(0)
117  , xsKaon(0)
118  , xsNeutronInelasticXS(0)
119  , xsNeutronCaptureXS(0)*/
120 // , QuasiElastic(quasiElastic)
121 {}
122 
123 void G4HadronPhysicsQGSP_BIC::CreateModels()
124 {
125  G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
126  G4bool quasiElasticQGS= true; // For QGS, it must use it.
127 
128  const G4double maxFTFP = 25.0*GeV;
129  const G4double minFTFP = 9.5*GeV;
130  const G4double maxBIC = 9.9*GeV;
131  const G4double maxBERT = 5.0*GeV;
132 
133  tpdata->theNeutrons=new G4NeutronBuilder;
134  tpdata->theNeutrons->RegisterMe(tpdata->theQGSPNeutron=new G4QGSPNeutronBuilder(quasiElasticQGS));
135  tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(quasiElasticFTF));
136  tpdata->theFTFPNeutron->SetMinEnergy(minFTFP);
137  tpdata->theFTFPNeutron->SetMaxEnergy(maxFTFP);
138 
139  tpdata->theNeutrons->RegisterMe(tpdata->theBinaryNeutron=new G4BinaryNeutronBuilder);
140  tpdata->theBinaryNeutron->SetMaxEnergy(maxBIC);
141 
142  tpdata->thePro=new G4ProtonBuilder;
143  tpdata->thePro->RegisterMe(tpdata->theQGSPPro=new G4QGSPProtonBuilder(quasiElasticQGS));
144  tpdata->thePro->RegisterMe(tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasticFTF));
145  tpdata->theFTFPPro->SetMinEnergy(minFTFP);
146  tpdata->theFTFPPro->SetMaxEnergy(maxFTFP);
147 
148  tpdata->thePro->RegisterMe(tpdata->theBinaryPro=new G4BinaryProtonBuilder);
149  tpdata->theBinaryPro->SetMaxEnergy(maxBIC);
150 
151  tpdata->thePiK=new G4PiKBuilder;
152  tpdata->thePiK->RegisterMe(tpdata->theQGSPPiK=new G4QGSPPiKBuilder(quasiElasticQGS));
153  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasticFTF));
154  tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP);
155  tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
156  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
157 
158  tpdata->theHyperon=new G4HyperonFTFPBuilder;
159 
160  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
161  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasticFTF));
162 }
163 
165 {
166  if (!tpdata) return;
167 
168  delete tpdata->theBinaryNeutron;
169  delete tpdata->theQGSPNeutron;
170  delete tpdata->theFTFPNeutron;
171  delete tpdata->theBertiniPiK;
172  delete tpdata->theQGSPPiK;
173  delete tpdata->theFTFPPiK;
174  delete tpdata->thePiK;
175  delete tpdata->theBinaryPro;
176  delete tpdata->theQGSPPro;
177  delete tpdata->theFTFPPro;
178  delete tpdata->thePro;
179  delete tpdata->theFTFPAntiBaryon;
180  delete tpdata->theAntiBaryon;
181  delete tpdata->theHyperon;
182  delete tpdata->xsNeutronCaptureXS;
183 
184  delete tpdata; tpdata =0 ;
185 }
186 
188 {
189  G4MesonConstructor pMesonConstructor;
190  pMesonConstructor.ConstructParticle();
191 
192  G4BaryonConstructor pBaryonConstructor;
193  pBaryonConstructor.ConstructParticle();
194 
195  G4ShortLivedConstructor pShortLivedConstructor;
196  pShortLivedConstructor.ConstructParticle();
197 
198  G4IonConstructor pIonConstructor;
199  pIonConstructor.ConstructParticle();
200 }
201 
202 #include "G4ProcessManager.hh"
204 {
205  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
206  CreateModels();
207  tpdata->theNeutrons->Build();
208  tpdata->thePro->Build();
209  tpdata->thePiK->Build();
210 
211  // --- Kaons ---
212  tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
213  G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
218 
219  tpdata->theHyperon->Build();
220  tpdata->theAntiBaryon->Build();
221 
222  // --- Neutrons ---
224  G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
225 
226  G4HadronicProcess* capture = 0;
228  G4ProcessVector* pv = pmanager->GetProcessList();
229  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
230  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
231  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
232  }
233  }
234  if ( ! capture ) {
235  capture = new G4HadronCaptureProcess("nCapture");
236  pmanager->AddDiscreteProcess(capture);
237  }
239  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
240  capture->RegisterMe(new G4NeutronRadCapture());
241 }
242 
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()
G4HadronPhysicsQGSP_BIC(G4int verbose=1)
static const char * Default_Name()
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)
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
double G4double
Definition: G4Types.hh:76
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4ProcessVector * GetProcessList() const
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)