Geant4  10.01.p03
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 //
26 
27 #include <iomanip>
28 
30 
31 #include "globals.hh"
32 #include "G4ios.hh"
33 #include "G4SystemOfUnits.hh"
34 #include "G4ParticleDefinition.hh"
35 #include "G4ParticleTable.hh"
36 
37 #include "G4MesonConstructor.hh"
38 #include "G4BaryonConstructor.hh"
40 #include "G4IonConstructor.hh"
41 
43 #include "G4NeutronRadCapture.hh"
44 #include "G4NeutronInelasticXS.hh"
45 #include "G4NeutronCaptureXS.hh"
46 
47 #include "G4PhysListUtil.hh"
48 
49 // factory
51 //
52 
54 
57 
59 : G4VPhysicsConstructor("hInelastic Xtal QGSP_BIC")
60 /* , theNeutrons(0)
61  , theFTFPNeutron(0)
62  , theQGSPNeutron(0)
63  , theBinaryNeutron(0)
64  , thePiK(0)
65  , theFTFPPiK(0)
66  , theQGSPPiK(0)
67  , theBertiniPiK(0)
68  , thePro(0)
69  , theFTFPPro(0)
70  , theQGSPPro(0)
71  , theBinaryPro(0)
72  , theHyperon(0)
73  , theAntiBaryon(0)
74  , theFTFPAntiBaryon(0)
75  , xsNeutronInelasticXS(0)
76  , xsNeutronCaptureXS(0)*/
77 // , QuasiElastic(true)
78 {}
79 
81  const G4String& name, G4bool /* quasiElastic */)
83 /* , theNeutrons(0)
84  , theFTFPNeutron(0)
85  , theQGSPNeutron(0)
86  , theBinaryNeutron(0)
87  , thePiK(0)
88  , theFTFPPiK(0)
89  , theQGSPPiK(0)
90  , theBertiniPiK(0)
91  , thePro(0)
92  , theFTFPPro(0)
93  , theQGSPPro(0)
94  , theBinaryPro(0)
95  , theHyperon(0)
96  , theAntiBaryon(0)
97  , theFTFPAntiBaryon(0)
98  , xsNeutronInelasticXS(0)
99  , xsNeutronCaptureXS(0)*/
100 // , QuasiElastic(quasiElastic)
101 {}
102 
104 {
105  G4bool quasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
106  G4bool quasiElasticQGS= true; // For QGS, it must use it.
107 
108  const G4double maxFTFP = 25.0*GeV;
109  const G4double minFTFP = 9.5*GeV;
110  const G4double maxBIC = 9.9*GeV;
111  const G4double maxBERT = 5.0*GeV;
112 
115  new G4QGSPNeutronBuilder(quasiElasticQGS));
117  new G4FTFPNeutronBuilder(quasiElasticFTF));
120 
124 
127  new G4QGSPProtonBuilder(quasiElasticQGS));
129  new G4FTFPProtonBuilder(quasiElasticFTF));
130  tpdata->theFTFPPro->SetMinEnergy(minFTFP);
131  tpdata->theFTFPPro->SetMaxEnergy(maxFTFP);
132 
134  tpdata->theBinaryPro->SetMaxEnergy(maxBIC);
135 
138  new G4QGSPPiKBuilder(quasiElasticQGS));
140  new G4FTFPPiKBuilder(quasiElasticFTF));
141  tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP);
143  new G4BertiniPiKBuilder);
144  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
145 
147 
150  new G4FTFPAntiBarionBuilder(quasiElasticFTF));
151 }
152 
154 {
155  if(tpdata) delete tpdata;
156 }
157 
159 {
160  G4MesonConstructor pMesonConstructor;
161  pMesonConstructor.ConstructParticle();
162 
163  G4BaryonConstructor pBaryonConstructor;
164  pBaryonConstructor.ConstructParticle();
165 
166  G4ShortLivedConstructor pShortLivedConstructor;
167  pShortLivedConstructor.ConstructParticle();
168 
169  G4IonConstructor pIonConstructor;
170  pIonConstructor.ConstructParticle();
171 }
172 
173 #include "G4ProcessManager.hh"
175 {
176  if ( tpdata == 0 ) tpdata = new ThreadPrivate;
177  CreateModels();
179  tpdata->thePro->Build();
180  tpdata->thePiK->Build();
181  tpdata->theHyperon->Build();
183 
184  // --- Neutrons ---
188 
189  G4HadronicProcess* capture = 0;
191  G4ProcessVector* pv = pmanager->GetProcessList();
192  for ( size_t i=0; i < static_cast<size_t>(pv->size()); ++i ) {
193  if ( fCapture == ((*pv)[i])->GetProcessSubType() ) {
194  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
195  }
196  }
197  if ( ! capture ) {
198  capture = new G4HadronCaptureProcess("nCapture");
199  pmanager->AddDiscreteProcess(capture);
200  }
203  capture->RegisterMe(new G4NeutronRadCapture());
204 }
205 
void RegisterMe(G4VPiKBuilder *aB)
static G4ThreadLocal ThreadPrivate * tpdata
void RegisterMe(G4VAntiBarionBuilder *aB)
G4String name
Definition: TRTMaterials.hh:40
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
void SetMinEnergy(G4double aM)
G4_DECLARE_PHYSCONSTR_FACTORY(ExExChHadronPhysicsQGSP_BIC)
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)
static G4HadronicProcess * FindInelasticProcess(const G4ParticleDefinition *)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
void RegisterMe(G4VProtonBuilder *aB)
bool G4bool
Definition: G4Types.hh:79
void SetMaxEnergy(G4double aM)
static const double GeV
Definition: G4SIunits.hh:196
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
void SetMaxEnergy(G4double aM)
void SetMinEnergy(G4double aM)
G4int size() const
void SetMaxEnergy(G4double aM)
void RegisterMe(G4VNeutronBuilder *aB)
double G4double
Definition: G4Types.hh:76
G4ProcessVector * GetProcessList() const
void SetMaxEnergy(G4double aM)