Geant4  10.02
G4HadronPhysicsQGSP_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_BERT.cc 93617 2015-10-27 09:00:41Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName: G4HadronPhysicsQGSP_BERT
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 // 20.06.2006 G.Folger: Bertini applies to Kaons, i.e. use SetMinEnergy instead of SetMinPionEnergy
38 // 25.04.2007 G.Folger: Add code for quasielastic
39 // 10.12.2007 G.Folger: Add projectilediffrative option for proton/neutron, off by default
40 // 31.10.2012 A.Ribon: Use G4MiscBuilder
41 // 19.03.2013 A.Ribon: Replace LEP with FTFP
42 //
43 //----------------------------------------------------------------------------
44 //
45 #include <iomanip>
46 
48 
49 #include "globals.hh"
50 #include "G4ios.hh"
51 #include "G4SystemOfUnits.hh"
52 #include "G4ParticleDefinition.hh"
53 #include "G4ParticleTable.hh"
54 
55 #include "G4MesonConstructor.hh"
56 #include "G4BaryonConstructor.hh"
58 #include "G4IonConstructor.hh"
59 
62 #include "G4NeutronRadCapture.hh"
63 #include "G4NeutronInelasticXS.hh"
64 #include "G4NeutronCaptureXS.hh"
67 
68 #include "G4PhysListUtil.hh"
69 
70 // factory
72 //
74 
77 
78 
80  : G4VPhysicsConstructor("hInelastic QGSP_BERT")
81 /* , theNeutrons(0)
82  , theFTFPNeutron(0)
83  , theQGSPNeutron(0)
84  , theBertiniNeutron(0)
85  , thePiK(0)
86  , theFTFPPiK(0)
87  , theQGSPPiK(0)
88  , theBertiniPiK(0)
89  , thePro(0)
90  , theFTFPPro(0)
91  , theQGSPPro(0)
92  , theBertiniPro(0)
93  , theHyperon(0)
94  , theAntiBaryon(0)
95  , theFTFPAntiBaryon(0)
96  , xsKaon(0)
97  , xsNeutronInelasticXS(0)
98  , xsNeutronCaptureXS(0)*/
99  , QuasiElastic(true)
100 {
101 }
102 
104  : G4VPhysicsConstructor(name)
105 /* , theNeutrons(0)
106  , theFTFPNeutron(0)
107  , theQGSPNeutron(0)
108  , theBertiniNeutron(0)
109  , thePiK(0)
110  , theFTFPPiK(0)
111  , theQGSPPiK(0)
112  , theBertiniPiK(0)
113  , thePro(0)
114  , theFTFPPro(0)
115  , theQGSPPro(0)
116  , theBertiniPro(0)
117  , theHyperon(0)
118  , theAntiBaryon(0)
119  , theFTFPAntiBaryon(0)
120  , xsKaon(0)
121  , xsNeutronInelasticXS(0)
122  , xsNeutronCaptureXS(0)*/
123  , QuasiElastic(quasiElastic)
124 {
125 }
126 
128 {
129  G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
130  G4bool quasiElasticQGS= true; // For QGS, it must use it.
131 
132  const G4double minQGSP = 12.0*GeV;
133  const G4double maxFTFP = 25.0*GeV;
134  const G4double minFTFP = 9.5*GeV;
135  const G4double maxBERT = 9.9*GeV;
136  const G4double minBERT = 0.0*GeV;
137 
140  tpdata->theQGSPNeutron->SetMinEnergy(minQGSP);
143  tpdata->theFTFPNeutron->SetMaxEnergy(maxFTFP);
144 
148 
150  tpdata->thePro->RegisterMe(tpdata->theQGSPPro=new G4QGSPProtonBuilder(quasiElasticQGS));
151  tpdata->theQGSPPro->SetMinEnergy(minQGSP);
152  tpdata->thePro->RegisterMe(tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasticFTF));
153  tpdata->theFTFPPro->SetMinEnergy(minFTFP);
154  tpdata->theFTFPPro->SetMaxEnergy(maxFTFP);
156  tpdata->theBertiniPro->SetMaxEnergy(maxBERT);
157 
159  tpdata->thePiK->RegisterMe(tpdata->theQGSPPiK=new G4QGSPPiKBuilder(quasiElasticQGS));
160  tpdata->theQGSPPiK->SetMinEnergy(minQGSP);
161  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasticFTF));
162  tpdata->theFTFPPiK->SetMinEnergy(minFTFP);
163  tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP);
165  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
166 
168 
171 }
172 
174 {
175  if (!tpdata) return;
176 
177  delete tpdata->theBertiniNeutron;
178  delete tpdata->theQGSPNeutron;
179  delete tpdata->theFTFPNeutron;
180  delete tpdata->theNeutrons;
181  delete tpdata->theBertiniPiK;
182  delete tpdata->theQGSPPiK;
183  delete tpdata->theFTFPPiK;
184  delete tpdata->thePiK;
185  delete tpdata->theBertiniPro;
186  delete tpdata->theQGSPPro;
187  delete tpdata->theFTFPPro;
188  delete tpdata->thePro;
189  delete tpdata->theFTFPAntiBaryon;
190  delete tpdata->theAntiBaryon;
191  delete tpdata->theHyperon;
192 
193  delete tpdata; tpdata = 0;
194 }
195 
197 {
198  G4MesonConstructor pMesonConstructor;
199  pMesonConstructor.ConstructParticle();
200 
201  G4BaryonConstructor pBaryonConstructor;
202  pBaryonConstructor.ConstructParticle();
203 
204  G4ShortLivedConstructor pShortLivedConstructor;
205  pShortLivedConstructor.ConstructParticle();
206 
207  G4IonConstructor pIonConstructor;
208  pIonConstructor.ConstructParticle();
209 }
210 
211 #include "G4ProcessManager.hh"
213 {
214  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
215  CreateModels();
217  tpdata->thePro->Build();
218  tpdata->thePiK->Build();
219 
220  // --- Kaons ---
227 
228  tpdata->theHyperon->Build();
230 
231  // --- Neutrons ---
234 
235  G4HadronicProcess* capture = 0;
237  G4ProcessVector* pv = pmanager->GetProcessList();
238  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
239  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
240  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
241  }
242  }
243  if ( ! capture ) {
244  capture = new G4HadronCaptureProcess("nCapture");
245  pmanager->AddDiscreteProcess(capture);
246  }
249  capture->RegisterMe(new G4NeutronRadCapture());
250 }
251 
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=true)
G4String name
Definition: TRTMaterials.hh:40
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4KaonZeroLong * KaonZeroLong()
void SetMinEnergy(G4double aM)
static const char * Default_Name()
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BERT)
static void ConstructParticle()
#define G4ThreadLocal
Definition: tls.hh:89
static void ConstructParticle()
G4ProcessManager * GetProcessManager() const
int G4int
Definition: G4Types.hh:78
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)
void SetMinEnergy(G4double aM)
static G4KaonZeroShort * KaonZeroShort()
bool G4bool
Definition: G4Types.hh:79
static G4CrossSectionDataSetRegistry * Instance()
void SetMaxEnergy(G4double aM)
static const double GeV
Definition: G4SIunits.hh:214
void SetMinEnergy(G4double aM)
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
void SetMaxEnergy(G4double aM)
static G4ThreadLocal ThreadPrivate * tpdata
void SetMinEnergy(G4double aM)
G4int size() const
static const char * Default_Name()
void RegisterMe(G4VAntiBarionBuilder *aB)
void RegisterMe(G4VPiKBuilder *aB)
Definition: G4PiKBuilder.hh:58
void RegisterMe(G4VProtonBuilder *aB)
void SetMinEnergy(G4double aM)
void RegisterMe(G4VNeutronBuilder *aB)
double G4double
Definition: G4Types.hh:76
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4ProcessVector * GetProcessList() const
void SetMinEnergy(G4double aM)
void SetMaxEnergy(G4double aM)