Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HadronPhysicsUrQMD.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 //
28 //
29 // $Id: HadronPhysicsUrQMD.cc 77519 2013-11-25 10:54:57Z gcosmo $
30 //
31 //---------------------------------------------------------------------------
32 //
33 // ClassName:
34 //
35 // Author: 2012 A. Dotti
36 // created from HadronPhysicsUrQMD
37 //
38 // Modified:
39 //
40 //----------------------------------------------------------------------------
41 //
42 #ifdef G4_USE_URQMD
43 #include "HadronPhysicsUrQMD.hh"
44 
45 #include "globals.hh"
46 #include "G4ios.hh"
47 #include <iomanip>
48 #include "G4ParticleDefinition.hh"
49 #include "G4ParticleTable.hh"
50 #include "G4PhysicalConstants.hh"
51 #include "G4SystemOfUnits.hh"
52 
53 #include "G4MesonConstructor.hh"
54 #include "G4BaryonConstructor.hh"
56 
61 
62 #include "G4ProcessManager.hh"
63 
64 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
65 
67  : G4VPhysicsConstructor("hInelastic UrQMD")
68 {
69  fNeutrons = 0;
70  fUrQMDNeutron = 0;
71  fPiK = 0;
72  fUrQMDPiK = 0;
73  fPro = 0;
74  fUrQMDPro = 0;
75  fHyperon = 0;
76  fAntiBaryon = 0;
77 }
78 
79 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
80 
81 void HadronPhysicsUrQMD::CreateModels()
82 {
83  fNeutrons=new G4NeutronBuilder;
84  fUrQMDNeutron=new UrQMDNeutronBuilder(); // put fission and capture here
85  fNeutrons->RegisterMe(fUrQMDNeutron);
86 
87  fPro=new G4ProtonBuilder;
88  fUrQMDPro=new UrQMDProtonBuilder();
89  fPro->RegisterMe(fUrQMDPro);
90 
91  fPiK=new G4PiKBuilder;
92  fUrQMDPiK=new UrQMDPiKBuilder();
93  fPiK->RegisterMe(fUrQMDPiK);
94 
95  //For Hyperons use FTF model
96  fHyperon=new G4HyperonFTFPBuilder;
97 
98  fAntiBaryon=new G4AntiBarionBuilder;
99  fUrQMDAntiBaryon=new UrQMDAntiBarionBuilder();
100  fAntiBaryon->RegisterMe( fUrQMDAntiBaryon );
101 }
102 
103 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
104 
106 {
107  delete fNeutrons;
108  delete fUrQMDNeutron;
109 
110  delete fPiK;
111  delete fUrQMDPiK;
112 
113  delete fPro;
114  delete fUrQMDPro;
115 
116  delete fHyperon;
117  delete fAntiBaryon;
118  delete fUrQMDAntiBaryon;
119 }
120 
121 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
122 
124 {
125  G4MesonConstructor pMesonConstructor;
126  pMesonConstructor.ConstructParticle();
127 
128  G4BaryonConstructor pBaryonConstructor;
129  pBaryonConstructor.ConstructParticle();
130 
131  G4ShortLivedConstructor pShortLivedConstructor;
132  pShortLivedConstructor.ConstructParticle();
133 }
134 
135 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
136 
138 {
139  CreateModels();
140  fNeutrons->Build();
141  fPro->Build();
142  fPiK->Build();
143 
144  // use CHIPS cross sections also for Kaons
145  ChipsKaonMinus = G4CrossSectionDataSetRegistry::Instance()->
146  GetCrossSectionDataSet(G4ChipsKaonMinusInelasticXS::Default_Name());
147  ChipsKaonPlus = G4CrossSectionDataSetRegistry::Instance()->
148  GetCrossSectionDataSet(G4ChipsKaonPlusInelasticXS::Default_Name());
149  ChipsKaonZero = G4CrossSectionDataSetRegistry::Instance()->
150  GetCrossSectionDataSet(G4ChipsKaonZeroInelasticXS::Default_Name());
151  //
152 
154  AddDataSet(ChipsKaonMinus);
156  AddDataSet(ChipsKaonPlus);
158  AddDataSet(ChipsKaonZero );
160  AddDataSet(ChipsKaonZero );
161 
162  fHyperon->Build();
163  fAntiBaryon->Build();
164 }
165 
166 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
167 
169 HadronPhysicsUrQMD::FindInelasticProcess(const G4ParticleDefinition* p)
170 {
171  G4HadronicProcess* had = 0;
172  if(p) {
174  size_t n = pvec->size();
175  if(0 < n) {
176  for(size_t i=0; i<n; ++i) {
177  if(fHadronInelastic == ((*pvec)[i])->GetProcessSubType()) {
178  had = static_cast<G4HadronicProcess*>((*pvec)[i]);
179  break;
180  }
181  }
182  }
183  }
184  return had;
185 }
186 
187 #endif //G4_USE_URQMD
HadronPhysicsUrQMD(G4int verbose=1)
Definition of the HadronPhysicsUrQMD class.
const char * p
Definition: xmltok.h:285
static G4KaonZeroLong * KaonZeroLong()
static void ConstructParticle()
static void ConstructParticle()
int G4int
Definition: G4Types.hh:78
static G4KaonMinus * KaonMinus()
Definition: G4KaonMinus.cc:113
static G4HadronicProcess * FindInelasticProcess(const G4ParticleDefinition *)
static G4KaonZeroShort * KaonZeroShort()
static G4CrossSectionDataSetRegistry * Instance()
const G4int n
G4int size() const
virtual ~HadronPhysicsUrQMD()
G4ProcessManager * GetProcessManager() const
virtual void ConstructProcess()
void RegisterMe(G4VAntiBarionBuilder *aB)
void RegisterMe(G4VPiKBuilder *aB)
Definition: G4PiKBuilder.hh:58
void RegisterMe(G4VProtonBuilder *aB)
void RegisterMe(G4VNeutronBuilder *aB)
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4ProcessVector * GetProcessList() const
virtual void ConstructParticle()