Geant4  10.02.p01
G4HadronPhysicsNuBeam.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 //
27 // $Id$
28 //
29 //---------------------------------------------------------------------------
30 //
31 // ClassName: HadronPhysicsNuBeam
32 //
33 // Author: Julia Yarba, FNAL/CD (2013)
34 // created from (molded after) HadronPhysicsFTFP_BERT
35 //
36 // Modified:
37 //
38 //----------------------------------------------------------------------------
39 //
40 #include <iomanip>
41 
42 #include "G4HadronPhysicsNuBeam.hh"
43 
44 #include "globals.hh"
45 #include "G4ios.hh"
46 #include "G4SystemOfUnits.hh"
47 #include "G4ParticleDefinition.hh"
48 #include "G4ParticleTable.hh"
49 
50 #include "G4MesonConstructor.hh"
51 #include "G4BaryonConstructor.hh"
53 
57 #include "G4NeutronRadCapture.hh"
58 #include "G4NeutronInelasticXS.hh"
59 #include "G4NeutronCaptureXS.hh"
60 
62 
63 #include "G4PhysListUtil.hh"
64 
65 // factory
67 //
69 
71 
73  : G4VPhysicsConstructor("hInelasticNuBeam")
74 /* , theNeutrons(0)
75  , theBertiniNeutron(0)
76  , theFTFPNeutron(0)
77  , thePiK(0)
78  , theBertiniPiK(0)
79  , theFTFPPiK(0)
80  , thePro(0)
81  , theBertiniPro(0)
82  , theFTFPPro(0)
83  , theQGSPPro(0)
84  , theHyperon(0)
85  , theAntiBaryon(0)
86  , theFTFPAntiBaryon(0) */
87  , QuasiElastic(false)
88 /* , xsKaon(0)
89  , xsNeutronInelasticXS(0)
90  , xsNeutronCaptureXS(0) */
91 {}
92 
94  : G4VPhysicsConstructor(name)
95 /* , theNeutrons(0)
96  , theBertiniNeutron(0)
97  , theFTFPNeutron(0)
98  , thePiK(0)
99  , theBertiniPiK(0)
100  , theFTFPPiK(0)
101  , thePro(0)
102  , theBertiniPro(0)
103  , theFTFPPro(0)
104  , theQGSPPro(0)
105  , theHyperon(0)
106  , theAntiBaryon(0)
107  , theFTFPAntiBaryon(0) */
108  , QuasiElastic(quasiElastic)
109 /* , xsKaon(0)
110  , xsNeutronInelasticXS(0)
111  , xsNeutronCaptureXS(0) */
112 {}
113 
115 {
116 
117  // this is fairly "standard", and is the same in FTFP_BERT
118  //
125 
126  // this block has quite a few modifications,
127  // incl. energy ranges that are different from FTFP_BERT
128  //
130  //
131  // this is the new "custom" proton builder, tentatively for NuBeam
132  //
133  // no need to set the min energy because it's set in the ProBuilder (at 100GeV)
134  // ... and theMax will be set 100TeV via Build()
135  //
136  // also explicitly set quasi-elastic key ON for QGS
137  // (it should be OFF for FTF, controlled by QuasiElastic)
138  //
141  //
142  // standard FTFP builder, but energy range is adjusted
143  //
148  //
149  // standard Bertini builder, but the validity limit in energy has been moved higher
150  //
153 
154  // this one has energy ranges different from FTFP_BERT,
155  // namely, Bertini is extended up to 10GeV, and FTFP starts at 7GeV
156  //
163 
164  // this is "standard" and is the same as in FTFP_BERT
165  //
169 
170  return;
171 
172 }
173 
175 {
176  if (!tpdata) return;
177 
178  delete tpdata->theNeutrons;
179  delete tpdata->theBertiniNeutron;
180  delete tpdata->theFTFPNeutron;
181 
182  delete tpdata->thePiK;
183  delete tpdata->theBertiniPiK;
184  delete tpdata->theFTFPPiK;
185 
186  delete tpdata->thePro;
187  delete tpdata->theBertiniPro;
188  delete tpdata->theFTFPPro;
189  delete tpdata->theQGSPPro;
190 
191  delete tpdata->theHyperon;
192  delete tpdata->theAntiBaryon;
193  delete tpdata->theFTFPAntiBaryon;
194 
195 }
196 
198 {
199 
200  G4MesonConstructor pMesonConstructor;
201  pMesonConstructor.ConstructParticle();
202 
203  G4BaryonConstructor pBaryonConstructor;
204  pBaryonConstructor.ConstructParticle();
205 
206  G4ShortLivedConstructor pShortLivedConstructor;
207  pShortLivedConstructor.ConstructParticle();
208 
209  return;
210 
211 }
212 
213 #include "G4ProcessManager.hh"
215 {
216 
217  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
218 
219  CreateModels();
220 
222  tpdata->thePro->Build();
223  tpdata->thePiK->Build();
224 
225  // --- Kaons ---
232 
233  tpdata->theHyperon->Build();
235 
236  // --- Neutrons ---
237  //
240 
241  G4HadronicProcess* capture = 0;
243  G4ProcessVector* pv = pmanager->GetProcessList();
244  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i )
245  {
246  if ( fCapture == ((*pv)[i])->GetProcessSubType() )
247  {
248  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
249  }
250  }
251  if ( ! capture ) {
252  capture = new G4HadronCaptureProcess("nCapture");
253  pmanager->AddDiscreteProcess(capture);
254  }
257  capture->RegisterMe(new G4NeutronRadCapture());
258 
259  return;
260 
261 }
262 
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=true)
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsNuBeam)
G4String name
Definition: TRTMaterials.hh:40
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4KaonZeroLong * KaonZeroLong()
static G4ThreadLocal ThreadPrivate * tpdata
static const char * Default_Name()
static void ConstructParticle()
#define G4ThreadLocal
Definition: tls.hh:89
static void ConstructParticle()
G4ProcessManager * GetProcessManager() const
int G4int
Definition: G4Types.hh:78
G4BertiniNeutronBuilder * theBertiniNeutron
G4ComponentGGHadronNucleusXsc * xsKaon
static G4KaonMinus * KaonMinus()
Definition: G4KaonMinus.cc:113
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)
G4HadronPhysicsNuBeam(G4int verbose=1)
static const double GeV
Definition: G4SIunits.hh:214
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
void SetMinEnergy(G4double aM)
G4int size() const
static const char * Default_Name()
void RegisterMe(G4VAntiBarionBuilder *aB)
void RegisterMe(G4VPiKBuilder *aB)
Definition: G4PiKBuilder.hh:58
G4QGSPLundStrFragmProtonBuilder * theQGSPPro
void RegisterMe(G4VProtonBuilder *aB)
void RegisterMe(G4VNeutronBuilder *aB)
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4ProcessVector * GetProcessList() const
void SetMaxEnergy(G4double aM)