Geant4  10.02
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 
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 
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;
105  tpdata->theQGSPPro=0;
106  tpdata->theQGSPPion=0;
107  tpdata->theQGSPKaon=0;
109  tpdata->theFTFPPro=0;
110  tpdata->theFTFPPion=0;
111  tpdata->theFTFPKaon=0;
112 
114  if(withFTFP) {
117  } else {
120  }
123  if(withNeutronHP) {
127  } else {
132  }
133 
135  if(withFTFP) {
136  tpdata->thePro->RegisterMe(tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasticFTF));
138  } else {
139  tpdata->thePro->RegisterMe(tpdata->theQGSPPro=new G4QGSPProtonBuilder(quasiElasticQGS));
141  }
145 
147  if(withFTFP) {
148  tpdata->thePion->RegisterMe(tpdata->theFTFPPion=new G4FTFPPionBuilder(quasiElasticFTF));
150  } else {
151  tpdata->thePion->RegisterMe(tpdata->theQGSPPion=new G4QGSPPionBuilder(quasiElasticQGS));
153  }
157 
159  if(withFTFP) {
160  tpdata->theKaon->RegisterMe(tpdata->theFTFPKaon=new G4FTFPKaonBuilder(quasiElasticFTF));
162  } else {
163  tpdata->theKaon->RegisterMe(tpdata->theQGSPKaon=new G4QGSPKaonBuilder(quasiElasticQGS));
165  }
169 
171 
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();
223  tpdata->thePro->Build();
224  tpdata->thePion->Build();
225  tpdata->theKaon->Build();
226 
227  // --- Kaons ---
234 
235  tpdata->theHyperon->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  }
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)
void SetMinEnergy(G4double aM)
void SetMaxEnergy(G4double aM)
static const double MeV
Definition: G4SIunits.hh:211
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsINCLXX)
void RegisterMe(G4VPionBuilder *aB)
G4String name
Definition: TRTMaterials.hh:40
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4KaonZeroLong * KaonZeroLong()
void UsePreCompound(const G4bool w)
void SetMinEnergy(G4double aM)
Builder for proton processes using the INCL++ intra-nuclear cascade model.
static void ConstructParticle()
void SetMinEnergy(G4double aM)
#define G4ThreadLocal
Definition: tls.hh:89
static void ConstructParticle()
G4ProcessManager * GetProcessManager() const
int G4int
Definition: G4Types.hh:78
void SetMaxEnergy(G4double aM)
Set the maximum energy limit for the model.
static G4KaonMinus * KaonMinus()
Definition: G4KaonMinus.cc:113
static void ConstructParticle()
void RegisterMe(G4HadronicInteraction *a)
void SetMinEnergy(G4double aM)
void SetMinEnergy(G4double anEnergy)
static G4HadronicProcess * FindInelasticProcess(const G4ParticleDefinition *)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
void SetMinEnergy(G4double aM)
static G4KaonZeroShort * KaonZeroShort()
G4HadronPhysicsINCLXX(G4int verbose=1)
bool G4bool
Definition: G4Types.hh:79
void SetMaxEnergy(G4double aM)
static G4CrossSectionDataSetRegistry * Instance()
void SetMinEnergy(G4double aM)
static const double GeV
Definition: G4SIunits.hh:214
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
static G4ThreadLocal ThreadPrivate * tpdata
void SetMinEnergy(G4double aM)
void SetMinPreCompoundEnergy(G4double aM)
G4int size() const
static const char * Default_Name()
void RegisterMe(G4VAntiBarionBuilder *aB)
void RegisterMe(G4VProtonBuilder *aB)
void SetMinEnergy(G4double aM)
void RegisterMe(G4VNeutronBuilder *aB)
void RegisterMe(G4VKaonBuilder *aB)
G4ComponentGGHadronNucleusXsc * xsKaon
void SetMinEnergy(G4double aM)
Set the minimum energy limit for the model.
void SetMaxPreCompoundEnergy(G4double aM)
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
void SetMinEnergy(G4double aM)
G4ProcessVector * GetProcessList() const
void SetMinEnergy(G4double aM)
Builder for neutron processes using the INCL++ intra-nuclear cascade model.