Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 /// \file hadronic/Hadr02/src/HadronPhysicsUrQ 26 /// \file hadronic/Hadr02/src/HadronPhysicsUrQMD.cc 27 /// \brief Implementation of the HadronPhysics 27 /// \brief Implementation of the HadronPhysicsUrQMD class 28 // 28 // >> 29 // $Id$ 29 // 30 // 30 //-------------------------------------------- 31 //--------------------------------------------------------------------------- 31 // 32 // 32 // ClassName: << 33 // ClassName: 33 // 34 // 34 // Author: 2012 A. Dotti 35 // Author: 2012 A. Dotti 35 // created from HadronPhysicsUrQMD 36 // created from HadronPhysicsUrQMD 36 // 37 // 37 // Modified: 38 // Modified: 38 // 39 // 39 //-------------------------------------------- 40 //---------------------------------------------------------------------------- 40 // 41 // 41 #ifdef G4_USE_URQMD 42 #ifdef G4_USE_URQMD 42 # include "HadronPhysicsUrQMD.hh" << 43 #include "HadronPhysicsUrQMD.hh" 43 44 44 # include "G4BaryonConstructor.hh" << 45 #include "globals.hh" 45 # include "G4ChipsKaonMinusInelasticXS.hh" << 46 #include "G4ios.hh" 46 # include "G4ChipsKaonPlusInelasticXS.hh" << 47 #include <iomanip> 47 # include "G4ChipsKaonZeroInelasticXS.hh" << 48 #include "G4ParticleDefinition.hh" 48 # include "G4CrossSectionDataSetRegistry.hh" << 49 #include "G4ParticleTable.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 50 59 # include <iomanip> << 51 #include "G4MesonConstructor.hh" >> 52 #include "G4BaryonConstructor.hh" >> 53 #include "G4ShortLivedConstructor.hh" >> 54 >> 55 #include "G4QHadronInelasticDataSet.hh" >> 56 #include "G4ProcessManager.hh" 60 57 61 //....oooOO0OOooo........oooOO0OOooo........oo 58 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 62 59 63 HadronPhysicsUrQMD::HadronPhysicsUrQMD(G4int) << 60 HadronPhysicsUrQMD::HadronPhysicsUrQMD(G4int) >> 61 : G4VPhysicsConstructor("hInelastic UrQMD") 64 { 62 { 65 fNeutrons = 0; 63 fNeutrons = 0; 66 fUrQMDNeutron = 0; 64 fUrQMDNeutron = 0; >> 65 fLEPNeutron = 0; 67 fPiK = 0; 66 fPiK = 0; 68 fUrQMDPiK = 0; 67 fUrQMDPiK = 0; 69 fPro = 0; 68 fPro = 0; 70 fUrQMDPro = 0; << 69 fUrQMDPro = 0; 71 fHyperon = 0; 70 fHyperon = 0; 72 fFTFPHyperon = 0; << 73 fAntiBaryon = 0; 71 fAntiBaryon = 0; >> 72 fUrQMDAntiBaryon = 0; >> 73 fCHIPSInelastic = 0; 74 } 74 } 75 75 76 //....oooOO0OOooo........oooOO0OOooo........oo 76 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 77 77 78 void HadronPhysicsUrQMD::CreateModels() 78 void HadronPhysicsUrQMD::CreateModels() 79 { 79 { 80 fNeutrons = new G4NeutronBuilder; << 80 fNeutrons=new G4NeutronBuilder; 81 fUrQMDNeutron = new UrQMDNeutronBuilder(); << 81 fUrQMDNeutron=new UrQMDNeutronBuilder(); 82 fNeutrons->RegisterMe(fUrQMDNeutron); 82 fNeutrons->RegisterMe(fUrQMDNeutron); >> 83 //Need LEP for capture process >> 84 fNeutrons->RegisterMe(fLEPNeutron=new G4LEPNeutronBuilder); >> 85 fLEPNeutron->SetMinInelasticEnergy(0.0*eV); // no inelastic from LEP >> 86 fLEPNeutron->SetMaxInelasticEnergy(0.0*eV); 83 87 84 fPro = new G4ProtonBuilder; << 88 fPro=new G4ProtonBuilder; 85 fUrQMDPro = new UrQMDProtonBuilder(); << 89 fUrQMDPro=new UrQMDProtonBuilder(); 86 fPro->RegisterMe(fUrQMDPro); 90 fPro->RegisterMe(fUrQMDPro); 87 91 88 fPiK = new G4PiKBuilder; << 92 fPiK=new G4PiKBuilder; 89 fUrQMDPiK = new UrQMDPiKBuilder(); << 93 fUrQMDPiK=new UrQMDPiKBuilder(); 90 fPiK->RegisterMe(fUrQMDPiK); 94 fPiK->RegisterMe(fUrQMDPiK); 91 << 95 92 // For Hyperons use FTF model << 96 //For Hyperons use FTF model 93 fHyperon = new G4HyperonBuilder; << 97 fHyperon=new G4HyperonFTFPBuilder; 94 fFTFPHyperon = new G4HyperonFTFPBuilder; << 98 95 fHyperon->RegisterMe(fFTFPHyperon); << 99 fAntiBaryon=new G4AntiBarionBuilder; 96 << 100 fUrQMDAntiBaryon=new UrQMDAntiBarionBuilder(); 97 fAntiBaryon = new G4AntiBarionBuilder; << 101 fAntiBaryon->RegisterMe( fUrQMDAntiBaryon ); 98 fUrQMDAntiBaryon = new UrQMDAntiBarionBuilde << 99 fAntiBaryon->RegisterMe(fUrQMDAntiBaryon); << 100 } 102 } 101 103 102 //....oooOO0OOooo........oooOO0OOooo........oo 104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 103 105 104 HadronPhysicsUrQMD::~HadronPhysicsUrQMD() 106 HadronPhysicsUrQMD::~HadronPhysicsUrQMD() 105 { 107 { 106 delete fNeutrons; 108 delete fNeutrons; 107 delete fUrQMDNeutron; 109 delete fUrQMDNeutron; >> 110 delete fLEPNeutron; 108 111 109 delete fPiK; 112 delete fPiK; 110 delete fUrQMDPiK; 113 delete fUrQMDPiK; 111 << 114 112 delete fPro; 115 delete fPro; 113 delete fUrQMDPro; << 116 delete fUrQMDPro; 114 << 117 115 delete fHyperon; 118 delete fHyperon; 116 delete fFTFPHyperon; << 117 delete fAntiBaryon; 119 delete fAntiBaryon; 118 delete fUrQMDAntiBaryon; 120 delete fUrQMDAntiBaryon; >> 121 >> 122 delete fCHIPSInelastic; 119 } 123 } 120 124 121 //....oooOO0OOooo........oooOO0OOooo........oo 125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 122 126 123 void HadronPhysicsUrQMD::ConstructParticle() 127 void HadronPhysicsUrQMD::ConstructParticle() 124 { 128 { 125 G4MesonConstructor pMesonConstructor; 129 G4MesonConstructor pMesonConstructor; 126 pMesonConstructor.ConstructParticle(); 130 pMesonConstructor.ConstructParticle(); 127 131 128 G4BaryonConstructor pBaryonConstructor; 132 G4BaryonConstructor pBaryonConstructor; 129 pBaryonConstructor.ConstructParticle(); 133 pBaryonConstructor.ConstructParticle(); 130 134 131 G4ShortLivedConstructor pShortLivedConstruct 135 G4ShortLivedConstructor pShortLivedConstructor; 132 pShortLivedConstructor.ConstructParticle(); << 136 pShortLivedConstructor.ConstructParticle(); 133 } 137 } 134 138 135 //....oooOO0OOooo........oooOO0OOooo........oo 139 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 136 140 137 void HadronPhysicsUrQMD::ConstructProcess() 141 void HadronPhysicsUrQMD::ConstructProcess() 138 { 142 { 139 CreateModels(); 143 CreateModels(); 140 fNeutrons->Build(); 144 fNeutrons->Build(); 141 fPro->Build(); 145 fPro->Build(); 142 fPiK->Build(); 146 fPiK->Build(); 143 << 144 // use CHIPS cross sections also for Kaons 147 // use CHIPS cross sections also for Kaons 145 ChipsKaonMinus = G4CrossSectionDataSetRegist << 148 fCHIPSInelastic = new G4QHadronInelasticDataSet(); 146 G4ChipsKaonMinusInelasticXS::Default_Name( << 149 147 ChipsKaonPlus = G4CrossSectionDataSetRegistr << 150 FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(fCHIPSInelastic); 148 G4ChipsKaonPlusInelasticXS::Default_Name() << 151 FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(fCHIPSInelastic); 149 ChipsKaonZero = G4CrossSectionDataSetRegistr << 152 FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(fCHIPSInelastic); 150 G4ChipsKaonZeroInelasticXS::Default_Name() << 153 FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(fCHIPSInelastic); 151 // << 152 << 153 G4PhysListUtil::FindInelasticProcess(G4KaonM << 154 G4PhysListUtil::FindInelasticProcess(G4KaonP << 155 G4PhysListUtil::FindInelasticProcess(G4KaonZ << 156 G4PhysListUtil::FindInelasticProcess(G4KaonZ << 157 154 158 fHyperon->Build(); 155 fHyperon->Build(); 159 fAntiBaryon->Build(); 156 fAntiBaryon->Build(); 160 } 157 } 161 158 162 //....oooOO0OOooo........oooOO0OOooo........oo 159 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 163 160 164 G4HadronicProcess* HadronPhysicsUrQMD::FindIne << 161 G4HadronicProcess* >> 162 HadronPhysicsUrQMD::FindInelasticProcess(const G4ParticleDefinition* p) 165 { 163 { 166 G4HadronicProcess* had = 0; 164 G4HadronicProcess* had = 0; 167 if (p) { << 165 if(p) { 168 G4ProcessVector* pvec = p->GetProcessManag << 166 G4ProcessVector* pvec = p->GetProcessManager()->GetProcessList(); 169 size_t n = pvec->size(); << 167 size_t n = pvec->size(); 170 if (0 < n) { << 168 if(0 < n) { 171 for (size_t i = 0; i < n; ++i) { << 169 for(size_t i=0; i<n; ++i) { 172 if (fHadronInelastic == ((*pvec)[i])-> << 170 if(fHadronInelastic == ((*pvec)[i])->GetProcessSubType()) { 173 had = static_cast<G4HadronicProcess* << 171 had = static_cast<G4HadronicProcess*>((*pvec)[i]); 174 break; << 172 break; 175 } << 173 } 176 } << 174 } 177 } << 175 } 178 } 176 } 179 return had; 177 return had; 180 } 178 } 181 179 182 #endif // G4_USE_URQMD << 180 #endif //G4_USE_URQMD 183 181