Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4HadronPhysicsQGSP_FTFP_BERT.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_FTFP_BERT.cc 76703 2013-11-14 10:29:11Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName: G4HadronPhysicsQGSP_FTFP_BERT
31 //
32 // Authors: 2 Apr 2009 J.Apostolakis/V.Ivantchenko: created starting from QGSP_BERT
33 //
34 // Modified:
35 //----------------------------------------------------------------------------
36 //
37 #include <iomanip>
38 
40 
41 #include "globals.hh"
42 #include "G4ios.hh"
43 #include "G4SystemOfUnits.hh"
44 #include "G4ParticleDefinition.hh"
45 #include "G4ParticleTable.hh"
46 
47 #include "G4MesonConstructor.hh"
48 #include "G4BaryonConstructor.hh"
50 #include "G4IonConstructor.hh"
51 
53 #include "G4NeutronRadCapture.hh"
54 #include "G4NeutronInelasticXS.hh"
55 #include "G4NeutronCaptureXS.hh"
56 
57 #include "G4PhysListUtil.hh"
58 
59 // factory
61 //
63 
64 G4ThreadLocal G4HadronPhysicsQGSP_FTFP_BERT::ThreadPrivate*
65 G4HadronPhysicsQGSP_FTFP_BERT::tpdata = 0;
66 
68  : G4VPhysicsConstructor("hInelastic QGSP_FTFP_BERT")
69 /* , theNeutrons(0)
70  , theFTFPNeutron(0)
71  , theQGSPNeutron(0)
72  , theBertiniNeutron(0)
73  , thePiK(0)
74  , theFTFPPiK(0)
75  , theQGSPPiK(0)
76  , theBertiniPiK(0)
77  , thePro(0)
78  , theFTFPPro(0)
79  , theQGSPPro(0)
80  , theBertiniPro(0)
81  , theHyperon(0)
82  , theAntiBaryon(0)
83  , theFTFPAntiBaryon(0)
84  , xsNeutronInelasticXS(0)
85  , xsNeutronCaptureXS(0)*/
86  , QuasiElastic(true)
87 {
88 }
89 
91  G4bool quasiElastic)
92  : G4VPhysicsConstructor("hInelastic QGSP_FTFP_BERT")
93 /* , theNeutrons(0)
94  , theFTFPNeutron(0)
95  , theQGSPNeutron(0)
96  , theBertiniNeutron(0)
97  , thePiK(0)
98  , theFTFPPiK(0)
99  , theQGSPPiK(0)
100  , theBertiniPiK(0)
101  , thePro(0)
102  , theFTFPPro(0)
103  , theQGSPPro(0)
104  , theBertiniPro(0)
105  , theHyperon(0)
106  , theAntiBaryon(0)
107  , theFTFPAntiBaryon(0)
108  , xsNeutronInelasticXS(0)
109  , xsNeutronCaptureXS(0)*/
110  , QuasiElastic(quasiElastic)
111 {
112 }
113 
114 void G4HadronPhysicsQGSP_FTFP_BERT::CreateModels()
115 {
116  // First transition, between BERT and FTF/P
117  G4double minFTFP= 6.0 * GeV; // Was 9.5 for LEP (in FTFP_BERT 6.0 * GeV);
118  G4double maxBERT= 8.0 * GeV; // Was 9.9 for LEP (in FTFP_BERT 8.0 * GeV);
119  // Second transition, between FTF/P and QGS/P
120  G4double minQGSP= 12.0 * GeV;
121  G4double maxFTFP= 25.0 * GeV;
122 
123  G4bool quasiElasFTF= false; // Use built-in quasi-elastic (not add-on)
124  G4bool quasiElasQGS= true; // For QGS, it must use it.
125 
126  G4cout << " New QGSP_FTFP_BERT physics list, replaces LEP with FTF/P for p/n/pi (/K?)";
127  G4cout << " Thresholds: " << G4endl;
128  G4cout << " 1) between BERT and FTF/P over the interval "
129  << minFTFP/GeV << " to " << maxBERT/GeV << " GeV. " << G4endl;
130  G4cout << " 2) between FTF/P and QGS/P over the interval "
131  << minQGSP/GeV << " to " << maxFTFP/GeV << " GeV. " << G4endl;
132  G4cout << " -- quasiElastic was asked to be " << QuasiElastic << G4endl
133  << " Changed to " << quasiElasQGS << " for QGS "
134  << " and to " << quasiElasFTF << " (must be false) for FTF" << G4endl;
135 
136  tpdata->theNeutrons=new G4NeutronBuilder;
137  tpdata->theNeutrons->RegisterMe(tpdata->theQGSPNeutron=new G4QGSPNeutronBuilder(quasiElasQGS));
138  tpdata->theQGSPNeutron->SetMinEnergy(minQGSP);
139  tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(quasiElasFTF));
140  tpdata->theFTFPNeutron->SetMinEnergy(minFTFP); // was (9.5*GeV);
141  tpdata->theFTFPNeutron->SetMaxEnergy(maxFTFP); // was (25*GeV);
142 
143  tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron=new G4BertiniNeutronBuilder);
144  tpdata->theBertiniNeutron->SetMinEnergy(0.0*GeV);
145  tpdata->theBertiniNeutron->SetMaxEnergy(maxBERT); // was (9.9*GeV);
146 
147  tpdata->thePro=new G4ProtonBuilder;
148  tpdata->thePro->RegisterMe(tpdata->theQGSPPro=new G4QGSPProtonBuilder(quasiElasQGS));
149  tpdata->theQGSPPro->SetMinEnergy(minQGSP);
150  tpdata->thePro->RegisterMe(tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasFTF));
151  tpdata->theFTFPPro->SetMinEnergy(minFTFP); // was (9.5*GeV);
152  tpdata->theFTFPPro->SetMaxEnergy(maxFTFP); // was (25*GeV);
153  tpdata->thePro->RegisterMe(tpdata->theBertiniPro=new G4BertiniProtonBuilder);
154  tpdata->theBertiniPro->SetMaxEnergy(maxBERT); // was (9.9*GeV);
155 
156  tpdata->thePiK=new G4PiKBuilder;
157  tpdata->thePiK->RegisterMe(tpdata->theQGSPPiK=new G4QGSPPiKBuilder(quasiElasQGS));
158  tpdata->theQGSPPiK->SetMinEnergy(minQGSP);
159  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasFTF));
160  tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP); // was (25*GeV);
161  tpdata->theFTFPPiK->SetMinEnergy(minFTFP); // was (9.5*GeV);
162  tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
163  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT); // was (9.9*GeV);
164 
165  // Hyperons use FTF
166  tpdata->theHyperon=new G4HyperonFTFPBuilder;
167 
168  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
169  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasFTF));
170 }
171 
173 {
174  delete tpdata->theQGSPNeutron;
175  delete tpdata->theFTFPNeutron;
176  delete tpdata->theBertiniNeutron;
177  delete tpdata->theNeutrons;
178 
179  delete tpdata->theQGSPPro;
180  delete tpdata->theFTFPPro;
181  delete tpdata->thePro;
182  delete tpdata->theBertiniPro;
183 
184  delete tpdata->theQGSPPiK;
185  delete tpdata->theFTFPPiK;
186  delete tpdata->theBertiniPiK;
187  delete tpdata->thePiK;
188 
189  delete tpdata->theHyperon;
190  delete tpdata->theAntiBaryon;
191  delete tpdata->theFTFPAntiBaryon;
192 
193  delete tpdata->xsNeutronInelasticXS;
194  delete tpdata->xsNeutronCaptureXS;
195 
196  delete tpdata; tpdata = 0;
197 }
198 
200 {
201  G4MesonConstructor pMesonConstructor;
202  pMesonConstructor.ConstructParticle();
203 
204  G4BaryonConstructor pBaryonConstructor;
205  pBaryonConstructor.ConstructParticle();
206 
207  G4ShortLivedConstructor pShortLivedConstructor;
208  pShortLivedConstructor.ConstructParticle();
209 
210  G4IonConstructor pIonConstructor;
211  pIonConstructor.ConstructParticle();
212 }
213 
214 #include "G4ProcessManager.hh"
216 {
217  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
218  CreateModels();
219  tpdata->theNeutrons->Build();
220  tpdata->thePro->Build();
221  tpdata->thePiK->Build();
222  tpdata->theHyperon->Build();
223  tpdata->theAntiBaryon->Build();
224 
225  // --- Neutrons ---
226  tpdata->xsNeutronInelasticXS = new G4NeutronInelasticXS();
227  G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
228 
229  G4HadronicProcess* capture = 0;
231  G4ProcessVector* pv = pmanager->GetProcessList();
232  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
233  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
234  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
235  }
236  }
237  if ( ! capture ) {
238  capture = new G4HadronCaptureProcess("nCapture");
239  pmanager->AddDiscreteProcess(capture);
240  }
241  tpdata->xsNeutronCaptureXS = new G4NeutronCaptureXS();
242  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
243  capture->RegisterMe(new G4NeutronRadCapture());
244 }
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_FTFP_BERT)
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
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)
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4int size() const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4ProcessVector * GetProcessList() const