ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HadronPhysicsUrQMD.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file HadronPhysicsUrQMD.cc
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 //
30 //---------------------------------------------------------------------------
31 //
32 // ClassName:
33 //
34 // Author: 2012 A. Dotti
35 // created from HadronPhysicsUrQMD
36 //
37 // Modified:
38 //
39 //----------------------------------------------------------------------------
40 //
41 #ifdef G4_USE_URQMD
42 #include "HadronPhysicsUrQMD.hh"
43 
44 #include "globals.hh"
45 #include "G4ios.hh"
46 #include <iomanip>
47 #include "G4ParticleDefinition.hh"
48 #include "G4ParticleTable.hh"
49 #include "G4PhysicalConstants.hh"
50 #include "G4SystemOfUnits.hh"
51 
52 #include "G4MesonConstructor.hh"
53 #include "G4BaryonConstructor.hh"
55 
60 
61 #include "G4ProcessManager.hh"
62 
63 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
64 
66  : G4VPhysicsConstructor("hInelastic UrQMD")
67 {
68  fNeutrons = 0;
69  fUrQMDNeutron = 0;
70  fPiK = 0;
71  fUrQMDPiK = 0;
72  fPro = 0;
73  fUrQMDPro = 0;
74  fHyperon = 0;
75  fAntiBaryon = 0;
76 }
77 
78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
79 
81 {
83  fUrQMDNeutron=new UrQMDNeutronBuilder(); // put fission and capture here
85 
89 
90  fPiK=new G4PiKBuilder;
93 
94  //For Hyperons use FTF model
96 
100 }
101 
102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
103 
105 {
106  delete fNeutrons;
107  delete fUrQMDNeutron;
108 
109  delete fPiK;
110  delete fUrQMDPiK;
111 
112  delete fPro;
113  delete fUrQMDPro;
114 
115  delete fHyperon;
116  delete fAntiBaryon;
117  delete fUrQMDAntiBaryon;
118 }
119 
120 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
121 
123 {
124  G4MesonConstructor pMesonConstructor;
125  pMesonConstructor.ConstructParticle();
126 
127  G4BaryonConstructor pBaryonConstructor;
128  pBaryonConstructor.ConstructParticle();
129 
130  G4ShortLivedConstructor pShortLivedConstructor;
131  pShortLivedConstructor.ConstructParticle();
132 }
133 
134 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
135 
137 {
138  CreateModels();
139  fNeutrons->Build();
140  fPro->Build();
141  fPiK->Build();
142 
143  // use CHIPS cross sections also for Kaons
144  ChipsKaonMinus = G4CrossSectionDataSetRegistry::Instance()->
145  GetCrossSectionDataSet(G4ChipsKaonMinusInelasticXS::Default_Name());
146  ChipsKaonPlus = G4CrossSectionDataSetRegistry::Instance()->
147  GetCrossSectionDataSet(G4ChipsKaonPlusInelasticXS::Default_Name());
148  ChipsKaonZero = G4CrossSectionDataSetRegistry::Instance()->
149  GetCrossSectionDataSet(G4ChipsKaonZeroInelasticXS::Default_Name());
150  //
151 
153  AddDataSet(ChipsKaonMinus);
155  AddDataSet(ChipsKaonPlus);
157  AddDataSet(ChipsKaonZero );
159  AddDataSet(ChipsKaonZero );
160 
161  fHyperon->Build();
162  fAntiBaryon->Build();
163 }
164 
165 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
166 
169 {
170  G4HadronicProcess* had = 0;
171  if(p) {
173  size_t n = pvec->size();
174  if(0 < n) {
175  for(size_t i=0; i<n; ++i) {
176  if(fHadronInelastic == ((*pvec)[i])->GetProcessSubType()) {
177  had = static_cast<G4HadronicProcess*>((*pvec)[i]);
178  break;
179  }
180  }
181  }
182  }
183  return had;
184 }
185 
186 #endif //G4_USE_URQMD