source: trunk/source/physics_lists/lists/src/G4HadronInelasticQBBC.cc @ 1205

Last change on this file since 1205 was 1205, checked in by garnier, 15 years ago

CVS update

File size: 7.2 KB
Line 
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,v 1.24 2009/11/25 18:55:56 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-03-cand-03 $
28//
29//---------------------------------------------------------------------------
30//
31// ClassName:   G4HadronInelasticQBBC
32//
33// Author: 2 October 2009 V. Ivanchenko
34//
35// Modified:
36//
37//----------------------------------------------------------------------------
38//
39
40#include "G4HadronInelasticQBBC.hh"
41
42#include "G4HadronInelasticProcess.hh"
43#include "G4HadronicInteraction.hh"
44
45#include "G4ParticleDefinition.hh"
46#include "G4ProcessManager.hh"
47
48#include "G4BGGNucleonInelasticXS.hh"
49#include "G4BGGPionInelasticXS.hh"
50//#include "G4UInelasticCrossSection.hh"
51#include "G4NeutronInelasticXS.hh"
52#include "G4NeutronCaptureXS.hh"
53
54#include "G4ProtonInelasticCrossSection.hh"
55#include "G4NeutronInelasticCrossSection.hh"
56#include "G4PiNuclearCrossSection.hh"
57
58#include "G4QGSBuilder.hh"
59#include "G4FTFBuilder.hh"
60
61#include "G4QStringChipsParticleLevelInterface.hh"
62#include "G4CascadeInterface.hh"
63#include "G4BinaryCascade.hh"
64#include "G4LCapture.hh"
65#include "G4NeutronRadCapture.hh"
66
67enum QBBCType
68{
69  fQBBC = 0,
70  fQBBC_XGG,
71  fQBBC_XGGSN
72};
73
74G4HadronInelasticQBBC::G4HadronInelasticQBBC(const G4String& name, G4int ver, 
75    G4bool, G4bool,G4bool, G4bool, G4bool)
76  : G4VHadronPhysics("hInelastic"),verbose(ver),wasActivated(false)
77{
78  htype = name;
79}
80
81G4HadronInelasticQBBC::~G4HadronInelasticQBBC()
82{}
83
84void G4HadronInelasticQBBC::ConstructProcess()
85{
86  if(wasActivated) return;
87  wasActivated = true;
88
89  // select type
90  QBBCType fType = fQBBC;
91  if("QBBC_XGG" == htype)        { fType = fQBBC_XGG; }
92  else if("QBBC_XGGSN" == htype) { fType = fQBBC_XGGSN; }
93
94  if(verbose > 1) {
95    G4cout << "### HadronInelasticQBBC Construct Process with type <"
96           << htype << ">" << G4endl;
97  }
98
99  // configure models
100  G4HadronicInteraction* theQGSP = 
101    BuildModel(new G4QGSBuilder("QGSP",true,false),9.5*GeV,100.*TeV);
102  G4HadronicInteraction* theFTFP = 
103    BuildModel(new G4FTFBuilder("FTFP"),4.5*GeV,25.*GeV);
104  G4HadronicInteraction* theFTFP1 = 
105    BuildModel(new G4FTFBuilder("FTFP"),4.5*GeV,100.*TeV);
106  G4HadronicInteraction* theBERT = 
107    NewModel(new G4CascadeInterface(),0.0,6.5*GeV);
108  //G4HadronicInteraction* theBERT1 =
109  //  NewModel(new G4CascadeInterface(),2.5*GeV,6.5*GeV);
110  //G4HadronicInteraction* theBIC =
111  //  NewModel(new G4BinaryCascade(),0.0,3.5*GeV);
112  G4HadronicInteraction* theCHIPS = 
113    NewModel(new G4QStringChipsParticleLevelInterface(),0.0,7.5*GeV);
114
115  // loop over particles
116  theParticleIterator->reset();
117  while( (*theParticleIterator)() ) {
118    G4ParticleDefinition* particle = theParticleIterator->value();
119    G4String pname = particle->GetParticleName();
120    if(verbose > 1) { G4cout << "### HadronInelasticQBBC:  " << pname << G4endl; }
121    if(pname == "anti_lambda"  ||
122       pname == "anti_neutron" ||
123       pname == "anti_omega-"  || 
124       pname == "anti_proton"  || 
125       pname == "anti_sigma-"  || 
126       pname == "anti_sigma+"  || 
127       pname == "anti_xi-"  || 
128       pname == "anti_xi0"  || 
129       pname == "kaon-"     || 
130       pname == "kaon+"     || 
131       pname == "kaon0S"    || 
132       pname == "kaon0L"    || 
133       pname == "lambda"    || 
134       pname == "neutron"   || 
135       pname == "omega-"    || 
136       pname == "pi-"       || 
137       pname == "pi+"       || 
138       pname == "proton"    || 
139       pname == "sigma-"    || 
140       pname == "sigma+"    || 
141       pname == "sigma0"    || 
142       pname == "xi-"       || 
143       pname == "xi0") {
144     
145      // common for all particles
146      G4HadronicProcess* hp = FindInelasticProcess(particle);
147      if(!hp) { continue; }
148      G4ProcessManager* pmanager = particle->GetProcessManager();
149      pmanager->AddDiscreteProcess(hp);
150
151      // model and X-section configuration
152      if(pname == "proton") {
153        if(fType == fQBBC) { 
154          hp->AddDataSet(new G4ProtonInelasticCrossSection()); 
155        } else {
156          hp->AddDataSet(new G4BGGNucleonInelasticXS(particle));
157        }
158        hp->RegisterMe(theQGSP);
159        hp->RegisterMe(theFTFP);
160        hp->RegisterMe(theBERT);
161        //      hp->RegisterMe(theBERT1);
162        //      hp->RegisterMe(theBIC);
163
164      } else if(pname == "neutron") {
165        if(fType == fQBBC) { 
166          hp->AddDataSet(new G4NeutronInelasticCrossSection()); 
167        } else if(fType == fQBBC_XGG) {
168          hp->AddDataSet(new G4BGGNucleonInelasticXS(particle));
169        } else {
170          hp->AddDataSet(new G4NeutronInelasticXS());
171        }
172
173        hp->RegisterMe(theQGSP);
174        hp->RegisterMe(theFTFP);
175        //      hp->RegisterMe(theBERT1);
176       
177        G4HadronicProcess* capture = FindCaptureProcess();
178        pmanager->AddDiscreteProcess(capture);
179
180        hp->RegisterMe(theBERT);
181        //hp->RegisterMe(theBIC);
182        capture->RegisterMe(new G4NeutronRadCapture());
183        //capture->RegisterMe(new G4LCapture());
184        if(fType == fQBBC_XGGSN) {
185          capture->AddDataSet(new G4NeutronCaptureXS());
186        }
187
188      } else if(pname == "pi-" || pname == "pi+") {
189        if(fType == fQBBC) { 
190          hp->AddDataSet(new G4PiNuclearCrossSection()); 
191        } else {
192          hp->AddDataSet(new G4BGGPionInelasticXS(particle));
193        }
194        hp->RegisterMe(theQGSP);
195        hp->RegisterMe(theFTFP);
196        hp->RegisterMe(theBERT);
197
198      } else if(pname == "kaon-"     || 
199                pname == "kaon+"     || 
200                pname == "kaon0S"    || 
201                pname == "kaon0L"    ||
202                pname == "lambda"    || 
203                pname == "sigma-"    || 
204                pname == "sigma+"    || 
205                pname == "sigma0"    || 
206                pname == "xi-"       || 
207                pname == "xi0") {
208        hp->RegisterMe(theFTFP1);
209        hp->RegisterMe(theBERT);
210
211      } else {
212        hp->RegisterMe(theFTFP1);
213        hp->RegisterMe(theCHIPS);
214
215      }
216
217      if(verbose > 1) {
218        G4cout << "### HadronInelasticQBBC: " << hp->GetProcessName()
219               << " added for " << pname << G4endl;
220      }
221    }
222  }
223}
Note: See TracBrowser for help on using the repository browser.