Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
G4HadronInelasticQBBC.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//
30// ClassName: G4HadronInelasticQBBC
31//
32// Author: 2 October 2009 V. Ivanchenko
33//
34// Modified:
35//
36//----------------------------------------------------------------------------
37//
38
40
41#include "G4SystemOfUnits.hh"
42
45
47#include "G4ProcessManager.hh"
48
51
53#include "G4NeutronCaptureXS.hh"
54
55#include "G4QInelastic.hh"
57
65
66#include "G4QGSBuilder.hh"
67#include "G4FTFBuilder.hh"
68
74
75#include "G4CascadeInterface.hh"
76#include "G4BinaryCascade.hh"
77#include "G4LCapture.hh"
79
80#include "G4PreCompoundModel.hh"
82#include "G4Evaporation.hh"
84
85// factory
87//
89
91 : G4VHadronPhysics("hInelastic"),verbose(ver),wasActivated(false)
92{
93 htype = "QBBC";
94 theAntiNuclXS = 0;
95}
96
99 : G4VHadronPhysics("hInelastic"),verbose(ver),wasActivated(false)
100{
101 htype = name;
102 theAntiNuclXS = 0;
103}
104
106{
107 delete theAntiNuclXS;
108}
109
111{
112 if(wasActivated) return;
113 wasActivated = true;
114
115 if(verbose > 1) {
116 G4cout << "### HadronInelasticQBBC Construct Process with type <"
117 << htype << ">" << G4endl;
118 }
119
120 G4double emax = 100.*TeV;
121
122
123 //G4cout << "G4HadronInelasticQBBC::ConstructProcess new PRECO"<< G4endl;
124
125 // PreCompound and Evaporation models are instantiated here
126 G4PreCompoundModel* thePreCompound = 0;
129 thePreCompound = static_cast<G4PreCompoundModel*>(p);
130 if(!thePreCompound) { thePreCompound = new G4PreCompoundModel(); }
131 //G4ExcitationHandler* handler = thePreCompound->GetExcitationHandler();
132
133 // configure models
134 //G4HadronicInteraction* theQGSP =
135 // BuildModel(new G4QGSBuilder("QGSP",thePreCompound,true,false),12.5*GeV,emax);
136 G4HadronicInteraction* theFTFP =
137 BuildModel(new G4FTFBuilder("FTFP",thePreCompound),3.0*GeV,emax);
138 G4HadronicInteraction* theFTFP1 =
139 BuildModel(new G4FTFBuilder("FTFP",thePreCompound),3.0*GeV,emax);
140 G4HadronicInteraction* theFTFP2 =
141 BuildModel(new G4FTFBuilder("FTFP",thePreCompound),0.0,emax);
142
143 G4HadronicInteraction* theBERT =
144 NewModel(new G4CascadeInterface(),1.0*GeV,12.0*GeV);
145 G4HadronicInteraction* theBERT1 =
146 NewModel(new G4CascadeInterface(),0.0*GeV,12.0*GeV);
147
148 //G4cout << "G4HadronInelasticQBBC::ConstructProcess new Binary"<< G4endl;
149 G4BinaryCascade* bic = new G4BinaryCascade(thePreCompound);
150 G4HadronicInteraction* theBIC = NewModel(bic,0.0,1.5*GeV);
151
152 G4QInelastic* theCHIPS = new G4QInelastic();
154 store->RegisterExtraProcess(theCHIPS);
155
156 // cross sections
157 theAntiNuclXS = new G4ComponentAntiNuclNuclearXS();
158 G4CrossSectionInelastic* anucxs =
159 new G4CrossSectionInelastic(theAntiNuclXS);
160
161 // loop over particles
163 while( (*theParticleIterator)() ) {
165 G4String pname = particle->GetParticleName();
166 //G4ProcessManager* pmanager = particle->GetProcessManager();
167 if(verbose > 1) {
168 G4cout << "### HadronInelasticQBBC: " << pname << G4endl;
169 }
170
171 //
172 // model and X-section configuration per particle type
173 //
174 if(pname == "proton") {
176 hp->AddDataSet(new G4BGGNucleonInelasticXS(particle));
177
178 //hp->RegisterMe(theQGSP);
179 hp->RegisterMe(theFTFP);
180 hp->RegisterMe(theBERT);
181 hp->RegisterMe(theBIC);
182
183 } else if(pname == "neutron") {
186 //hp->RegisterMe(theQGSP);
187 hp->RegisterMe(theFTFP);
188
190 capture->AddDataSet(new G4NeutronCaptureXS());
191 hp->RegisterMe(theBERT);
192 hp->RegisterMe(theBIC);
193 capture->RegisterMe(new G4NeutronRadCapture());
194
195 } else if(pname == "pi-" || pname == "pi+") {
197// hp->AddDataSet(new G4BGGPionInelasticXS(particle));
199 //hp->RegisterMe(theQGSP);
200 hp->RegisterMe(theFTFP);
201 hp->RegisterMe(theBERT1);
202
203 } else if(pname == "kaon-" ) {
205 hp->RegisterMe(theFTFP1);
206 hp->RegisterMe(theBERT1);
208
209 } else if(pname == "kaon+" ) {
211 hp->RegisterMe(theFTFP1);
212 hp->RegisterMe(theBERT1);
214
215 } else if(pname == "kaon0S" ||
216 pname == "kaon0L") {
218 hp->RegisterMe(theFTFP1);
219 hp->RegisterMe(theBERT1);
221
222 } else if(pname == "lambda" ||
223 pname == "omega-" ||
224 pname == "sigma-" ||
225 pname == "sigma+" ||
226 pname == "sigma0" ||
227 pname == "xi-" ||
228 pname == "xi0") {
230 hp->RegisterMe(theFTFP1);
231 hp->RegisterMe(theBERT1);
233
234 } else if(pname == "anti_alpha" ||
235 pname == "anti_deuteron"||
236 pname == "anti_He3" ||
237 pname == "anti_proton" ||
238 pname == "anti_triton" ||
239 pname == "anti_lambda" ||
240 pname == "anti_neutron" ||
241 pname == "anti_omega-" ||
242 pname == "anti_sigma-" ||
243 pname == "anti_sigma+" ||
244 pname == "anti_xi-" ||
245 pname == "anti_xi0"
246 ) {
247
249 hp->RegisterMe(theFTFP2);
250 hp->AddDataSet(anucxs);
251
252 //pmanager->AddDiscreteProcess(theCHIPS);
253 //store->RegisterParticleForExtraProcess(theCHIPS,particle);
254 }
255 }
256}
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
static G4CrossSectionDataSetRegistry * Instance()
G4HadronicInteraction * FindModel(const G4String &name)
static G4HadronicInteractionRegistry * Instance()
void RegisterExtraProcess(G4VProcess *)
static G4HadronicProcessStore * Instance()
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
void RegisterMe(G4HadronicInteraction *a)
const G4String & GetParticleName() const
G4HadronicProcess * FindCaptureProcess()
G4HadronicProcess * FindInelasticProcess(const G4String &)
G4HadronicInteraction * BuildModel(G4VHadronModelBuilder *, G4double emin, G4double emax)
G4HadronicInteraction * NewModel(G4HadronicInteraction *, G4double emin, G4double emax)
G4ParticleTable::G4PTblDicIterator * theParticleIterator