Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4HadronPhysicsFTFP_BERT_ATL.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:$
27 //
28 //---------------------------------------------------------------------------
29 // Author: Alberto Ribon
30 // Date: April 2016
31 //
32 // Hadron physics for the new physics list FTFP_BERT_ATL.
33 // This is a modified version of the FTFP_BERT hadron physics for ATLAS.
34 // The hadron physics of FTFP_BERT_ATL has the transition between Bertini
35 // (BERT) intra-nuclear cascade model and Fritiof (FTF) string model in the
36 // energy region [9, 12] GeV (instead of [4, 5] GeV as in FTFP_BERT).
37 //---------------------------------------------------------------------------
38 //
39 #include <iomanip>
40 
42 
43 #include "globals.hh"
44 #include "G4ios.hh"
45 #include "G4SystemOfUnits.hh"
46 #include "G4ParticleDefinition.hh"
47 #include "G4ParticleTable.hh"
48 
49 #include "G4MesonConstructor.hh"
50 #include "G4BaryonConstructor.hh"
52 
56 #include "G4NeutronRadCapture.hh"
57 #include "G4NeutronInelasticXS.hh"
58 #include "G4NeutronCaptureXS.hh"
59 
61 
62 #include "G4PhysListUtil.hh"
63 
64 // factory
66 //
68 
69 G4ThreadLocal G4HadronPhysicsFTFP_BERT_ATL::ThreadPrivate* G4HadronPhysicsFTFP_BERT_ATL::tpdata=0;
70 
72  : G4VPhysicsConstructor("hInelastic FTFP_BERT_ATL")
73 /* , theNeutrons(0)
74  , theBertiniNeutron(0)
75  , theFTFPNeutron(0)
76  , thePiK(0)
77  , theBertiniPiK(0)
78  , theFTFPPiK(0)
79  , thePro(0)
80  , theBertiniPro(0)
81  , theFTFPPro(0)
82  , theHyperon(0)
83  , theAntiBaryon(0)
84  , theFTFPAntiBaryon(0) */
85  , QuasiElastic(false)
86  /*, xsKaon(0)
87  , xsNeutronInelasticXS(0)
88  , xsNeutronCaptureXS(0)*/
89 {}
90 
92  : G4VPhysicsConstructor(name)
93 /* , theNeutrons(0)
94  , theBertiniNeutron(0)
95  , theFTFPNeutron(0)
96  , thePiK(0)
97  , theBertiniPiK(0)
98  , theFTFPPiK(0)
99  , thePro(0)
100  , theBertiniPro(0)
101  , theFTFPPro(0)
102  , theHyperon(0)
103  , theAntiBaryon(0)
104  , theFTFPAntiBaryon(0)*/
105  , QuasiElastic(quasiElastic)
106  /*, xsKaonMinus(0)
107  , xsNeutronInelasticXS(0)
108  , xsNeutronCaptureXS(0)*/
109 {}
110 
111 void G4HadronPhysicsFTFP_BERT_ATL::CreateModels()
112 {
113  G4double minFTFP = 9.0 * GeV;
114  G4double maxBERT = 12.0 * GeV;
115  G4cout << " FTFP_BERT_ATL : new threshold between BERT and FTFP"
116  << " is over the interval " << minFTFP/GeV << " to " << maxBERT/GeV
117  << " GeV." << G4endl;
118  QuasiElastic= false;
119 
120  tpdata->theNeutrons=new G4NeutronBuilder;
121  tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron=new G4FTFPNeutronBuilder(QuasiElastic));
122  tpdata->theFTFPNeutron->SetMinEnergy(minFTFP);
123  tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron=new G4BertiniNeutronBuilder);
124  tpdata->theBertiniNeutron->SetMinEnergy(0.0*GeV);
125  tpdata->theBertiniNeutron->SetMaxEnergy(maxBERT);
126 
127  tpdata->thePro=new G4ProtonBuilder;
128  tpdata->thePro->RegisterMe(tpdata->theFTFPPro=new G4FTFPProtonBuilder(QuasiElastic));
129  tpdata->theFTFPPro->SetMinEnergy(minFTFP);
130  tpdata->thePro->RegisterMe(tpdata->theBertiniPro=new G4BertiniProtonBuilder);
131  tpdata->theBertiniPro->SetMaxEnergy(maxBERT);
132 
133  tpdata->thePiK=new G4PiKBuilder;
134  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK=new G4FTFPPiKBuilder(QuasiElastic));
135  tpdata->theFTFPPiK->SetMinEnergy(minFTFP);
136  tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK=new G4BertiniPiKBuilder);
137  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
138 
139  tpdata->theHyperon=new G4HyperonFTFPBuilder;
140 
141  tpdata->theAntiBaryon=new G4AntiBarionBuilder;
142  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon=new G4FTFPAntiBarionBuilder(QuasiElastic));
143 }
144 
146 {
147  if (!tpdata) return;
148 
149  delete tpdata->theNeutrons;
150  delete tpdata->theBertiniNeutron;
151  delete tpdata->theFTFPNeutron;
152 
153  delete tpdata->thePiK;
154  delete tpdata->theBertiniPiK;
155  delete tpdata->theFTFPPiK;
156 
157  delete tpdata->thePro;
158  delete tpdata->theBertiniPro;
159  delete tpdata->theFTFPPro;
160 
161  delete tpdata->theHyperon;
162  delete tpdata->theAntiBaryon;
163  delete tpdata->theFTFPAntiBaryon;
164 
165  //Note that here we need to set to 0 the pointer
166  //since tpdata is static and if thread are "reused"
167  //it can be problematic
168  delete tpdata; tpdata = 0;
169 }
170 
172 {
173  G4MesonConstructor pMesonConstructor;
174  pMesonConstructor.ConstructParticle();
175 
176  G4BaryonConstructor pBaryonConstructor;
177  pBaryonConstructor.ConstructParticle();
178 
179  G4ShortLivedConstructor pShortLivedConstructor;
180  pShortLivedConstructor.ConstructParticle();
181 }
182 
183 #include "G4ProcessManager.hh"
185 {
186  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
187  CreateModels();
188  tpdata->theNeutrons->Build();
189  tpdata->thePro->Build();
190  tpdata->thePiK->Build();
191 
192  // --- Kaons ---
193  tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
194  G4VCrossSectionDataSet * kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
199 
200  tpdata->theHyperon->Build();
201  tpdata->theAntiBaryon->Build();
202 
203  // --- Neutrons ---
205  G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
206 
207  G4HadronicProcess* capture = 0;
209  G4ProcessVector* pv = pmanager->GetProcessList();
210  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
211  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
212  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
213  }
214  }
215  if ( ! capture ) {
216  capture = new G4HadronCaptureProcess("nCapture");
217  pmanager->AddDiscreteProcess(capture);
218  }
220  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
221  capture->RegisterMe(new G4NeutronRadCapture());
222 }
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)
G4GLOB_DLL std::ostream G4cout
static G4KaonZeroShort * KaonZeroShort()
bool G4bool
Definition: G4Types.hh:79
static G4CrossSectionDataSetRegistry * Instance()
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
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4ProcessVector * GetProcessList() const
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)