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 // 29 // 30 //-------------------------------------------- 30 //--------------------------------------------------------------------------- 31 // 31 // 32 // ClassName: << 32 // ClassName: 33 // 33 // 34 // Author: 2012 A. Dotti 34 // Author: 2012 A. Dotti 35 // created from HadronPhysicsUrQMD 35 // created from HadronPhysicsUrQMD 36 // 36 // 37 // Modified: 37 // Modified: 38 // 38 // 39 //-------------------------------------------- 39 //---------------------------------------------------------------------------- 40 // 40 // 41 #ifdef G4_USE_URQMD 41 #ifdef G4_USE_URQMD 42 # include "HadronPhysicsUrQMD.hh" << 42 #include "HadronPhysicsUrQMD.hh" 43 43 44 # include "G4BaryonConstructor.hh" << 44 #include "globals.hh" 45 # include "G4ChipsKaonMinusInelasticXS.hh" << 45 #include "G4ios.hh" 46 # include "G4ChipsKaonPlusInelasticXS.hh" << 46 #include <iomanip> 47 # include "G4ChipsKaonZeroInelasticXS.hh" << 47 #include "G4ParticleDefinition.hh" 48 # include "G4CrossSectionDataSetRegistry.hh" << 48 #include "G4ParticleTable.hh" 49 # include "G4MesonConstructor.hh" << 49 #include "G4PhysicalConstants.hh" 50 # include "G4ParticleDefinition.hh" << 50 #include "G4SystemOfUnits.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 51 59 # include <iomanip> << 52 #include "G4MesonConstructor.hh" >> 53 #include "G4BaryonConstructor.hh" >> 54 #include "G4ShortLivedConstructor.hh" >> 55 >> 56 #include "G4ChipsKaonMinusInelasticXS.hh" >> 57 #include "G4ChipsKaonPlusInelasticXS.hh" >> 58 #include "G4ChipsKaonZeroInelasticXS.hh" >> 59 #include "G4CrossSectionDataSetRegistry.hh" >> 60 >> 61 #include "G4ProcessManager.hh" 60 62 61 //....oooOO0OOooo........oooOO0OOooo........oo 63 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 62 64 63 HadronPhysicsUrQMD::HadronPhysicsUrQMD(G4int) << 65 HadronPhysicsUrQMD::HadronPhysicsUrQMD(G4int) >> 66 : G4VPhysicsConstructor("hInelastic UrQMD") 64 { 67 { 65 fNeutrons = 0; 68 fNeutrons = 0; 66 fUrQMDNeutron = 0; 69 fUrQMDNeutron = 0; 67 fPiK = 0; 70 fPiK = 0; 68 fUrQMDPiK = 0; 71 fUrQMDPiK = 0; 69 fPro = 0; 72 fPro = 0; 70 fUrQMDPro = 0; << 73 fUrQMDPro = 0; 71 fHyperon = 0; 74 fHyperon = 0; 72 fFTFPHyperon = 0; 75 fFTFPHyperon = 0; 73 fAntiBaryon = 0; 76 fAntiBaryon = 0; 74 } 77 } 75 78 76 //....oooOO0OOooo........oooOO0OOooo........oo 79 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 77 80 78 void HadronPhysicsUrQMD::CreateModels() 81 void HadronPhysicsUrQMD::CreateModels() 79 { 82 { 80 fNeutrons = new G4NeutronBuilder; << 83 fNeutrons=new G4NeutronBuilder; 81 fUrQMDNeutron = new UrQMDNeutronBuilder(); << 84 fUrQMDNeutron=new UrQMDNeutronBuilder(); // put fission and capture here 82 fNeutrons->RegisterMe(fUrQMDNeutron); 85 fNeutrons->RegisterMe(fUrQMDNeutron); 83 86 84 fPro = new G4ProtonBuilder; << 87 fPro=new G4ProtonBuilder; 85 fUrQMDPro = new UrQMDProtonBuilder(); << 88 fUrQMDPro=new UrQMDProtonBuilder(); 86 fPro->RegisterMe(fUrQMDPro); 89 fPro->RegisterMe(fUrQMDPro); 87 90 88 fPiK = new G4PiKBuilder; << 91 fPiK=new G4PiKBuilder; 89 fUrQMDPiK = new UrQMDPiKBuilder(); << 92 fUrQMDPiK=new UrQMDPiKBuilder(); 90 fPiK->RegisterMe(fUrQMDPiK); 93 fPiK->RegisterMe(fUrQMDPiK); 91 << 94 92 // For Hyperons use FTF model << 95 //For Hyperons use FTF model 93 fHyperon = new G4HyperonBuilder; << 96 fHyperon=new G4HyperonBuilder; 94 fFTFPHyperon = new G4HyperonFTFPBuilder; << 97 fFTFPHyperon=new G4HyperonFTFPBuilder; 95 fHyperon->RegisterMe(fFTFPHyperon); << 98 fHyperon->RegisterMe( fFTFPHyperon ); 96 << 99 97 fAntiBaryon = new G4AntiBarionBuilder; << 100 fAntiBaryon=new G4AntiBarionBuilder; 98 fUrQMDAntiBaryon = new UrQMDAntiBarionBuilde << 101 fUrQMDAntiBaryon=new UrQMDAntiBarionBuilder(); 99 fAntiBaryon->RegisterMe(fUrQMDAntiBaryon); << 102 fAntiBaryon->RegisterMe( fUrQMDAntiBaryon ); 100 } 103 } 101 104 102 //....oooOO0OOooo........oooOO0OOooo........oo 105 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 103 106 104 HadronPhysicsUrQMD::~HadronPhysicsUrQMD() 107 HadronPhysicsUrQMD::~HadronPhysicsUrQMD() 105 { 108 { 106 delete fNeutrons; 109 delete fNeutrons; 107 delete fUrQMDNeutron; 110 delete fUrQMDNeutron; 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; 119 delete fFTFPHyperon; 117 delete fAntiBaryon; 120 delete fAntiBaryon; 118 delete fUrQMDAntiBaryon; 121 delete fUrQMDAntiBaryon; 119 } 122 } 120 123 121 //....oooOO0OOooo........oooOO0OOooo........oo 124 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 122 125 123 void HadronPhysicsUrQMD::ConstructParticle() 126 void HadronPhysicsUrQMD::ConstructParticle() 124 { 127 { 125 G4MesonConstructor pMesonConstructor; 128 G4MesonConstructor pMesonConstructor; 126 pMesonConstructor.ConstructParticle(); 129 pMesonConstructor.ConstructParticle(); 127 130 128 G4BaryonConstructor pBaryonConstructor; 131 G4BaryonConstructor pBaryonConstructor; 129 pBaryonConstructor.ConstructParticle(); 132 pBaryonConstructor.ConstructParticle(); 130 133 131 G4ShortLivedConstructor pShortLivedConstruct 134 G4ShortLivedConstructor pShortLivedConstructor; 132 pShortLivedConstructor.ConstructParticle(); << 135 pShortLivedConstructor.ConstructParticle(); 133 } 136 } 134 137 135 //....oooOO0OOooo........oooOO0OOooo........oo 138 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 136 139 137 void HadronPhysicsUrQMD::ConstructProcess() 140 void HadronPhysicsUrQMD::ConstructProcess() 138 { 141 { 139 CreateModels(); 142 CreateModels(); 140 fNeutrons->Build(); 143 fNeutrons->Build(); 141 fPro->Build(); 144 fPro->Build(); 142 fPiK->Build(); 145 fPiK->Build(); 143 << 146 144 // use CHIPS cross sections also for Kaons 147 // use CHIPS cross sections also for Kaons 145 ChipsKaonMinus = G4CrossSectionDataSetRegist << 148 ChipsKaonMinus = G4CrossSectionDataSetRegistry::Instance()-> 146 G4ChipsKaonMinusInelasticXS::Default_Name( << 149 GetCrossSectionDataSet(G4ChipsKaonMinusInelasticXS::Default_Name()); 147 ChipsKaonPlus = G4CrossSectionDataSetRegistr << 150 ChipsKaonPlus = G4CrossSectionDataSetRegistry::Instance()-> 148 G4ChipsKaonPlusInelasticXS::Default_Name() << 151 GetCrossSectionDataSet(G4ChipsKaonPlusInelasticXS::Default_Name()); 149 ChipsKaonZero = G4CrossSectionDataSetRegistr << 152 ChipsKaonZero = G4CrossSectionDataSetRegistry::Instance()-> 150 G4ChipsKaonZeroInelasticXS::Default_Name() << 153 GetCrossSectionDataSet(G4ChipsKaonZeroInelasticXS::Default_Name()); 151 // << 154 // 152 << 155 153 G4PhysListUtil::FindInelasticProcess(G4KaonM << 156 G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())-> 154 G4PhysListUtil::FindInelasticProcess(G4KaonP << 157 AddDataSet(ChipsKaonMinus); 155 G4PhysListUtil::FindInelasticProcess(G4KaonZ << 158 G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())-> 156 G4PhysListUtil::FindInelasticProcess(G4KaonZ << 159 AddDataSet(ChipsKaonPlus); >> 160 G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())-> >> 161 AddDataSet(ChipsKaonZero ); >> 162 G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())-> >> 163 AddDataSet(ChipsKaonZero ); 157 164 158 fHyperon->Build(); 165 fHyperon->Build(); 159 fAntiBaryon->Build(); 166 fAntiBaryon->Build(); 160 } 167 } 161 168 162 //....oooOO0OOooo........oooOO0OOooo........oo 169 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 163 170 164 G4HadronicProcess* HadronPhysicsUrQMD::FindIne << 171 G4HadronicProcess* >> 172 HadronPhysicsUrQMD::FindInelasticProcess(const G4ParticleDefinition* p) 165 { 173 { 166 G4HadronicProcess* had = 0; 174 G4HadronicProcess* had = 0; 167 if (p) { << 175 if(p) { 168 G4ProcessVector* pvec = p->GetProcessManag << 176 G4ProcessVector* pvec = p->GetProcessManager()->GetProcessList(); 169 size_t n = pvec->size(); << 177 size_t n = pvec->size(); 170 if (0 < n) { << 178 if(0 < n) { 171 for (size_t i = 0; i < n; ++i) { << 179 for(size_t i=0; i<n; ++i) { 172 if (fHadronInelastic == ((*pvec)[i])-> << 180 if(fHadronInelastic == ((*pvec)[i])->GetProcessSubType()) { 173 had = static_cast<G4HadronicProcess* << 181 had = static_cast<G4HadronicProcess*>((*pvec)[i]); 174 break; << 182 break; 175 } << 183 } 176 } << 184 } 177 } << 185 } 178 } 186 } 179 return had; 187 return had; 180 } 188 } 181 189 182 #endif // G4_USE_URQMD << 190 #endif //G4_USE_URQMD 183 191