Geant4  10.01.p02
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 
62 #include "G4NeutronRadCapture.hh"
63 #include "G4NeutronCaptureXS.hh"
65 #include "G4LFission.hh"
66 
68 // factory
70 //
72 
75 
77  : G4VPhysicsConstructor("hInelastic INCLXX")
78  , QuasiElastic(true)
79  , withNeutronHP(false)
80  , withFTFP(false)
81 {
82 }
83 
84 G4HadronPhysicsINCLXX::G4HadronPhysicsINCLXX(const G4String& name, const G4bool quasiElastic, const G4bool neutronHP, const G4bool ftfp)
85  : G4VPhysicsConstructor(name)
86  , QuasiElastic(quasiElastic)
87  , withNeutronHP(neutronHP)
88  , withFTFP(ftfp)
89 {
90 }
91 
93 {
94  G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
95  G4bool quasiElasticQGS= true; // For QGS, it must use it.
96 
97 // initialise fields in tpdata where assignment is optional below.
100  tpdata->theQGSPPro=0;
101  tpdata->theQGSPPion=0;
102  tpdata->theQGSPKaon=0;
104  tpdata->theFTFPPro=0;
105  tpdata->theFTFPPion=0;
106  tpdata->theFTFPKaon=0;
107 
109  if(withFTFP) {
112  } else {
115  }
118  if(withNeutronHP) {
122  } else {
127  }
128 
130  if(withFTFP) {
131  tpdata->thePro->RegisterMe(tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasticFTF));
133  } else {
134  tpdata->thePro->RegisterMe(tpdata->theQGSPPro=new G4QGSPProtonBuilder(quasiElasticQGS));
136  }
140 
142  if(withFTFP) {
143  tpdata->thePion->RegisterMe(tpdata->theFTFPPion=new G4FTFPPionBuilder(quasiElasticFTF));
145  } else {
146  tpdata->thePion->RegisterMe(tpdata->theQGSPPion=new G4QGSPPionBuilder(quasiElasticQGS));
148  }
152 
154  if(withFTFP) {
155  tpdata->theKaon->RegisterMe(tpdata->theFTFPKaon=new G4FTFPKaonBuilder(quasiElasticFTF));
157  } else {
158  tpdata->theKaon->RegisterMe(tpdata->theQGSPKaon=new G4QGSPKaonBuilder(quasiElasticQGS));
160  }
164 
166 
169 }
170 
172 {
173  if(tpdata) {
174  delete tpdata->theFTFPNeutron;
175  delete tpdata->theQGSPNeutron;
176  delete tpdata->theINCLXXNeutron;
177  delete tpdata->theNeutronHP;
178  delete tpdata->theFTFPPro;
179  delete tpdata->theQGSPPro;
180  delete tpdata->thePro;
181  delete tpdata->theINCLXXPro;
182  delete tpdata->theFTFPPion;
183  delete tpdata->theQGSPPion;
184  delete tpdata->theFTFPKaon;
185  delete tpdata->theQGSPKaon;
186  delete tpdata->theINCLXXPion;
187  delete tpdata->thePion;
188  delete tpdata->theKaon;
189  delete tpdata->theHyperon;
190  delete tpdata->theAntiBaryon;
191  delete tpdata->theFTFPAntiBaryon;
192 
193  delete tpdata; tpdata = 0;
194  }
195 }
196 
198 {
199  G4MesonConstructor pMesonConstructor;
200  pMesonConstructor.ConstructParticle();
201 
202  G4BaryonConstructor pBaryonConstructor;
203  pBaryonConstructor.ConstructParticle();
204 
205  G4ShortLivedConstructor pShortLivedConstructor;
206  pShortLivedConstructor.ConstructParticle();
207 
208  G4IonConstructor pIonConstructor;
209  pIonConstructor.ConstructParticle();
210 }
211 
212 #include "G4ProcessManager.hh"
214 {
215  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
216  CreateModels();
218  tpdata->thePro->Build();
219  tpdata->thePion->Build();
220  tpdata->theKaon->Build();
221  tpdata->theHyperon->Build();
223 
224  // --- Neutrons ---
225  G4HadronicProcess* capture = 0;
226  G4HadronicProcess* fission = 0;
228  G4ProcessVector* pv = pmanager->GetProcessList();
229  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
230  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
231  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
232  } else if ( fFission == ((*pv)[i])->GetProcessSubType() ) {
233  fission = static_cast<G4HadronicProcess*>((*pv)[i]);
234  }
235  }
236  if ( ! capture ) {
237  capture = new G4HadronCaptureProcess("nCapture");
238  pmanager->AddDiscreteProcess(capture);
239  }
242  G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
243  capture->RegisterMe( theNeutronRadCapture );
244  if ( withNeutronHP ) {
245  capture->AddDataSet( new G4NeutronHPCaptureData );
246  theNeutronRadCapture->SetMinEnergy( 19.9*MeV );
247  if ( ! fission ) {
248  fission = new G4HadronFissionProcess("nFission");
249  pmanager->AddDiscreteProcess(fission);
250  }
251  G4LFission* theNeutronLEPFission = new G4LFission();
252  theNeutronLEPFission->SetMinEnergy( 19.9*MeV );
253  fission->RegisterMe( theNeutronLEPFission );
254  }
255 }
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=true)
void SetMinEnergy(G4double aM)
void SetMaxEnergy(G4double aM)
static const double MeV
Definition: G4SIunits.hh:193
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsINCLXX)
void RegisterMe(G4VPionBuilder *aB)
G4String name
Definition: TRTMaterials.hh:40
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
void UsePreCompound(const G4bool w)
void SetMinEnergy(G4double aM)
Builder for proton processes using the INCL++ intra-nuclear cascade model.
Build hadronic physics using INCL++, high-energy models (QGSP or FTFP) and possibly NeutronHP...
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 void ConstructParticle()
void RegisterMe(G4HadronicInteraction *a)
void SetMinEnergy(G4double aM)
Builder for pion processes using the INCL++ intra-nuclear cascade model.
void SetMinEnergy(G4double anEnergy)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
void SetMinEnergy(G4double aM)
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:196
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)
void SetMinEnergy(G4double aM)
Set the minimum energy limit for the model.
void SetMaxPreCompoundEnergy(G4double aM)
void SetMinEnergy(G4double aM)
G4ProcessVector * GetProcessList() const
void SetMinEnergy(G4double aM)
Builder for neutron processes using the INCL++ intra-nuclear cascade model.