Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4HadronPhysicsINCLXX.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: G4HadronPhysicsINCLXX.cc 66892 2013-01-17 10:57:59Z gunter $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName: G4HadronPhysicsINCLXX
31 //
32 // Author: 2011 P. Kaitaniemi
33 //
34 // Modified:
35 // 22.05.2014 D. Mancusi: Extend INCL++ to 20 GeV
36 // 19.03.2013 A.Ribon: Replace LEP with FTFP and BERT
37 // 08.03.2013 D. Mancusi: Fix a problem with overlapping model ranges
38 // 01.03.2013 D. Mancusi: Rename to G4HadronPhysicsINCLXX and introduce
39 // parameters for FTFP and NeutronHP
40 // 31.10.2012 A.Ribon: Use G4MiscBuilder
41 // 23.03.2012 D. Mancusi: Extended INCL++ to incident heavy ions up to 16O
42 // 27.11.2011 P.Kaitaniemi: Created physics list for INCL++ using QGSP_INCL_ABLA as a template
43 //
44 //----------------------------------------------------------------------------
45 //
46 #include <iomanip>
47 
48 #include "G4HadronPhysicsINCLXX.hh"
49 
50 #include "globals.hh"
51 #include "G4ios.hh"
52 #include "G4SystemOfUnits.hh"
53 #include "G4ParticleDefinition.hh"
54 #include "G4ParticleTable.hh"
55 
56 #include "G4MesonConstructor.hh"
57 #include "G4BaryonConstructor.hh"
59 #include "G4IonConstructor.hh"
60 
64 #include "G4NeutronRadCapture.hh"
65 #include "G4NeutronCaptureXS.hh"
67 #include "G4LFission.hh"
68 
70 
71 #include "G4PhysListUtil.hh"
72 
73 // factory
75 //
77 
78 G4ThreadLocal G4HadronPhysicsINCLXX::ThreadPrivate*
79 G4HadronPhysicsINCLXX::tpdata = 0;
80 
82  : G4VPhysicsConstructor("hInelastic INCLXX")
83  , QuasiElastic(true)
84  , withNeutronHP(false)
85  , withFTFP(false)
86 {
87 }
88 
89 G4HadronPhysicsINCLXX::G4HadronPhysicsINCLXX(const G4String& name, const G4bool quasiElastic, const G4bool neutronHP, const G4bool ftfp)
90  : G4VPhysicsConstructor(name)
91  , QuasiElastic(quasiElastic)
92  , withNeutronHP(neutronHP)
93  , withFTFP(ftfp)
94 {
95 }
96 
97 void G4HadronPhysicsINCLXX::CreateModels()
98 {
99  G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
100  G4bool quasiElasticQGS= true; // For QGS, it must use it.
101 
102 // initialise fields in tpdata where assignment is optional below.
103  tpdata->theNeutronHP=0;
104  tpdata->theQGSPNeutron=0;
105  tpdata->theQGSPPro=0;
106  tpdata->theQGSPPion=0;
107  tpdata->theQGSPKaon=0;
108  tpdata->theFTFPNeutron=0;
109  tpdata->theFTFPPro=0;
110  tpdata->theFTFPPion=0;
111  tpdata->theFTFPKaon=0;
112 
113  tpdata->theNeutrons=new G4NeutronBuilder( withNeutronHP );
114  if(withFTFP) {
115  tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(quasiElasticFTF));
116  tpdata->theFTFPNeutron->SetMinEnergy(15.*GeV);
117  } else {
118  tpdata->theNeutrons->RegisterMe(tpdata->theQGSPNeutron=new G4QGSPNeutronBuilder(quasiElasticQGS));
119  tpdata->theQGSPNeutron->SetMinEnergy(15.*GeV);
120  }
121  tpdata->theNeutrons->RegisterMe(tpdata->theINCLXXNeutron=new G4INCLXXNeutronBuilder);
122  tpdata->theINCLXXNeutron->SetMaxEnergy(20.0*GeV);
123  if(withNeutronHP) {
124  tpdata->theINCLXXNeutron->UsePreCompound(false);
125  tpdata->theINCLXXNeutron->SetMinEnergy(19.9*MeV);
126  tpdata->theNeutrons->RegisterMe(tpdata->theNeutronHP=new G4NeutronPHPBuilder);
127  } else {
128  tpdata->theINCLXXNeutron->UsePreCompound(true);
129  tpdata->theINCLXXNeutron->SetMinPreCompoundEnergy(0.0*MeV);
130  tpdata->theINCLXXNeutron->SetMaxPreCompoundEnergy(2.0*MeV);
131  tpdata->theINCLXXNeutron->SetMinEnergy(1.0*MeV);
132  }
133 
134  tpdata->thePro=new G4ProtonBuilder;
135  if(withFTFP) {
136  tpdata->thePro->RegisterMe(tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasticFTF));
137  tpdata->theFTFPPro->SetMinEnergy(15.*GeV);
138  } else {
139  tpdata->thePro->RegisterMe(tpdata->theQGSPPro=new G4QGSPProtonBuilder(quasiElasticQGS));
140  tpdata->theQGSPPro->SetMinEnergy(15.*GeV);
141  }
142  tpdata->thePro->RegisterMe(tpdata->theINCLXXPro=new G4INCLXXProtonBuilder);
143  tpdata->theINCLXXPro->SetMinEnergy(1.0*MeV);
144  tpdata->theINCLXXPro->SetMaxEnergy(20.0*GeV);
145 
146  tpdata->thePion=new G4PionBuilder;
147  if(withFTFP) {
148  tpdata->thePion->RegisterMe(tpdata->theFTFPPion=new G4FTFPPionBuilder(quasiElasticFTF));
149  tpdata->theFTFPPion->SetMinEnergy(15.*GeV);
150  } else {
151  tpdata->thePion->RegisterMe(tpdata->theQGSPPion=new G4QGSPPionBuilder(quasiElasticQGS));
152  tpdata->theQGSPPion->SetMinEnergy(15.*GeV);
153  }
154  tpdata->thePion->RegisterMe(tpdata->theINCLXXPion=new G4INCLXXPionBuilder);
155  tpdata->theINCLXXPion->SetMinEnergy(0.0*GeV);
156  tpdata->theINCLXXPion->SetMaxEnergy(20.0*GeV);
157 
158  tpdata->theKaon=new G4KaonBuilder;
159  if(withFTFP) {
160  tpdata->theKaon->RegisterMe(tpdata->theFTFPKaon=new G4FTFPKaonBuilder(quasiElasticFTF));
161  tpdata->theFTFPKaon->SetMinEnergy(14.*GeV);
162  } else {
163  tpdata->theKaon->RegisterMe(tpdata->theQGSPKaon=new G4QGSPKaonBuilder(quasiElasticQGS));
164  tpdata->theQGSPKaon->SetMinEnergy(14.*GeV);
165  }
166  tpdata->theKaon->RegisterMe(tpdata->theBertiniKaon=new G4BertiniKaonBuilder);
167  tpdata->theBertiniKaon->SetMinEnergy(0.0*GeV);
168  tpdata->theBertiniKaon->SetMaxEnergy(15.0*GeV);
169 
170  tpdata->theHyperon=new G4HyperonFTFPBuilder;
171 
172  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
173  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasticFTF));
174 }
175 
177 {
178  if(tpdata) {
179  delete tpdata->theFTFPNeutron;
180  delete tpdata->theQGSPNeutron;
181  delete tpdata->theINCLXXNeutron;
182  delete tpdata->theNeutronHP;
183  delete tpdata->theFTFPPro;
184  delete tpdata->theQGSPPro;
185  delete tpdata->thePro;
186  delete tpdata->theINCLXXPro;
187  delete tpdata->theFTFPPion;
188  delete tpdata->theQGSPPion;
189  delete tpdata->theFTFPKaon;
190  delete tpdata->theQGSPKaon;
191  delete tpdata->theINCLXXPion;
192  delete tpdata->thePion;
193  delete tpdata->theKaon;
194  delete tpdata->theHyperon;
195  delete tpdata->theAntiBaryon;
196  delete tpdata->theFTFPAntiBaryon;
197 
198  delete tpdata; tpdata = 0;
199  }
200 }
201 
203 {
204  G4MesonConstructor pMesonConstructor;
205  pMesonConstructor.ConstructParticle();
206 
207  G4BaryonConstructor pBaryonConstructor;
208  pBaryonConstructor.ConstructParticle();
209 
210  G4ShortLivedConstructor pShortLivedConstructor;
211  pShortLivedConstructor.ConstructParticle();
212 
213  G4IonConstructor pIonConstructor;
214  pIonConstructor.ConstructParticle();
215 }
216 
217 #include "G4ProcessManager.hh"
219 {
220  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
221  CreateModels();
222  tpdata->theNeutrons->Build();
223  tpdata->thePro->Build();
224  tpdata->thePion->Build();
225  tpdata->theKaon->Build();
226 
227  // --- Kaons ---
228  tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
229  G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
234 
235  tpdata->theHyperon->Build();
236  tpdata->theAntiBaryon->Build();
237 
238  // --- Neutrons ---
239  G4HadronicProcess* capture = 0;
240  G4HadronicProcess* fission = 0;
242  G4ProcessVector* pv = pmanager->GetProcessList();
243  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
244  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
245  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
246  } else if ( fFission == ((*pv)[i])->GetProcessSubType() ) {
247  fission = static_cast<G4HadronicProcess*>((*pv)[i]);
248  }
249  }
250  if ( ! capture ) {
251  capture = new G4HadronCaptureProcess("nCapture");
252  pmanager->AddDiscreteProcess(capture);
253  }
255  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
256  G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
257  capture->RegisterMe( theNeutronRadCapture );
258  if ( withNeutronHP ) {
259  capture->AddDataSet( new G4ParticleHPCaptureData );
260  theNeutronRadCapture->SetMinEnergy( 19.9*MeV );
261  if ( ! fission ) {
262  fission = new G4HadronFissionProcess("nFission");
263  pmanager->AddDiscreteProcess(fission);
264  }
265  G4LFission* theNeutronLEPFission = new G4LFission();
266  theNeutronLEPFission->SetMinEnergy( 19.9*MeV );
267  fission->RegisterMe( theNeutronLEPFission );
268  }
269 }
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()
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)
void SetMinEnergy(G4double anEnergy)
static G4HadronicProcess * FindInelasticProcess(const G4ParticleDefinition *)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
static G4KaonZeroShort * KaonZeroShort()
G4HadronPhysicsINCLXX(G4int verbose=1)
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
static constexpr double MeV
Definition: G4SIunits.hh:214
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4ProcessVector * GetProcessList() const
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)