Geant4  10.01.p02
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 83699 2014-09-10 07:18:25Z 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 
67 
68 // factory
70 //
72 
75 
77  : G4VPhysicsConstructor("hInelastic QGSP_BERT_HP")
78 /* , theNeutrons(0)
79  , theFTFPNeutron(0)
80  , theQGSPNeutron(0)
81  , theBertiniNeutron(0)
82  , theHPNeutron(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  , xsNeutronCaptureXS(0)*/
95 // , QuasiElastic(true)
96 {}
97 
99  : G4VPhysicsConstructor(name)
100 /* , theNeutrons(0)
101  , theFTFPNeutron(0)
102  , theQGSPNeutron(0)
103  , theBertiniNeutron(0)
104  , theHPNeutron(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  , xsNeutronCaptureXS(0)*/
117 // , QuasiElastic(quasiElastic)
118 {}
119 
121 {
122  G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
123  G4bool quasiElasticQGS= true; // For QGS, it must use it.
124 
125  const G4double minQGSP = 12.0*GeV;
126  const G4double maxFTFP = 25.0*GeV;
127  const G4double minFTFP = 9.5*GeV;
128  const G4double maxBERT = 9.9*GeV;
129  const G4double maxHP = 19.9*MeV;
130 
131  tpdata->theNeutrons=new G4NeutronBuilder( true ); // Fission on
133  tpdata->theQGSPNeutron->SetMinEnergy(minQGSP);
137 
141 
143 
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);
151  tpdata->theBertiniPro->SetMaxEnergy(maxBERT);
152 
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);
160  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
161 
163 
166 }
167 
169 {
170  if (!tpdata) return;
171 
172  delete tpdata->theHPNeutron;
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 ---
219  G4HadronicProcess* capture = 0;
220  G4HadronicProcess* fission = 0;
222  G4ProcessVector* pv = pmanager->GetProcessList();
223  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
224  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
225  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
226  } else if ( fFission == ((*pv)[i])->GetProcessSubType() ) {
227  fission = static_cast<G4HadronicProcess*>((*pv)[i]);
228  }
229  }
230  if ( ! capture ) {
231  capture = new G4HadronCaptureProcess("nCapture");
232  pmanager->AddDiscreteProcess(capture);
233  }
236  capture->AddDataSet( new G4NeutronHPCaptureData );
237  G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
238  theNeutronRadCapture->SetMinEnergy( 19.9*MeV );
239  capture->RegisterMe( theNeutronRadCapture );
240  if ( ! fission ) {
241  fission = new G4HadronFissionProcess("nFission");
242  pmanager->AddDiscreteProcess(fission);
243  }
244  G4LFission* theNeutronLEPFission = new G4LFission();
245  theNeutronLEPFission->SetMinEnergy( 19.9*MeV );
246  fission->RegisterMe( theNeutronLEPFission );
247 }
248 
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=true)
static const double MeV
Definition: G4SIunits.hh:193
G4String name
Definition: TRTMaterials.hh:40
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
void SetMinEnergy(G4double aM)
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)
void SetMinEnergy(G4double anEnergy)
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
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BERT_HP)
void SetMaxEnergy(G4double aM)
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 G4ThreadLocal ThreadPrivate * tpdata
G4ProcessVector * GetProcessList() const
void SetMinEnergy(G4double aM)
void SetMaxEnergy(G4double aM)