source: trunk/source/physics_lists/lists/src/HadronPhysicsShielding.cc @ 1340

Last change on this file since 1340 was 1340, checked in by garnier, 14 years ago

update ti head

File size: 6.0 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: HadronPhysicsShielding.cc,v 1.1 2010/06/08 16:06:18 gunter Exp $
27// GEANT4 tag $Name: geant4-09-04-beta-01 $
28//
29//---------------------------------------------------------------------------
30//
31// ClassName:   
32//
33// Author: 2010 Tatsumi Koi, Gunter Folger
34//   created from HadronPhysicsFTFP_BERT
35//
36// Modified:
37//
38//----------------------------------------------------------------------------
39//
40#include "HadronPhysicsShielding.hh"
41
42#include "globals.hh"
43#include "G4ios.hh"
44#include <iomanip>  
45#include "G4ParticleDefinition.hh"
46#include "G4ParticleTable.hh"
47
48#include "G4MesonConstructor.hh"
49#include "G4BaryonConstructor.hh"
50#include "G4ShortLivedConstructor.hh"
51
52#include "G4QHadronInelasticDataSet.hh"
53#include "G4BGGNucleonInelasticXS.hh"
54#include "G4NeutronHPJENDLHEInelasticData.hh"
55HadronPhysicsShielding::HadronPhysicsShielding(G4int)
56                    :  G4VPhysicsConstructor("hInelastic Shielding")
57                     , QuasiElastic(false)
58{}
59
60HadronPhysicsShielding::HadronPhysicsShielding(const G4String& name, G4bool quasiElastic)
61                    :  G4VPhysicsConstructor(name) , QuasiElastic(quasiElastic)
62{}
63
64void HadronPhysicsShielding::CreateModels()
65{
66
67  theNeutrons=new G4NeutronBuilder;
68  theFTFPNeutron=new G4FTFPNeutronBuilder(QuasiElastic);
69  theNeutrons->RegisterMe(theFTFPNeutron);
70  theNeutrons->RegisterMe(theBertiniNeutron=new G4BertiniNeutronBuilder);
71  theBertiniNeutron->SetMinEnergy(19.9*MeV);
72  theBertiniNeutron->SetMaxEnergy(5*GeV);
73  theNeutrons->RegisterMe(theLEPNeutron=new G4LEPNeutronBuilder);
74  theLEPNeutron->SetMinEnergy(19.9*MeV);
75  theLEPNeutron->SetMinInelasticEnergy(0.0*eV);   // no inelastic from LEP
76  theLEPNeutron->SetMaxInelasticEnergy(0.0*eV); 
77
78  theNeutrons->RegisterMe(theHPNeutron=new G4NeutronHPBuilder);
79
80  thePro=new G4ProtonBuilder;
81  theFTFPPro=new G4FTFPProtonBuilder(QuasiElastic);
82  thePro->RegisterMe(theFTFPPro);
83  thePro->RegisterMe(theBertiniPro=new G4BertiniProtonBuilder);
84  theBertiniPro->SetMaxEnergy(5*GeV);
85
86  thePiK=new G4PiKBuilder;
87  theFTFPPiK=new G4FTFPPiKBuilder(QuasiElastic);
88  thePiK->RegisterMe(theFTFPPiK);
89  thePiK->RegisterMe(theBertiniPiK=new G4BertiniPiKBuilder);
90  theBertiniPiK->SetMaxEnergy(5*GeV);
91 
92  theMiscCHIPS=new G4MiscCHIPSBuilder;
93}
94
95HadronPhysicsShielding::~HadronPhysicsShielding()
96{
97  delete theNeutrons;
98  delete theBertiniNeutron;
99  delete theFTFPNeutron;
100  delete theHPNeutron;
101   
102  delete thePiK;
103  delete theBertiniPiK;
104  delete theFTFPPiK;
105   
106  delete thePro;
107  delete theBertiniPro;
108  delete theFTFPPro;   
109   
110  delete theMiscCHIPS;
111  delete theCHIPSInelastic;
112  delete BGGxsNeutron;
113  delete NeutronHPJENDLHEInelastic;
114  delete BGGxsProton;
115}
116
117void HadronPhysicsShielding::ConstructParticle()
118{
119  G4MesonConstructor pMesonConstructor;
120  pMesonConstructor.ConstructParticle();
121
122  G4BaryonConstructor pBaryonConstructor;
123  pBaryonConstructor.ConstructParticle();
124
125  G4ShortLivedConstructor pShortLivedConstructor;
126  pShortLivedConstructor.ConstructParticle(); 
127}
128
129#include "G4ProcessManager.hh"
130void HadronPhysicsShielding::ConstructProcess()
131{
132  CreateModels();
133  theNeutrons->Build();
134  BGGxsNeutron=new  G4BGGNucleonInelasticXS(G4Neutron::Neutron()); 
135  FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(BGGxsNeutron);
136
137  NeutronHPJENDLHEInelastic=new G4NeutronHPJENDLHEInelasticData;
138  FindInelasticProcess(G4Neutron::Neutron())->AddDataSet(NeutronHPJENDLHEInelastic);
139
140  thePro->Build();
141  BGGxsProton=new G4BGGNucleonInelasticXS(G4Proton::Proton());
142  FindInelasticProcess(G4Proton::Proton())->AddDataSet(BGGxsProton);
143
144  thePiK->Build();
145  // use CHIPS cross sections also for Kaons
146  theCHIPSInelastic = new G4QHadronInelasticDataSet();
147 
148  FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(theCHIPSInelastic);
149  FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(theCHIPSInelastic);
150  FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(theCHIPSInelastic);
151  FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(theCHIPSInelastic);
152
153  theMiscCHIPS->Build();
154}
155G4HadronicProcess* 
156HadronPhysicsShielding::FindInelasticProcess(const G4ParticleDefinition* p)
157{
158  G4HadronicProcess* had = 0;
159  if(p) {
160     G4ProcessVector*  pvec = p->GetProcessManager()->GetProcessList();
161     size_t n = pvec->size();
162     if(0 < n) {
163       for(size_t i=0; i<n; ++i) {
164         if(fHadronInelastic == ((*pvec)[i])->GetProcessSubType()) {
165           had = static_cast<G4HadronicProcess*>((*pvec)[i]);
166           break;
167         }
168       }
169     }
170  }
171  return had;
172}
173
Note: See TracBrowser for help on using the repository browser.