Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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: G4HadronInelasticQBBC.cc 71043 2013-06-10 09:29:56Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName: G4HadronInelasticQBBC
31 //
32 // Author: 2 October 2009 V. Ivanchenko
33 //
34 // Modified:
35 //
36 //----------------------------------------------------------------------------
37 //
38 
39 #include "G4HadronInelasticQBBC.hh"
40 
41 #include "G4SystemOfUnits.hh"
42 
44 #include "G4HadronicInteraction.hh"
45 
46 #include "G4ParticleDefinition.hh"
47 #include "G4ProcessManager.hh"
48 
50 #include "G4BGGPionInelasticXS.hh"
51 
52 #include "G4NeutronInelasticXS.hh"
53 #include "G4NeutronCaptureXS.hh"
54 
60 #include "G4CrossSectionPairGG.hh"
62 
63 #include "G4QGSBuilder.hh"
64 #include "G4FTFBuilder.hh"
65 
71 
72 #include "G4CascadeInterface.hh"
73 #include "G4BinaryCascade.hh"
74 #include "G4NeutronRadCapture.hh"
75 
76 #include "G4PreCompoundModel.hh"
77 #include "G4ExcitationHandler.hh"
78 #include "G4Evaporation.hh"
80 
81 // factory
83 //
85 
86 G4ThreadLocal G4ComponentAntiNuclNuclearXS* G4HadronInelasticQBBC::theAntiNuclXS = 0;
87 G4ThreadLocal G4bool G4HadronInelasticQBBC::wasActivated=false;
88 
90  : G4VHadronPhysics("hInelastic"),verbose(ver)
91 {
92  htype = "QBBC";
93  theAntiNuclXS = 0;
94 }
95 
98  : G4VHadronPhysics("hInelastic"),verbose(ver)
99 {
100  htype = name;
101  theAntiNuclXS = 0;
102 }
103 
105 {
106  delete theAntiNuclXS;
107 }
108 
110 {
111  if(wasActivated) return;
112  wasActivated = true;
113 
114  if(verbose > 1) {
115  G4cout << "### HadronInelasticQBBC Construct Process with type <"
116  << htype << ">" << G4endl;
117  }
118 
119  G4double emax = 100.*TeV;
120 
121 
122  //G4cout << "G4HadronInelasticQBBC::ConstructProcess new PRECO"<< G4endl;
123 
124  // PreCompound and Evaporation models are instantiated here
125  G4PreCompoundModel* thePreCompound = 0;
128  thePreCompound = static_cast<G4PreCompoundModel*>(p);
129  if(!thePreCompound) { thePreCompound = new G4PreCompoundModel(); }
130  //G4ExcitationHandler* handler = thePreCompound->GetExcitationHandler();
131 
132  // configure models
133  //G4HadronicInteraction* theQGSP =
134  // BuildModel(new G4QGSBuilder("QGSP",thePreCompound,true,false),12.5*GeV,emax);
135  G4HadronicInteraction* theFTFP =
136  BuildModel(new G4FTFBuilder("FTFP",thePreCompound),3.0*GeV,emax);
137  G4HadronicInteraction* theFTFP1 =
138  BuildModel(new G4FTFBuilder("FTFP",thePreCompound),3.0*GeV,emax);
139  G4HadronicInteraction* theFTFP2 =
140  BuildModel(new G4FTFBuilder("FTFP",thePreCompound),0.0,emax);
141 
142  G4HadronicInteraction* theBERT =
143  NewModel(new G4CascadeInterface(),1.0*GeV,12.0*GeV);
144  G4HadronicInteraction* theBERT1 =
145  NewModel(new G4CascadeInterface(),0.0*GeV,12.0*GeV);
146 
147  //G4cout << "G4HadronInelasticQBBC::ConstructProcess new Binary"<< G4endl;
148  G4BinaryCascade* bic = new G4BinaryCascade(thePreCompound);
149  G4HadronicInteraction* theBIC = NewModel(bic,0.0,1.5*GeV);
150 
151  // cross sections
152  theAntiNuclXS = new G4ComponentAntiNuclNuclearXS();
153  G4CrossSectionInelastic* anucxs =
154  new G4CrossSectionInelastic(theAntiNuclXS);
155 
156  // loop over particles
157  aParticleIterator->reset();
158  while( (*aParticleIterator)() ) {
159  G4ParticleDefinition* particle = aParticleIterator->value();
160  G4String pname = particle->GetParticleName();
161  //G4ProcessManager* pmanager = particle->GetProcessManager();
162  if(verbose > 1) {
163  G4cout << "### HadronInelasticQBBC: " << pname << G4endl;
164  }
165 
166  //
167  // model and X-section configuration per particle type
168  //
169  if(pname == "proton") {
170  G4HadronicProcess* hp = FindInelasticProcess(particle);
171  hp->AddDataSet(new G4BGGNucleonInelasticXS(particle));
172 
173  //hp->RegisterMe(theQGSP);
174  hp->RegisterMe(theFTFP);
175  hp->RegisterMe(theBERT);
176  hp->RegisterMe(theBIC);
177 
178  } else if(pname == "neutron") {
179  G4HadronicProcess* hp = FindInelasticProcess(particle);
180  hp->AddDataSet(new G4NeutronInelasticXS());
181  //hp->RegisterMe(theQGSP);
182  hp->RegisterMe(theFTFP);
183 
185  capture->AddDataSet(new G4NeutronCaptureXS());
186  hp->RegisterMe(theBERT);
187  hp->RegisterMe(theBIC);
188  capture->RegisterMe(new G4NeutronRadCapture());
189 
190  } else if(pname == "pi-" || pname == "pi+") {
191  G4HadronicProcess* hp = FindInelasticProcess(particle);
192 // hp->AddDataSet(new G4BGGPionInelasticXS(particle));
194  //hp->RegisterMe(theQGSP);
195  hp->RegisterMe(theFTFP);
196  hp->RegisterMe(theBERT1);
197 
198  } else if(pname == "kaon-" ) {
199  G4HadronicProcess* hp = FindInelasticProcess(particle);
200  hp->RegisterMe(theFTFP1);
201  hp->RegisterMe(theBERT1);
203 
204  } else if(pname == "kaon+" ) {
205  G4HadronicProcess* hp = FindInelasticProcess(particle);
206  hp->RegisterMe(theFTFP1);
207  hp->RegisterMe(theBERT1);
209 
210  } else if(pname == "kaon0S" ||
211  pname == "kaon0L") {
212  G4HadronicProcess* hp = FindInelasticProcess(particle);
213  hp->RegisterMe(theFTFP1);
214  hp->RegisterMe(theBERT1);
216 
217  } else if(pname == "lambda" ||
218  pname == "omega-" ||
219  pname == "sigma-" ||
220  pname == "sigma+" ||
221  pname == "sigma0" ||
222  pname == "xi-" ||
223  pname == "xi0") {
224  G4HadronicProcess* hp = FindInelasticProcess(particle);
225  hp->RegisterMe(theFTFP1);
226  hp->RegisterMe(theBERT1);
228 
229  } else if(pname == "anti_alpha" ||
230  pname == "anti_deuteron"||
231  pname == "anti_He3" ||
232  pname == "anti_proton" ||
233  pname == "anti_triton" ||
234  pname == "anti_lambda" ||
235  pname == "anti_neutron" ||
236  pname == "anti_omega-" ||
237  pname == "anti_sigma-" ||
238  pname == "anti_sigma+" ||
239  pname == "anti_xi-" ||
240  pname == "anti_xi0"
241  ) {
242 
243  G4HadronicProcess* hp = FindInelasticProcess(particle);
244  hp->RegisterMe(theFTFP2);
245  hp->AddDataSet(anucxs);
246 
247  }
248  }
249 }
G4HadronicProcess * FindCaptureProcess()
const char * p
Definition: xmltok.h:285
const XML_Char * name
#define G4ThreadLocal
Definition: tls.hh:52
int G4int
Definition: G4Types.hh:78
const G4String & GetParticleName() const
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronInelasticQBBC)
void RegisterMe(G4HadronicInteraction *a)
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
#define aParticleIterator
static G4CrossSectionDataSetRegistry * Instance()
G4HadronicProcess * FindInelasticProcess(const G4String &)
string pname
Definition: eplot.py:33
G4HadronicInteraction * FindModel(const G4String &name)
G4HadronicInteraction * NewModel(G4HadronicInteraction *, G4double emin, G4double emax)
static G4HadronicInteractionRegistry * Instance()
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4HadronicInteraction * BuildModel(G4VHadronModelBuilder *, G4double emin, G4double emax)