Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 /// \file hadronic/Hadr02/src/HadronPhysicsUrQ 27 /// \brief Implementation of the HadronPhysics 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 "G4BaryonConstructor.hh" 45 # include "G4ChipsKaonMinusInelasticXS.hh" 46 # include "G4ChipsKaonPlusInelasticXS.hh" 47 # include "G4ChipsKaonZeroInelasticXS.hh" 48 # include "G4CrossSectionDataSetRegistry.hh" 49 # include "G4MesonConstructor.hh" 50 # include "G4ParticleDefinition.hh" 51 # include "G4ParticleTable.hh" 52 # include "G4PhysicalConstants.hh" 53 # include "G4ProcessManager.hh" 54 # include "G4ShortLivedConstructor.hh" 55 # include "G4SystemOfUnits.hh" 56 # include "G4ios.hh" 57 # include "globals.hh" 58 59 # include <iomanip> 60 61 //....oooOO0OOooo........oooOO0OOooo........oo 62 63 HadronPhysicsUrQMD::HadronPhysicsUrQMD(G4int) 64 { 65 fNeutrons = 0; 66 fUrQMDNeutron = 0; 67 fPiK = 0; 68 fUrQMDPiK = 0; 69 fPro = 0; 70 fUrQMDPro = 0; 71 fHyperon = 0; 72 fFTFPHyperon = 0; 73 fAntiBaryon = 0; 74 } 75 76 //....oooOO0OOooo........oooOO0OOooo........oo 77 78 void HadronPhysicsUrQMD::CreateModels() 79 { 80 fNeutrons = new G4NeutronBuilder; 81 fUrQMDNeutron = new UrQMDNeutronBuilder(); 82 fNeutrons->RegisterMe(fUrQMDNeutron); 83 84 fPro = new G4ProtonBuilder; 85 fUrQMDPro = new UrQMDProtonBuilder(); 86 fPro->RegisterMe(fUrQMDPro); 87 88 fPiK = new G4PiKBuilder; 89 fUrQMDPiK = new UrQMDPiKBuilder(); 90 fPiK->RegisterMe(fUrQMDPiK); 91 92 // For Hyperons use FTF model 93 fHyperon = new G4HyperonBuilder; 94 fFTFPHyperon = new G4HyperonFTFPBuilder; 95 fHyperon->RegisterMe(fFTFPHyperon); 96 97 fAntiBaryon = new G4AntiBarionBuilder; 98 fUrQMDAntiBaryon = new UrQMDAntiBarionBuilde 99 fAntiBaryon->RegisterMe(fUrQMDAntiBaryon); 100 } 101 102 //....oooOO0OOooo........oooOO0OOooo........oo 103 104 HadronPhysicsUrQMD::~HadronPhysicsUrQMD() 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 fFTFPHyperon; 117 delete fAntiBaryon; 118 delete fUrQMDAntiBaryon; 119 } 120 121 //....oooOO0OOooo........oooOO0OOooo........oo 122 123 void HadronPhysicsUrQMD::ConstructParticle() 124 { 125 G4MesonConstructor pMesonConstructor; 126 pMesonConstructor.ConstructParticle(); 127 128 G4BaryonConstructor pBaryonConstructor; 129 pBaryonConstructor.ConstructParticle(); 130 131 G4ShortLivedConstructor pShortLivedConstruct 132 pShortLivedConstructor.ConstructParticle(); 133 } 134 135 //....oooOO0OOooo........oooOO0OOooo........oo 136 137 void HadronPhysicsUrQMD::ConstructProcess() 138 { 139 CreateModels(); 140 fNeutrons->Build(); 141 fPro->Build(); 142 fPiK->Build(); 143 144 // use CHIPS cross sections also for Kaons 145 ChipsKaonMinus = G4CrossSectionDataSetRegist 146 G4ChipsKaonMinusInelasticXS::Default_Name( 147 ChipsKaonPlus = G4CrossSectionDataSetRegistr 148 G4ChipsKaonPlusInelasticXS::Default_Name() 149 ChipsKaonZero = G4CrossSectionDataSetRegistr 150 G4ChipsKaonZeroInelasticXS::Default_Name() 151 // 152 153 G4PhysListUtil::FindInelasticProcess(G4KaonM 154 G4PhysListUtil::FindInelasticProcess(G4KaonP 155 G4PhysListUtil::FindInelasticProcess(G4KaonZ 156 G4PhysListUtil::FindInelasticProcess(G4KaonZ 157 158 fHyperon->Build(); 159 fAntiBaryon->Build(); 160 } 161 162 //....oooOO0OOooo........oooOO0OOooo........oo 163 164 G4HadronicProcess* HadronPhysicsUrQMD::FindIne 165 { 166 G4HadronicProcess* had = 0; 167 if (p) { 168 G4ProcessVector* pvec = p->GetProcessManag 169 size_t n = pvec->size(); 170 if (0 < n) { 171 for (size_t i = 0; i < n; ++i) { 172 if (fHadronInelastic == ((*pvec)[i])-> 173 had = static_cast<G4HadronicProcess* 174 break; 175 } 176 } 177 } 178 } 179 return had; 180 } 181 182 #endif // G4_USE_URQMD 183