Geant4 Cross Reference |
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 /// \file hadronic/Hadr02/src/HadronPhysicsUrQMD.cc 27 /// \brief Implementation of the HadronPhysicsUrQMD class 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........oooOO0OOooo........oooOO0OOooo...... 62 63 HadronPhysicsUrQMD::HadronPhysicsUrQMD(G4int) : G4VPhysicsConstructor("hInelastic UrQMD") 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........oooOO0OOooo........oooOO0OOooo...... 77 78 void HadronPhysicsUrQMD::CreateModels() 79 { 80 fNeutrons = new G4NeutronBuilder; 81 fUrQMDNeutron = new UrQMDNeutronBuilder(); // put fission and capture here 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 UrQMDAntiBarionBuilder(); 99 fAntiBaryon->RegisterMe(fUrQMDAntiBaryon); 100 } 101 102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 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........oooOO0OOooo........oooOO0OOooo...... 122 123 void HadronPhysicsUrQMD::ConstructParticle() 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 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 = G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet( 146 G4ChipsKaonMinusInelasticXS::Default_Name()); 147 ChipsKaonPlus = G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet( 148 G4ChipsKaonPlusInelasticXS::Default_Name()); 149 ChipsKaonZero = G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet( 150 G4ChipsKaonZeroInelasticXS::Default_Name()); 151 // 152 153 G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(ChipsKaonMinus); 154 G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(ChipsKaonPlus); 155 G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(ChipsKaonZero); 156 G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(ChipsKaonZero); 157 158 fHyperon->Build(); 159 fAntiBaryon->Build(); 160 } 161 162 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 163 164 G4HadronicProcess* HadronPhysicsUrQMD::FindInelasticProcess(const G4ParticleDefinition* p) 165 { 166 G4HadronicProcess* had = 0; 167 if (p) { 168 G4ProcessVector* pvec = p->GetProcessManager()->GetProcessList(); 169 size_t n = pvec->size(); 170 if (0 < n) { 171 for (size_t i = 0; i < n; ++i) { 172 if (fHadronInelastic == ((*pvec)[i])->GetProcessSubType()) { 173 had = static_cast<G4HadronicProcess*>((*pvec)[i]); 174 break; 175 } 176 } 177 } 178 } 179 return had; 180 } 181 182 #endif // G4_USE_URQMD 183