Geant4  10.01.p03
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 83699 2014-09-10 07:18:25Z 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 
61 #include "G4NeutronRadCapture.hh"
62 #include "G4NeutronInelasticXS.hh"
63 #include "G4NeutronCaptureXS.hh"
64 
65 #include "G4PhysListUtil.hh"
67 
68 // factory
70 //
72 
75 
76 
78  : G4VPhysicsConstructor("hInelastic QGSP_BERT")
79 /* , theNeutrons(0)
80  , theFTFPNeutron(0)
81  , theQGSPNeutron(0)
82  , theBertiniNeutron(0)
83  , thePiK(0)
84  , theFTFPPiK(0)
85  , theQGSPPiK(0)
86  , theBertiniPiK(0)
87  , thePro(0)
88  , theFTFPPro(0)
89  , theQGSPPro(0)
90  , theBertiniPro(0)
91  , theHyperon(0)
92  , theAntiBaryon(0)
93  , theFTFPAntiBaryon(0)
94  , xsNeutronInelasticXS(0)
95  , xsNeutronCaptureXS(0)*/
96  , QuasiElastic(true)
97 {
98 }
99 
101  : G4VPhysicsConstructor(name)
102 /* , theNeutrons(0)
103  , theFTFPNeutron(0)
104  , theQGSPNeutron(0)
105  , theBertiniNeutron(0)
106  , thePiK(0)
107  , theFTFPPiK(0)
108  , theQGSPPiK(0)
109  , theBertiniPiK(0)
110  , thePro(0)
111  , theFTFPPro(0)
112  , theQGSPPro(0)
113  , theBertiniPro(0)
114  , theHyperon(0)
115  , theAntiBaryon(0)
116  , theFTFPAntiBaryon(0)
117  , xsNeutronInelasticXS(0)
118  , xsNeutronCaptureXS(0)*/
119  , QuasiElastic(quasiElastic)
120 {
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 minQGSP = 12.0*GeV;
129  const G4double maxFTFP = 25.0*GeV;
130  const G4double minFTFP = 9.5*GeV;
131  const G4double maxBERT = 9.9*GeV;
132  const G4double minBERT = 0.0*GeV;
133 
136  tpdata->theQGSPNeutron->SetMinEnergy(minQGSP);
139  tpdata->theFTFPNeutron->SetMaxEnergy(maxFTFP);
140 
144 
146  tpdata->thePro->RegisterMe(tpdata->theQGSPPro=new G4QGSPProtonBuilder(quasiElasticQGS));
147  tpdata->theQGSPPro->SetMinEnergy(minQGSP);
148  tpdata->thePro->RegisterMe(tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasticFTF));
149  tpdata->theFTFPPro->SetMinEnergy(minFTFP);
150  tpdata->theFTFPPro->SetMaxEnergy(maxFTFP);
152  tpdata->theBertiniPro->SetMaxEnergy(maxBERT);
153 
155  tpdata->thePiK->RegisterMe(tpdata->theQGSPPiK=new G4QGSPPiKBuilder(quasiElasticQGS));
156  tpdata->theQGSPPiK->SetMinEnergy(minQGSP);
157  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasticFTF));
158  tpdata->theFTFPPiK->SetMinEnergy(minFTFP);
159  tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP);
161  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
162 
164 
167 }
168 
170 {
171  if (!tpdata) return;
172 
173  delete tpdata->theBertiniNeutron;
174  delete tpdata->theQGSPNeutron;
175  delete tpdata->theFTFPNeutron;
176  delete tpdata->theNeutrons;
177  delete tpdata->theBertiniPiK;
178  delete tpdata->theQGSPPiK;
179  delete tpdata->theFTFPPiK;
180  delete tpdata->thePiK;
181  delete tpdata->theBertiniPro;
182  delete tpdata->theQGSPPro;
183  delete tpdata->theFTFPPro;
184  delete tpdata->thePro;
185  delete tpdata->theFTFPAntiBaryon;
186  delete tpdata->theAntiBaryon;
187  delete tpdata->theHyperon;
188 
189  delete tpdata; tpdata = 0;
190 }
191 
193 {
194  G4MesonConstructor pMesonConstructor;
195  pMesonConstructor.ConstructParticle();
196 
197  G4BaryonConstructor pBaryonConstructor;
198  pBaryonConstructor.ConstructParticle();
199 
200  G4ShortLivedConstructor pShortLivedConstructor;
201  pShortLivedConstructor.ConstructParticle();
202 
203  G4IonConstructor pIonConstructor;
204  pIonConstructor.ConstructParticle();
205 }
206 
207 #include "G4ProcessManager.hh"
209 {
210  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
211  CreateModels();
213  tpdata->thePro->Build();
214  tpdata->thePiK->Build();
215  tpdata->theHyperon->Build();
217 
218  // --- Neutrons ---
221 
222  G4HadronicProcess* capture = 0;
224  G4ProcessVector* pv = pmanager->GetProcessList();
225  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
226  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
227  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
228  }
229  }
230  if ( ! capture ) {
231  capture = new G4HadronCaptureProcess("nCapture");
232  pmanager->AddDiscreteProcess(capture);
233  }
236  capture->RegisterMe(new G4NeutronRadCapture());
237 }
238 
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=true)
G4String name
Definition: TRTMaterials.hh:40
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
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
void SetMaxEnergy(G4double aM)
static void ConstructParticle()
void RegisterMe(G4HadronicInteraction *a)
static G4HadronicProcess * FindInelasticProcess(const G4ParticleDefinition *)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
void SetMinEnergy(G4double aM)
bool G4bool
Definition: G4Types.hh:79
static G4CrossSectionDataSetRegistry * Instance()
void SetMaxEnergy(G4double aM)
static const double GeV
Definition: G4SIunits.hh:196
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
G4ProcessVector * GetProcessList() const
void SetMinEnergy(G4double aM)
void SetMaxEnergy(G4double aM)