Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 93617 2015-10-27 09:00:41Z 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 
55 #include "G4NeutronRadCapture.hh"
56 #include "G4NeutronInelasticXS.hh"
57 #include "G4NeutronCaptureXS.hh"
58 
60 
61 #include "G4PhysListUtil.hh"
62 
63 // factory
65 //
67 
68 G4ThreadLocal G4HadronPhysicsQGSP_FTFP_BERT::ThreadPrivate*
69 G4HadronPhysicsQGSP_FTFP_BERT::tpdata = 0;
70 
72  : G4VPhysicsConstructor("hInelastic QGSP_FTFP_BERT")
73 /* , theNeutrons(0)
74  , theFTFPNeutron(0)
75  , theQGSPNeutron(0)
76  , theBertiniNeutron(0)
77  , thePiK(0)
78  , theFTFPPiK(0)
79  , theQGSPPiK(0)
80  , theBertiniPiK(0)
81  , thePro(0)
82  , theFTFPPro(0)
83  , theQGSPPro(0)
84  , theBertiniPro(0)
85  , theHyperon(0)
86  , theAntiBaryon(0)
87  , theFTFPAntiBaryon(0)
88  , xsKaon(0)
89  , xsNeutronInelasticXS(0)
90  , xsNeutronCaptureXS(0)*/
91  , QuasiElastic(true)
92 {
93 }
94 
96  G4bool quasiElastic)
97  : G4VPhysicsConstructor("hInelastic QGSP_FTFP_BERT")
98 /* , theNeutrons(0)
99  , theFTFPNeutron(0)
100  , theQGSPNeutron(0)
101  , theBertiniNeutron(0)
102  , thePiK(0)
103  , theFTFPPiK(0)
104  , theQGSPPiK(0)
105  , theBertiniPiK(0)
106  , thePro(0)
107  , theFTFPPro(0)
108  , theQGSPPro(0)
109  , theBertiniPro(0)
110  , theHyperon(0)
111  , theAntiBaryon(0)
112  , theFTFPAntiBaryon(0)
113  , xsKaon(0)
114  , xsNeutronInelasticXS(0)
115  , xsNeutronCaptureXS(0)*/
116  , QuasiElastic(quasiElastic)
117 {
118 }
119 
120 void G4HadronPhysicsQGSP_FTFP_BERT::CreateModels()
121 {
122  // First transition, between BERT and FTF/P
123  G4double minFTFP= 6.0 * GeV; // Was 9.5 for LEP (in FTFP_BERT 6.0 * GeV);
124  G4double maxBERT= 8.0 * GeV; // Was 9.9 for LEP (in FTFP_BERT 8.0 * GeV);
125  // Second transition, between FTF/P and QGS/P
126  G4double minQGSP= 12.0 * GeV;
127  G4double maxFTFP= 25.0 * GeV;
128 
129  G4bool quasiElasFTF= false; // Use built-in quasi-elastic (not add-on)
130  G4bool quasiElasQGS= true; // For QGS, it must use it.
131 
132  G4cout << " New QGSP_FTFP_BERT physics list, replaces LEP with FTF/P for p/n/pi (/K?)";
133  G4cout << " Thresholds: " << G4endl;
134  G4cout << " 1) between BERT and FTF/P over the interval "
135  << minFTFP/GeV << " to " << maxBERT/GeV << " GeV. " << G4endl;
136  G4cout << " 2) between FTF/P and QGS/P over the interval "
137  << minQGSP/GeV << " to " << maxFTFP/GeV << " GeV. " << G4endl;
138  G4cout << " -- quasiElastic was asked to be " << QuasiElastic << G4endl
139  << " Changed to " << quasiElasQGS << " for QGS "
140  << " and to " << quasiElasFTF << " (must be false) for FTF" << G4endl;
141 
142  tpdata->theNeutrons=new G4NeutronBuilder;
143  tpdata->theNeutrons->RegisterMe(tpdata->theQGSPNeutron=new G4QGSPNeutronBuilder(quasiElasQGS));
144  tpdata->theQGSPNeutron->SetMinEnergy(minQGSP);
145  tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(quasiElasFTF));
146  tpdata->theFTFPNeutron->SetMinEnergy(minFTFP); // was (9.5*GeV);
147  tpdata->theFTFPNeutron->SetMaxEnergy(maxFTFP); // was (25*GeV);
148 
149  tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron=new G4BertiniNeutronBuilder);
150  tpdata->theBertiniNeutron->SetMinEnergy(0.0*GeV);
151  tpdata->theBertiniNeutron->SetMaxEnergy(maxBERT); // was (9.9*GeV);
152 
153  tpdata->thePro=new G4ProtonBuilder;
154  tpdata->thePro->RegisterMe(tpdata->theQGSPPro=new G4QGSPProtonBuilder(quasiElasQGS));
155  tpdata->theQGSPPro->SetMinEnergy(minQGSP);
156  tpdata->thePro->RegisterMe(tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasFTF));
157  tpdata->theFTFPPro->SetMinEnergy(minFTFP); // was (9.5*GeV);
158  tpdata->theFTFPPro->SetMaxEnergy(maxFTFP); // was (25*GeV);
159  tpdata->thePro->RegisterMe(tpdata->theBertiniPro=new G4BertiniProtonBuilder);
160  tpdata->theBertiniPro->SetMaxEnergy(maxBERT); // was (9.9*GeV);
161 
162  tpdata->thePiK=new G4PiKBuilder;
163  tpdata->thePiK->RegisterMe(tpdata->theQGSPPiK=new G4QGSPPiKBuilder(quasiElasQGS));
164  tpdata->theQGSPPiK->SetMinEnergy(minQGSP);
165  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasFTF));
166  tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP); // was (25*GeV);
167  tpdata->theFTFPPiK->SetMinEnergy(minFTFP); // was (9.5*GeV);
168  tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
169  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT); // was (9.9*GeV);
170 
171  // Hyperons use FTF
172  tpdata->theHyperon=new G4HyperonFTFPBuilder;
173 
174  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
175  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasFTF));
176 }
177 
179 {
180  if (!tpdata) return;
181 
182  delete tpdata->theQGSPNeutron;
183  delete tpdata->theFTFPNeutron;
184  delete tpdata->theBertiniNeutron;
185  delete tpdata->theNeutrons;
186 
187  delete tpdata->theQGSPPro;
188  delete tpdata->theFTFPPro;
189  delete tpdata->thePro;
190  delete tpdata->theBertiniPro;
191 
192  delete tpdata->theQGSPPiK;
193  delete tpdata->theFTFPPiK;
194  delete tpdata->theBertiniPiK;
195  delete tpdata->thePiK;
196 
197  delete tpdata->theHyperon;
198  delete tpdata->theAntiBaryon;
199  delete tpdata->theFTFPAntiBaryon;
200 
201  delete tpdata; tpdata = 0;
202 }
203 
205 {
206  G4MesonConstructor pMesonConstructor;
207  pMesonConstructor.ConstructParticle();
208 
209  G4BaryonConstructor pBaryonConstructor;
210  pBaryonConstructor.ConstructParticle();
211 
212  G4ShortLivedConstructor pShortLivedConstructor;
213  pShortLivedConstructor.ConstructParticle();
214 
215  G4IonConstructor pIonConstructor;
216  pIonConstructor.ConstructParticle();
217 }
218 
219 #include "G4ProcessManager.hh"
221 {
222  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
223  CreateModels();
224  tpdata->theNeutrons->Build();
225  tpdata->thePro->Build();
226  tpdata->thePiK->Build();
227 
228  // --- Kaons ---
229  tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
230  G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
235 
236  tpdata->theHyperon->Build();
237  tpdata->theAntiBaryon->Build();
238 
239  // --- Neutrons ---
241  G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
242 
243  G4HadronicProcess* capture = 0;
245  G4ProcessVector* pv = pmanager->GetProcessList();
246  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
247  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
248  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
249  }
250  }
251  if ( ! capture ) {
252  capture = new G4HadronCaptureProcess("nCapture");
253  pmanager->AddDiscreteProcess(capture);
254  }
256  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
257  capture->RegisterMe(new G4NeutronRadCapture());
258 }
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=true)
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4KaonZeroLong * KaonZeroLong()
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)
G4GLOB_DLL std::ostream G4cout
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
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4ProcessVector * GetProcessList() const
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)