Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
70 G4ThreadLocal G4HadronPhysicsNuBeam::ThreadPrivate* G4HadronPhysicsNuBeam::tpdata=0;
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 
114 void G4HadronPhysicsNuBeam::CreateModels()
115 {
116 
117  // this is fairly "standard", and is the same in FTFP_BERT
118  //
119  tpdata->theNeutrons=new G4NeutronBuilder;
120  tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(QuasiElastic);
121  tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron);
122  tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron=new G4BertiniNeutronBuilder);
123  tpdata->theBertiniNeutron->SetMinEnergy(0.0*GeV);
124  tpdata->theBertiniNeutron->SetMaxEnergy(5*GeV);
125 
126  // this block has quite a few modifications,
127  // incl. energy ranges that are different from FTFP_BERT
128  //
129  tpdata->thePro=new G4ProtonBuilder;
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  //
139  tpdata->theQGSPPro = new G4QGSPLundStrFragmProtonBuilder( true );
140  tpdata->thePro->RegisterMe(tpdata->theQGSPPro);
141  //
142  // standard FTFP builder, but energy range is adjusted
143  //
144  tpdata->theFTFPPro=new G4FTFPProtonBuilder(QuasiElastic);
145  tpdata->thePro->RegisterMe(tpdata->theFTFPPro);
146  tpdata->theFTFPPro->SetMinEnergy(3.*GeV);
147  tpdata->theFTFPPro->SetMaxEnergy(101.*GeV);
148  //
149  // standard Bertini builder, but the validity limit in energy has been moved higher
150  //
151  tpdata->thePro->RegisterMe(tpdata->theBertiniPro=new G4BertiniProtonBuilder);
152  tpdata->theBertiniPro->SetMaxEnergy(3.5*GeV);
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  //
157  tpdata->thePiK=new G4PiKBuilder;
158  tpdata->theFTFPPiK=new G4FTFPPiKBuilder(QuasiElastic);
159  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK);
160  tpdata->theFTFPPiK->SetMinEnergy(3.*GeV);
161  tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
162  tpdata->theBertiniPiK->SetMaxEnergy(3.5*GeV);
163 
164  // this is "standard" and is the same as in FTFP_BERT
165  //
166  tpdata->theHyperon=new G4HyperonFTFPBuilder;
167  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
168  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(QuasiElastic));
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 
221  tpdata->theNeutrons->Build();
222  tpdata->thePro->Build();
223  tpdata->thePiK->Build();
224 
225  // --- Kaons ---
226  tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
227  G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
232 
233  tpdata->theHyperon->Build();
234  tpdata->theAntiBaryon->Build();
235 
236  // --- Neutrons ---
237  //
239  G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
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  }
256  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
257  capture->RegisterMe(new G4NeutronRadCapture());
258 
259  return;
260 
261 }
262 
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=true)
const XML_Char * name
Definition: expat.h:151
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4KaonZeroLong * KaonZeroLong()
static const char * Default_Name()
static void ConstructParticle()
#define G4ThreadLocal
Definition: tls.hh:89
static void ConstructParticle()
int G4int
Definition: G4Types.hh:78
static G4KaonMinus * KaonMinus()
Definition: G4KaonMinus.cc:113
void RegisterMe(G4HadronicInteraction *a)
static G4HadronicProcess * FindInelasticProcess(const G4ParticleDefinition *)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
static G4KaonZeroShort * KaonZeroShort()
bool G4bool
Definition: G4Types.hh:79
static G4CrossSectionDataSetRegistry * Instance()
G4HadronPhysicsNuBeam(G4int verbose=1)
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4int size() const
static const char * Default_Name()
G4ProcessManager * GetProcessManager() const
static constexpr double GeV
Definition: G4SIunits.hh:217
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4ProcessVector * GetProcessList() const
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)