Geant4  10.02.p02
G4HadronPhysicsQGSP_BIC.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_BIC.cc 93617 2015-10-27 09:00:41Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName: G4HadronPhysicsQGSP_BIC
31 //
32 // Author: 2002 J.P. Wellisch
33 //
34 // Modified:
35 // 23.11.2005 G.Folger: migration to non static particles
36 // 08.06.2006 V.Ivanchenko: remove stopping
37 // 25.04.2007 G.Folger: Add code for quasielastic
38 // 31.10.2012 A.Ribon: Use G4MiscBuilder
39 // 19.03.2013 A.Ribon: Replace LEP with FTFP and BERT
40 //
41 //----------------------------------------------------------------------------
42 //
43 #include <iomanip>
44 
46 
47 #include "globals.hh"
48 #include "G4ios.hh"
49 #include "G4SystemOfUnits.hh"
50 #include "G4ParticleDefinition.hh"
51 #include "G4ParticleTable.hh"
52 
53 #include "G4MesonConstructor.hh"
54 #include "G4BaryonConstructor.hh"
56 #include "G4IonConstructor.hh"
57 
61 #include "G4NeutronRadCapture.hh"
62 #include "G4NeutronInelasticXS.hh"
63 #include "G4NeutronCaptureXS.hh"
64 
66 
67 #include "G4PhysListUtil.hh"
68 
69 // factory
71 //
73 
76 
78  : G4VPhysicsConstructor("hInelastic QGSP_BIC")
79 /* , theNeutrons(0)
80  , theFTFPNeutron(0)
81  , theQGSPNeutron(0)
82  , theBinaryNeutron(0)
83  , thePiK(0)
84  , theFTFPPiK(0)
85  , theQGSPPiK(0)
86  , theBertiniPiK(0)
87  , thePro(0)
88  , theFTFPPro(0)
89  , theQGSPPro(0)
90  , theBinaryPro(0)
91  , theHyperon(0)
92  , theAntiBaryon(0)
93  , theFTFPAntiBaryon(0)
94  , xsKaon(0)
95  , xsNeutronInelasticXS(0)
96  , xsNeutronCaptureXS(0)*/
97 // , QuasiElastic(true)
98 {}
99 
101  : G4VPhysicsConstructor(name)
102 /* , theNeutrons(0)
103  , theFTFPNeutron(0)
104  , theQGSPNeutron(0)
105  , theBinaryNeutron(0)
106  , thePiK(0)
107  , theFTFPPiK(0)
108  , theQGSPPiK(0)
109  , theBertiniPiK(0)
110  , thePro(0)
111  , theFTFPPro(0)
112  , theQGSPPro(0)
113  , theBinaryPro(0)
114  , theHyperon(0)
115  , theAntiBaryon(0)
116  , theFTFPAntiBaryon(0)
117  , xsKaon(0)
118  , xsNeutronInelasticXS(0)
119  , xsNeutronCaptureXS(0)*/
120 // , QuasiElastic(quasiElastic)
121 {}
122 
124 {
125  G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
126  G4bool quasiElasticQGS= true; // For QGS, it must use it.
127 
128  const G4double maxFTFP = 25.0*GeV;
129  const G4double minFTFP = 9.5*GeV;
130  const G4double maxBIC = 9.9*GeV;
131  const G4double maxBERT = 5.0*GeV;
132 
137  tpdata->theFTFPNeutron->SetMaxEnergy(maxFTFP);
138 
141 
143  tpdata->thePro->RegisterMe(tpdata->theQGSPPro=new G4QGSPProtonBuilder(quasiElasticQGS));
144  tpdata->thePro->RegisterMe(tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasticFTF));
145  tpdata->theFTFPPro->SetMinEnergy(minFTFP);
146  tpdata->theFTFPPro->SetMaxEnergy(maxFTFP);
147 
149  tpdata->theBinaryPro->SetMaxEnergy(maxBIC);
150 
152  tpdata->thePiK->RegisterMe(tpdata->theQGSPPiK=new G4QGSPPiKBuilder(quasiElasticQGS));
153  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasticFTF));
154  tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP);
156  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
157 
159 
162 }
163 
165 {
166  if (!tpdata) return;
167 
168  delete tpdata->theBinaryNeutron;
169  delete tpdata->theQGSPNeutron;
170  delete tpdata->theFTFPNeutron;
171  delete tpdata->theBertiniPiK;
172  delete tpdata->theQGSPPiK;
173  delete tpdata->theFTFPPiK;
174  delete tpdata->thePiK;
175  delete tpdata->theBinaryPro;
176  delete tpdata->theQGSPPro;
177  delete tpdata->theFTFPPro;
178  delete tpdata->thePro;
179  delete tpdata->theFTFPAntiBaryon;
180  delete tpdata->theAntiBaryon;
181  delete tpdata->theHyperon;
182  delete tpdata->xsNeutronCaptureXS;
183 
184  delete tpdata; tpdata =0 ;
185 }
186 
188 {
189  G4MesonConstructor pMesonConstructor;
190  pMesonConstructor.ConstructParticle();
191 
192  G4BaryonConstructor pBaryonConstructor;
193  pBaryonConstructor.ConstructParticle();
194 
195  G4ShortLivedConstructor pShortLivedConstructor;
196  pShortLivedConstructor.ConstructParticle();
197 
198  G4IonConstructor pIonConstructor;
199  pIonConstructor.ConstructParticle();
200 }
201 
202 #include "G4ProcessManager.hh"
204 {
205  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
206  CreateModels();
208  tpdata->thePro->Build();
209  tpdata->thePiK->Build();
210 
211  // --- Kaons ---
218 
219  tpdata->theHyperon->Build();
221 
222  // --- Neutrons ---
225 
226  G4HadronicProcess* capture = 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  }
233  }
234  if ( ! capture ) {
235  capture = new G4HadronCaptureProcess("nCapture");
236  pmanager->AddDiscreteProcess(capture);
237  }
240  capture->RegisterMe(new G4NeutronRadCapture());
241 }
242 
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=true)
G4String name
Definition: TRTMaterials.hh:40
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4KaonZeroLong * KaonZeroLong()
G4HadronPhysicsQGSP_BIC(G4int verbose=1)
void SetMinEnergy(G4double aM)
static const char * Default_Name()
static void ConstructParticle()
#define G4ThreadLocal
Definition: tls.hh:89
static void ConstructParticle()
G4ProcessManager * GetProcessManager() const
int G4int
Definition: G4Types.hh:78
static G4ThreadLocal ThreadPrivate * tpdata
static G4KaonMinus * KaonMinus()
Definition: G4KaonMinus.cc:113
void SetMaxEnergy(G4double aM)
static void ConstructParticle()
void RegisterMe(G4HadronicInteraction *a)
static G4HadronicProcess * FindInelasticProcess(const G4ParticleDefinition *)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
static G4KaonZeroShort * KaonZeroShort()
bool G4bool
Definition: G4Types.hh:79
static G4CrossSectionDataSetRegistry * Instance()
void SetMaxEnergy(G4double aM)
static const double GeV
Definition: G4SIunits.hh:214
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BIC)
void SetMaxEnergy(G4double aM)
void SetMinEnergy(G4double aM)
G4int size() const
void SetMaxEnergy(G4double aM)
static const char * Default_Name()
void RegisterMe(G4VAntiBarionBuilder *aB)
void RegisterMe(G4VPiKBuilder *aB)
Definition: G4PiKBuilder.hh:58
void RegisterMe(G4VProtonBuilder *aB)
void RegisterMe(G4VNeutronBuilder *aB)
double G4double
Definition: G4Types.hh:76
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4ProcessVector * GetProcessList() const
void SetMaxEnergy(G4double aM)