Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 76703 2013-11-14 10:29:11Z 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 
59 #include "G4NeutronRadCapture.hh"
60 #include "G4NeutronInelasticXS.hh"
61 #include "G4NeutronCaptureXS.hh"
62 
63 #include "G4PhysListUtil.hh"
64 
65 // factory
67 //
69 
70 G4ThreadLocal G4HadronPhysicsQGSP_BIC::ThreadPrivate*
71 G4HadronPhysicsQGSP_BIC::tpdata = 0;
72 
74  : G4VPhysicsConstructor("hInelastic QGSP_BIC")
75 /* , theNeutrons(0)
76  , theFTFPNeutron(0)
77  , theQGSPNeutron(0)
78  , theBinaryNeutron(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  , xsNeutronInelasticXS(0)
91  , xsNeutronCaptureXS(0)*/
92 // , QuasiElastic(true)
93 {}
94 
96  : G4VPhysicsConstructor(name)
97 /* , theNeutrons(0)
98  , theFTFPNeutron(0)
99  , theQGSPNeutron(0)
100  , theBinaryNeutron(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  , xsNeutronInelasticXS(0)
113  , xsNeutronCaptureXS(0)*/
114 // , QuasiElastic(quasiElastic)
115 {}
116 
117 void G4HadronPhysicsQGSP_BIC::CreateModels()
118 {
119  G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
120  G4bool quasiElasticQGS= true; // For QGS, it must use it.
121 
122  const G4double maxFTFP = 25.0*GeV;
123  const G4double minFTFP = 9.5*GeV;
124  const G4double maxBIC = 9.9*GeV;
125  const G4double maxBERT = 5.0*GeV;
126 
127  tpdata->theNeutrons=new G4NeutronBuilder;
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->SetMaxEnergy(maxBIC);
135 
136  tpdata->thePro=new G4ProtonBuilder;
137  tpdata->thePro->RegisterMe(tpdata->theQGSPPro=new G4QGSPProtonBuilder(quasiElasticQGS));
138  tpdata->thePro->RegisterMe(tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasticFTF));
139  tpdata->theFTFPPro->SetMinEnergy(minFTFP);
140  tpdata->theFTFPPro->SetMaxEnergy(maxFTFP);
141 
142  tpdata->thePro->RegisterMe(tpdata->theBinaryPro=new G4BinaryProtonBuilder);
143  tpdata->theBinaryPro->SetMaxEnergy(maxBIC);
144 
145  tpdata->thePiK=new G4PiKBuilder;
146  tpdata->thePiK->RegisterMe(tpdata->theQGSPPiK=new G4QGSPPiKBuilder(quasiElasticQGS));
147  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasticFTF));
148  tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP);
149  tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
150  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
151 
152  tpdata->theHyperon=new G4HyperonFTFPBuilder;
153 
154  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
155  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasticFTF));
156 }
157 
159 {
160  delete tpdata->theBinaryNeutron;
161  delete tpdata->theQGSPNeutron;
162  delete tpdata->theFTFPNeutron;
163  delete tpdata->theBertiniPiK;
164  delete tpdata->theQGSPPiK;
165  delete tpdata->theFTFPPiK;
166  delete tpdata->thePiK;
167  delete tpdata->theBinaryPro;
168  delete tpdata->theQGSPPro;
169  delete tpdata->theFTFPPro;
170  delete tpdata->thePro;
171  delete tpdata->theFTFPAntiBaryon;
172  delete tpdata->theAntiBaryon;
173  delete tpdata->theHyperon;
174  delete tpdata->xsNeutronInelasticXS;
175  delete tpdata->xsNeutronCaptureXS;
176 
177  delete tpdata; tpdata =0 ;
178 }
179 
181 {
182  G4MesonConstructor pMesonConstructor;
183  pMesonConstructor.ConstructParticle();
184 
185  G4BaryonConstructor pBaryonConstructor;
186  pBaryonConstructor.ConstructParticle();
187 
188  G4ShortLivedConstructor pShortLivedConstructor;
189  pShortLivedConstructor.ConstructParticle();
190 
191  G4IonConstructor pIonConstructor;
192  pIonConstructor.ConstructParticle();
193 }
194 
195 #include "G4ProcessManager.hh"
197 {
198  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
199  CreateModels();
200  tpdata->theNeutrons->Build();
201  tpdata->thePro->Build();
202  tpdata->thePiK->Build();
203  tpdata->theHyperon->Build();
204  tpdata->theAntiBaryon->Build();
205 
206  // --- Neutrons ---
207  tpdata->xsNeutronInelasticXS = new G4NeutronInelasticXS();
208  G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
209 
210  G4HadronicProcess* capture = 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  }
217  }
218  if ( ! capture ) {
219  capture = new G4HadronCaptureProcess("nCapture");
220  pmanager->AddDiscreteProcess(capture);
221  }
222  tpdata->xsNeutronCaptureXS = new G4NeutronCaptureXS();
223  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
224  capture->RegisterMe(new G4NeutronRadCapture());
225 }
226 
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4HadronPhysicsQGSP_BIC(G4int verbose=1)
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()
void RegisterMe(G4HadronicInteraction *a)
static G4HadronicProcess * FindInelasticProcess(const G4ParticleDefinition *)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
bool G4bool
Definition: G4Types.hh:79
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BIC)
G4int size() const
double G4double
Definition: G4Types.hh:76
G4ProcessVector * GetProcessList() const