Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4HadronPhysicsQGSP_BERT_HP.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_HP.cc 73040 2013-08-15 09:36:57Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName: G4HadronPhysicsQGSP_BERT_HP
31 //
32 // Author: 2002 J.P. Wellisch
33 //
34 // Modified:
35 // 15.12.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 // 31.10.2012 A.Ribon: Use G4MiscBuilder
40 // 19.03.2013 A.Ribon: Replace LEP with FTFP
41 //
42 //----------------------------------------------------------------------------
43 //
44 #include <iomanip>
45 
47 
48 #include "globals.hh"
49 #include "G4ios.hh"
50 #include "G4SystemOfUnits.hh"
51 #include "G4ParticleDefinition.hh"
52 #include "G4ParticleTable.hh"
53 
54 #include "G4MesonConstructor.hh"
55 #include "G4BaryonConstructor.hh"
57 
58 #include "G4IonConstructor.hh"
59 
61 #include "G4NeutronRadCapture.hh"
62 #include "G4NeutronCaptureXS.hh"
64 #include "G4LFission.hh"
65 
66 // factory
68 //
70 
71 G4ThreadLocal G4HadronPhysicsQGSP_BERT_HP::ThreadPrivate*
72 G4HadronPhysicsQGSP_BERT_HP::tpdata = 0;
73 
75  : G4VPhysicsConstructor("hInelastic QGSP_BERT_HP")
76 /* , theNeutrons(0)
77  , theFTFPNeutron(0)
78  , theQGSPNeutron(0)
79  , theBertiniNeutron(0)
80  , theHPNeutron(0)
81  , thePiK(0)
82  , theFTFPPiK(0)
83  , theQGSPPiK(0)
84  , theBertiniPiK(0)
85  , thePro(0)
86  , theFTFPPro(0)
87  , theQGSPPro(0)
88  , theBertiniPro(0)
89  , theHyperon(0)
90  , theAntiBaryon(0)
91  , theFTFPAntiBaryon(0)
92  , xsNeutronCaptureXS(0)*/
93 // , QuasiElastic(true)
94 {}
95 
97  : G4VPhysicsConstructor(name)
98 /* , theNeutrons(0)
99  , theFTFPNeutron(0)
100  , theQGSPNeutron(0)
101  , theBertiniNeutron(0)
102  , theHPNeutron(0)
103  , thePiK(0)
104  , theFTFPPiK(0)
105  , theQGSPPiK(0)
106  , theBertiniPiK(0)
107  , thePro(0)
108  , theFTFPPro(0)
109  , theQGSPPro(0)
110  , theBertiniPro(0)
111  , theHyperon(0)
112  , theAntiBaryon(0)
113  , theFTFPAntiBaryon(0)
114  , xsNeutronCaptureXS(0)*/
115 // , QuasiElastic(quasiElastic)
116 {}
117 
118 void G4HadronPhysicsQGSP_BERT_HP::CreateModels()
119 {
120  G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
121  G4bool quasiElasticQGS= true; // For QGS, it must use it.
122 
123  const G4double minQGSP = 12.0*GeV;
124  const G4double maxFTFP = 25.0*GeV;
125  const G4double minFTFP = 9.5*GeV;
126  const G4double maxBERT = 9.9*GeV;
127  const G4double maxHP = 19.9*MeV;
128 
129  tpdata->theNeutrons=new G4NeutronBuilder( true ); // Fission on
130  tpdata->theNeutrons->RegisterMe(tpdata->theQGSPNeutron=new G4QGSPNeutronBuilder(quasiElasticQGS));
131  tpdata->theQGSPNeutron->SetMinEnergy(minQGSP);
132  tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(quasiElasticFTF));
133  tpdata->theFTFPNeutron->SetMinEnergy(minFTFP);
134  tpdata->theFTFPNeutron->SetMaxEnergy(maxFTFP);
135 
136  tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron=new G4BertiniNeutronBuilder);
137  tpdata->theBertiniNeutron->SetMinEnergy(maxHP);
138  tpdata->theBertiniNeutron->SetMaxEnergy(maxBERT);
139 
140  tpdata->theNeutrons->RegisterMe(tpdata->theHPNeutron=new G4NeutronHPBuilder);
141 
142  tpdata->thePro=new G4ProtonBuilder;
143  tpdata->thePro->RegisterMe(tpdata->theQGSPPro=new G4QGSPProtonBuilder(quasiElasticQGS));
144  tpdata->theQGSPPro->SetMinEnergy(minQGSP);
145  tpdata->thePro->RegisterMe(tpdata->theFTFPPro=new G4FTFPProtonBuilder(quasiElasticFTF));
146  tpdata->theFTFPPro->SetMinEnergy(minFTFP);
147  tpdata->theFTFPPro->SetMaxEnergy(maxFTFP);
148  tpdata->thePro->RegisterMe(tpdata->theBertiniPro=new G4BertiniProtonBuilder);
149  tpdata->theBertiniPro->SetMaxEnergy(maxBERT);
150 
151  tpdata->thePiK=new G4PiKBuilder;
152  tpdata->thePiK->RegisterMe(tpdata->theQGSPPiK=new G4QGSPPiKBuilder(quasiElasticQGS));
153  tpdata->theQGSPPiK->SetMinEnergy(minQGSP);
154  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK=new G4FTFPPiKBuilder(quasiElasticFTF));
155  tpdata->theFTFPPiK->SetMinEnergy(minFTFP);
156  tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP);
157  tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
158  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
159 
160  tpdata->theHyperon=new G4HyperonFTFPBuilder;
161 
162  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
163  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasticFTF));
164 }
165 
167 {
168  delete tpdata->theHPNeutron;
169  delete tpdata->theBertiniNeutron;
170  delete tpdata->theQGSPNeutron;
171  delete tpdata->theFTFPNeutron;
172  delete tpdata->theNeutrons;
173  delete tpdata->theBertiniPiK;
174  delete tpdata->theQGSPPiK;
175  delete tpdata->theFTFPPiK;
176  delete tpdata->thePiK;
177  delete tpdata->theBertiniPro;
178  delete tpdata->theQGSPPro;
179  delete tpdata->theFTFPPro;
180  delete tpdata->thePro;
181  delete tpdata->theFTFPAntiBaryon;
182  delete tpdata->theAntiBaryon;
183  delete tpdata->theHyperon;
184  delete tpdata->xsNeutronCaptureXS;
185 
186  delete tpdata; tpdata = 0;
187 }
188 
190 {
191  G4MesonConstructor pMesonConstructor;
192  pMesonConstructor.ConstructParticle();
193 
194  G4BaryonConstructor pBaryonConstructor;
195  pBaryonConstructor.ConstructParticle();
196 
197  G4ShortLivedConstructor pShortLivedConstructor;
198  pShortLivedConstructor.ConstructParticle();
199 
200  G4IonConstructor pIonConstructor;
201  pIonConstructor.ConstructParticle();
202 }
203 
204 #include "G4ProcessManager.hh"
206 {
207  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
208  CreateModels();
209  tpdata->theNeutrons->Build();
210  tpdata->thePro->Build();
211  tpdata->thePiK->Build();
212  tpdata->theHyperon->Build();
213  tpdata->theAntiBaryon->Build();
214 
215  // --- Neutrons ---
216  G4HadronicProcess* capture = 0;
217  G4HadronicProcess* fission = 0;
219  G4ProcessVector* pv = pmanager->GetProcessList();
220  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
221  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
222  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
223  } else if ( fFission == ((*pv)[i])->GetProcessSubType() ) {
224  fission = static_cast<G4HadronicProcess*>((*pv)[i]);
225  }
226  }
227  if ( ! capture ) {
228  capture = new G4HadronCaptureProcess("nCapture");
229  pmanager->AddDiscreteProcess(capture);
230  }
231  tpdata->xsNeutronCaptureXS = new G4NeutronCaptureXS();
232  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
233  capture->AddDataSet( new G4NeutronHPCaptureData );
234  G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
235  theNeutronRadCapture->SetMinEnergy( 19.9*MeV );
236  capture->RegisterMe( theNeutronRadCapture );
237  if ( ! fission ) {
238  fission = new G4HadronFissionProcess("nFission");
239  pmanager->AddDiscreteProcess(fission);
240  }
241  G4LFission* theNeutronLEPFission = new G4LFission();
242  theNeutronLEPFission->SetMinEnergy( 19.9*MeV );
243  fission->RegisterMe( theNeutronLEPFission );
244 }
245 
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
const XML_Char * name
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)
void SetMinEnergy(G4double anEnergy)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
bool G4bool
Definition: G4Types.hh:79
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BERT_HP)
G4int size() const
double G4double
Definition: G4Types.hh:76
G4ProcessVector * GetProcessList() const