Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExExChHadronPhysicsQGSP_BIC.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 //
28 //
29 
30 #include <iomanip>
31 
33 
34 #include "globals.hh"
35 #include "G4ios.hh"
36 #include "G4SystemOfUnits.hh"
37 #include "G4ParticleDefinition.hh"
38 #include "G4ParticleTable.hh"
39 
40 #include "G4MesonConstructor.hh"
41 #include "G4BaryonConstructor.hh"
43 #include "G4IonConstructor.hh"
44 
46 #include "G4NeutronRadCapture.hh"
47 #include "G4NeutronInelasticXS.hh"
48 #include "G4NeutronCaptureXS.hh"
49 
50 #include "G4PhysListUtil.hh"
51 
52 // factory
54 //
55 
57 
58 G4ThreadLocal ExExChHadronPhysicsQGSP_BIC::ThreadPrivate*
59 ExExChHadronPhysicsQGSP_BIC::tpdata = 0;
60 
62 : G4VPhysicsConstructor("hInelastic Xtal QGSP_BIC")
63 /* , theNeutrons(0)
64  , theFTFPNeutron(0)
65  , theQGSPNeutron(0)
66  , theBinaryNeutron(0)
67  , thePiK(0)
68  , theFTFPPiK(0)
69  , theQGSPPiK(0)
70  , theBertiniPiK(0)
71  , thePro(0)
72  , theFTFPPro(0)
73  , theQGSPPro(0)
74  , theBinaryPro(0)
75  , theHyperon(0)
76  , theAntiBaryon(0)
77  , theFTFPAntiBaryon(0)
78  , xsNeutronInelasticXS(0)
79  , xsNeutronCaptureXS(0)*/
80 // , QuasiElastic(true)
81 {}
82 
83 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
84 
86  const G4String& name, G4bool /* quasiElastic */)
88 /* , theNeutrons(0)
89  , theFTFPNeutron(0)
90  , theQGSPNeutron(0)
91  , theBinaryNeutron(0)
92  , thePiK(0)
93  , theFTFPPiK(0)
94  , theQGSPPiK(0)
95  , theBertiniPiK(0)
96  , thePro(0)
97  , theFTFPPro(0)
98  , theQGSPPro(0)
99  , theBinaryPro(0)
100  , theHyperon(0)
101  , theAntiBaryon(0)
102  , theFTFPAntiBaryon(0)
103  , xsNeutronInelasticXS(0)
104  , xsNeutronCaptureXS(0)*/
105 // , QuasiElastic(quasiElastic)
106 {}
107 
108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
109 
110 void ExExChHadronPhysicsQGSP_BIC::CreateModels()
111 {
112  G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
113  G4bool quasiElasticQGS= true; // For QGS, it must use it.
114 
115  const G4double maxFTFP = 25.0*GeV;
116  const G4double minFTFP = 9.5*GeV;
117  const G4double maxBIC = 9.9*GeV;
118  const G4double maxBERT = 5.0*GeV;
119 
120  tpdata->theNeutrons=new G4NeutronBuilder;
121  tpdata->theNeutrons->RegisterMe(tpdata->theQGSPNeutron =
122  new G4QGSPNeutronBuilder(quasiElasticQGS));
123  tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron =
124  new G4FTFPNeutronBuilder(quasiElasticFTF));
125  tpdata->theFTFPNeutron->SetMinEnergy(minFTFP);
126  tpdata->theFTFPNeutron->SetMaxEnergy(maxFTFP);
127 
128  tpdata->theNeutrons->RegisterMe(tpdata->theBinaryNeutron =
130  tpdata->theBinaryNeutron->SetMaxEnergy(maxBIC);
131 
132  tpdata->thePro=new ExExChProtonBuilder;
133  tpdata->thePro->RegisterMe(tpdata->theQGSPPro =
134  new G4QGSPProtonBuilder(quasiElasticQGS));
135  tpdata->thePro->RegisterMe(tpdata->theFTFPPro =
136  new G4FTFPProtonBuilder(quasiElasticFTF));
137  tpdata->theFTFPPro->SetMinEnergy(minFTFP);
138  tpdata->theFTFPPro->SetMaxEnergy(maxFTFP);
139 
140  tpdata->thePro->RegisterMe(tpdata->theBinaryPro=new G4BinaryProtonBuilder);
141  tpdata->theBinaryPro->SetMaxEnergy(maxBIC);
142 
143  tpdata->thePiK=new ExExChPiKBuilder;
144  tpdata->thePiK->RegisterMe(tpdata->theQGSPPiK =
145  new G4QGSPPiKBuilder(quasiElasticQGS));
146  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK =
147  new G4FTFPPiKBuilder(quasiElasticFTF));
148  tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP);
149  tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK =
150  new G4BertiniPiKBuilder);
151  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
152 
153  tpdata->theHyperon=new ExExChHyperonFTFPBuilder;
154 
155  tpdata->theAntiBaryon=new ExExChAntiBarionBuilder;
156  tpdata->theAntiBaryon->RegisterMe(tpdata->theFTFPAntiBaryon =
157  new G4FTFPAntiBarionBuilder(quasiElasticFTF));
158 }
159 
160 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
161 
163 {
164  if(tpdata) delete tpdata;
165 }
166 
167 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
168 
170 {
171  G4MesonConstructor pMesonConstructor;
172  pMesonConstructor.ConstructParticle();
173 
174  G4BaryonConstructor pBaryonConstructor;
175  pBaryonConstructor.ConstructParticle();
176 
177  G4ShortLivedConstructor pShortLivedConstructor;
178  pShortLivedConstructor.ConstructParticle();
179 
180  G4IonConstructor pIonConstructor;
181  pIonConstructor.ConstructParticle();
182 }
183 
184 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
185 
186 #include "G4ProcessManager.hh"
188 {
189  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
190  CreateModels();
191  tpdata->theNeutrons->Build();
192  tpdata->thePro->Build();
193  tpdata->thePiK->Build();
194  tpdata->theHyperon->Build();
195  tpdata->theAntiBaryon->Build();
196 
197  // --- Neutrons ---
198  tpdata->xsNeutronInelasticXS = new G4NeutronInelasticXS();
200  G4Neutron::Neutron())->AddDataSet(tpdata->xsNeutronInelasticXS);
201 
202  G4HadronicProcess* capture = 0;
204  G4ProcessVector* pv = pmanager->GetProcessList();
205  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
206  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
207  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
208  }
209  }
210  if ( ! capture ) {
211  capture = new G4HadronCaptureProcess("nCapture");
212  pmanager->AddDiscreteProcess(capture);
213  }
214  tpdata->xsNeutronCaptureXS = new G4NeutronCaptureXS();
215  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
216  capture->RegisterMe(new G4NeutronRadCapture());
217 }
218 
const XML_Char * name
Definition: expat.h:151
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static void ConstructParticle()
#define G4ThreadLocal
Definition: tls.hh:89
static void ConstructParticle()
int G4int
Definition: G4Types.hh:78
static void ConstructParticle()
void RegisterMe(G4HadronicInteraction *a)
Definition of the ExExChHadronPhysicsQGSP_BIC class.
static G4HadronicProcess * FindInelasticProcess(const G4ParticleDefinition *)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
bool G4bool
Definition: G4Types.hh:79
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4int size() const
G4ProcessManager * GetProcessManager() const
static constexpr double GeV
Definition: G4SIunits.hh:217
double G4double
Definition: G4Types.hh:76
G4ProcessVector * GetProcessList() const
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)