Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 76703 2013-11-14 10:29:11Z 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"
66 
67 // factory
69 //
71 
72 G4ThreadLocal G4HadronPhysicsQGSP_BERT::ThreadPrivate*
73 G4HadronPhysicsQGSP_BERT::tpdata = 0;
74 
75 
77  : G4VPhysicsConstructor("hInelastic QGSP_BERT")
78 /* , theNeutrons(0)
79  , theFTFPNeutron(0)
80  , theQGSPNeutron(0)
81  , theBertiniNeutron(0)
82  , thePiK(0)
83  , theFTFPPiK(0)
84  , theQGSPPiK(0)
85  , theBertiniPiK(0)
86  , thePro(0)
87  , theFTFPPro(0)
88  , theQGSPPro(0)
89  , theBertiniPro(0)
90  , theHyperon(0)
91  , theAntiBaryon(0)
92  , theFTFPAntiBaryon(0)
93  , xsNeutronInelasticXS(0)
94  , xsNeutronCaptureXS(0)*/
95  , QuasiElastic(true)
96 {
97 }
98 
100  : G4VPhysicsConstructor(name)
101 /* , theNeutrons(0)
102  , theFTFPNeutron(0)
103  , theQGSPNeutron(0)
104  , theBertiniNeutron(0)
105  , thePiK(0)
106  , theFTFPPiK(0)
107  , theQGSPPiK(0)
108  , theBertiniPiK(0)
109  , thePro(0)
110  , theFTFPPro(0)
111  , theQGSPPro(0)
112  , theBertiniPro(0)
113  , theHyperon(0)
114  , theAntiBaryon(0)
115  , theFTFPAntiBaryon(0)
116  , xsNeutronInelasticXS(0)
117  , xsNeutronCaptureXS(0)*/
118  , QuasiElastic(quasiElastic)
119 {
120 }
121 
122 void G4HadronPhysicsQGSP_BERT::CreateModels()
123 {
124  G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
125  G4bool quasiElasticQGS= true; // For QGS, it must use it.
126 
127  const G4double minQGSP = 12.0*GeV;
128  const G4double maxFTFP = 25.0*GeV;
129  const G4double minFTFP = 9.5*GeV;
130  const G4double maxBERT = 9.9*GeV;
131  const G4double minBERT = 0.0*GeV;
132 
133  tpdata->theNeutrons=new G4NeutronBuilder;
134  tpdata->theNeutrons->RegisterMe(tpdata->theQGSPNeutron=new G4QGSPNeutronBuilder(quasiElasticQGS));
135  tpdata->theQGSPNeutron->SetMinEnergy(minQGSP);
136  tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(quasiElasticFTF));
137  tpdata->theFTFPNeutron->SetMinEnergy(minFTFP);
138  tpdata->theFTFPNeutron->SetMaxEnergy(maxFTFP);
139 
140  tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron=new G4BertiniNeutronBuilder);
141  tpdata->theBertiniNeutron->SetMinEnergy(minBERT);
142  tpdata->theBertiniNeutron->SetMaxEnergy(maxBERT);
143 
144  tpdata->thePro=new G4ProtonBuilder;
145  tpdata->thePro->RegisterMe(tpdata->theQGSPPro=new G4QGSPProtonBuilder(quasiElasticQGS));
146  tpdata->theQGSPPro->SetMinEnergy(minQGSP);
147  tpdata->thePro->RegisterMe(tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasticFTF));
148  tpdata->theFTFPPro->SetMinEnergy(minFTFP);
149  tpdata->theFTFPPro->SetMaxEnergy(maxFTFP);
150  tpdata->thePro->RegisterMe(tpdata->theBertiniPro=new G4BertiniProtonBuilder);
151  tpdata->theBertiniPro->SetMaxEnergy(maxBERT);
152 
153  tpdata->thePiK=new G4PiKBuilder;
154  tpdata->thePiK->RegisterMe(tpdata->theQGSPPiK=new G4QGSPPiKBuilder(quasiElasticQGS));
155  tpdata->theQGSPPiK->SetMinEnergy(minQGSP);
156  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasticFTF));
157  tpdata->theFTFPPiK->SetMinEnergy(minFTFP);
158  tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP);
159  tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
160  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
161 
162  tpdata->theHyperon=new G4HyperonFTFPBuilder;
163 
164  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
165  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasticFTF));
166 }
167 
169 {
170  delete tpdata->theBertiniNeutron;
171  delete tpdata->theQGSPNeutron;
172  delete tpdata->theFTFPNeutron;
173  delete tpdata->theNeutrons;
174  delete tpdata->theBertiniPiK;
175  delete tpdata->theQGSPPiK;
176  delete tpdata->theFTFPPiK;
177  delete tpdata->thePiK;
178  delete tpdata->theBertiniPro;
179  delete tpdata->theQGSPPro;
180  delete tpdata->theFTFPPro;
181  delete tpdata->thePro;
182  delete tpdata->theFTFPAntiBaryon;
183  delete tpdata->theAntiBaryon;
184  delete tpdata->theHyperon;
185  delete tpdata->xsNeutronInelasticXS;
186  delete tpdata->xsNeutronCaptureXS;
187 
188  delete tpdata; tpdata = 0;
189 }
190 
192 {
193  G4MesonConstructor pMesonConstructor;
194  pMesonConstructor.ConstructParticle();
195 
196  G4BaryonConstructor pBaryonConstructor;
197  pBaryonConstructor.ConstructParticle();
198 
199  G4ShortLivedConstructor pShortLivedConstructor;
200  pShortLivedConstructor.ConstructParticle();
201 
202  G4IonConstructor pIonConstructor;
203  pIonConstructor.ConstructParticle();
204 }
205 
206 #include "G4ProcessManager.hh"
208 {
209  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
210  CreateModels();
211  tpdata->theNeutrons->Build();
212  tpdata->thePro->Build();
213  tpdata->thePiK->Build();
214  tpdata->theHyperon->Build();
215  tpdata->theAntiBaryon->Build();
216 
217  // --- Neutrons ---
218  tpdata->xsNeutronInelasticXS = new G4NeutronInelasticXS();
219  G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
220 
221  G4HadronicProcess* capture = 0;
223  G4ProcessVector* pv = pmanager->GetProcessList();
224  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
225  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
226  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
227  }
228  }
229  if ( ! capture ) {
230  capture = new G4HadronCaptureProcess("nCapture");
231  pmanager->AddDiscreteProcess(capture);
232  }
233  tpdata->xsNeutronCaptureXS = new G4NeutronCaptureXS();
234  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
235  capture->RegisterMe(new G4NeutronRadCapture());
236 }
237 
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
const XML_Char * name
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BERT)
static void ConstructParticle()
#define G4ThreadLocal
Definition: tls.hh:52
static void ConstructParticle()
G4ProcessManager * GetProcessManager() const
int G4int
Definition: G4Types.hh:78
static void ConstructParticle()
void RegisterMe(G4HadronicInteraction *a)
static G4HadronicProcess * FindInelasticProcess(const G4ParticleDefinition *)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
bool G4bool
Definition: G4Types.hh:79
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4int size() const
double G4double
Definition: G4Types.hh:76
G4ProcessVector * GetProcessList() const