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/HadronPhysicsHIJ 26 /// \file hadronic/Hadr02/src/HadronPhysicsHIJING.cc 27 /// \brief Implementation of the HadronPhysics 27 /// \brief Implementation of the HadronPhysicsHIJING class 28 // 28 // >> 29 // $Id: HadronPhysicsHIJING.cc,v 1.4 2010-06-15 11:03:50 vnivanch Exp $ >> 30 // GEANT4 tag $Name: not supported by cvs2svn $ 29 // 31 // 30 //-------------------------------------------- 32 //--------------------------------------------------------------------------- 31 // 33 // 32 // ClassName: << 34 // ClassName: 33 // 35 // 34 // Author: 2012 A. Dotti 36 // Author: 2012 A. Dotti 35 // created from HadronPhysicsHIJING 37 // created from HadronPhysicsHIJING 36 // 38 // 37 // Modified: 39 // Modified: 38 // 40 // 39 //-------------------------------------------- 41 //---------------------------------------------------------------------------- 40 // 42 // 41 #ifdef G4_USE_HIJING 43 #ifdef G4_USE_HIJING 42 # include "HadronPhysicsHIJING.hh" << 44 #include "HadronPhysicsHIJING.hh" 43 45 44 # include "G4AntiBarionBuilder.hh" << 46 #include "globals.hh" 45 # include "G4BaryonConstructor.hh" << 47 #include "G4ios.hh" 46 # include "G4BertiniNeutronBuilder.hh" << 48 #include <iomanip> 47 # include "G4BertiniPiKBuilder.hh" << 49 #include "G4ParticleDefinition.hh" 48 # include "G4BertiniProtonBuilder.hh" << 50 #include "G4ParticleTable.hh" 49 # include "G4ChipsKaonMinusInelasticXS.hh" << 51 50 # include "G4ChipsKaonPlusInelasticXS.hh" << 52 #include "G4MesonConstructor.hh" 51 # include "G4ChipsKaonZeroInelasticXS.hh" << 53 #include "G4BaryonConstructor.hh" 52 # include "G4CrossSectionDataSetRegistry.hh" << 54 #include "G4ShortLivedConstructor.hh" 53 # include "G4FTFPAntiBarionBuilder.hh" << 55 #include "G4ChipsKaonMinusInelasticXS.hh" 54 # include "G4FTFPNeutronBuilder.hh" << 56 #include "G4ChipsKaonPlusInelasticXS.hh" 55 # include "G4FTFPPiKBuilder.hh" << 57 #include "G4ChipsKaonZeroInelasticXS.hh" 56 # include "G4FTFPProtonBuilder.hh" << 58 #include "G4CrossSectionDataSetRegistry.hh" 57 # include "G4HyperonFTFPBuilder.hh" << 59 58 # include "G4MesonConstructor.hh" << 60 #include "G4ProcessManager.hh" 59 # include "G4NeutronBuilder.hh" << 61 #include "G4PhysListUtil.hh" 60 # include "G4ParticleDefinition.hh" << 62 61 # include "G4ParticleTable.hh" << 63 #include "G4PiKBuilder.hh" 62 # include "G4PhysListUtil.hh" << 64 #include "G4FTFPPiKBuilder.hh" 63 # include "G4PiKBuilder.hh" << 65 #include "G4QGSPPiKBuilder.hh" 64 # include "G4ProcessManager.hh" << 66 #include "G4BertiniPiKBuilder.hh" 65 # include "G4ProtonBuilder.hh" << 67 66 # include "G4QGSPNeutronBuilder.hh" << 68 #include "G4ProtonBuilder.hh" 67 # include "G4QGSPPiKBuilder.hh" << 69 #include "G4FTFPProtonBuilder.hh" 68 # include "G4QGSPProtonBuilder.hh" << 70 #include "G4QGSPProtonBuilder.hh" 69 # include "G4ShortLivedConstructor.hh" << 71 #include "G4BertiniProtonBuilder.hh" 70 # include "G4ios.hh" << 72 71 # include "globals.hh" << 73 #include "G4NeutronBuilder.hh" >> 74 #include "G4FTFPNeutronBuilder.hh" >> 75 #include "G4QGSPNeutronBuilder.hh" >> 76 #include "G4BertiniNeutronBuilder.hh" >> 77 >> 78 #include "G4HyperonFTFPBuilder.hh" >> 79 #include "G4AntiBarionBuilder.hh" >> 80 #include "G4FTFPAntiBarionBuilder.hh" 72 81 73 # include <iomanip> << 82 HadronPhysicsHIJING::HadronPhysicsHIJING(G4int) 74 << 83 : G4VPhysicsConstructor("hInelastic HIJING") 75 HadronPhysicsHIJING::HadronPhysicsHIJING(G4int << 76 { 84 { 77 fNeutrons = 0; 85 fNeutrons = 0; 78 fHIJINGNeutron = 0; 86 fHIJINGNeutron = 0; 79 fPiK = 0; 87 fPiK = 0; 80 fHIJINGPiK = 0; 88 fHIJINGPiK = 0; 81 fPro = 0; 89 fPro = 0; 82 fHIJINGPro = 0; << 90 fHIJINGPro = 0; 83 fHyperon = 0; 91 fHyperon = 0; 84 fFTFPHyperon = 0; << 85 fAntiBaryon = 0; 92 fAntiBaryon = 0; 86 fHIJINGAntiBaryon = 0; 93 fHIJINGAntiBaryon = 0; 87 fCHIPSInelastic = 0; 94 fCHIPSInelastic = 0; 88 } 95 } 89 96 90 //....oooOO0OOooo........oooOO0OOooo........oo 97 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 91 98 92 void HadronPhysicsHIJING::CreateModels() 99 void HadronPhysicsHIJING::CreateModels() 93 { 100 { 94 G4bool quasiElasFTF = false; 101 G4bool quasiElasFTF = false; 95 G4bool quasiElasQGS = true; 102 G4bool quasiElasQGS = true; 96 G4double minFTFP = 6 * GeV; << 103 G4double minFTFP = 6*GeV; 97 G4double maxBERT = 8 * GeV; << 104 G4double maxBERT = 8*GeV; 98 G4double minHIJING = 12 * GeV; << 105 G4double minHIJING = 12*GeV; 99 G4double minQGSP = 12 * GeV; << 106 G4double minQGSP = 12*GeV; 100 G4double maxFTFP = 25 * GeV; << 107 G4double maxFTFP = 25*GeV; 101 << 108 102 // Proton << 109 //Proton 103 fPro = new G4ProtonBuilder; << 110 fPro=new G4ProtonBuilder; 104 fHIJINGPro = new HIJINGProtonBuilder(); << 111 fHIJINGPro=new HIJINGProtonBuilder(); 105 fHIJINGPro->SetMinEnergy(minHIJING); 112 fHIJINGPro->SetMinEnergy(minHIJING); 106 fPro->RegisterMe(fHIJINGPro); 113 fPro->RegisterMe(fHIJINGPro); 107 G4FTFPProtonBuilder* FTFPPro = new G4FTFPPro << 114 G4FTFPProtonBuilder* FTFPPro=new G4FTFPProtonBuilder(quasiElasFTF); 108 FTFPPro->SetMinEnergy(minFTFP); << 115 FTFPPro->SetMinEnergy( minFTFP ); 109 FTFPPro->SetMaxEnergy(maxFTFP); << 116 FTFPPro->SetMaxEnergy( maxFTFP ); 110 fPro->RegisterMe(FTFPPro); << 117 fPro->RegisterMe( FTFPPro ); 111 G4BertiniProtonBuilder* BertPro = new G4Bert 118 G4BertiniProtonBuilder* BertPro = new G4BertiniProtonBuilder(); 112 BertPro->SetMaxEnergy(maxBERT); << 119 BertPro->SetMaxEnergy( maxBERT ); 113 120 114 fNeutrons = new G4NeutronBuilder; << 121 fNeutrons=new G4NeutronBuilder; 115 fHIJINGNeutron = new HIJINGNeutronBuilder(); << 122 fHIJINGNeutron=new HIJINGNeutronBuilder(); 116 fHIJINGNeutron->SetMinEnergy(minHIJING); 123 fHIJINGNeutron->SetMinEnergy(minHIJING); 117 fNeutrons->RegisterMe(fHIJINGNeutron); 124 fNeutrons->RegisterMe(fHIJINGNeutron); 118 // G4QGSPNeutronBuilder* QGSPNeu = new G4QGS << 125 //G4QGSPNeutronBuilder* QGSPNeu = new G4QGSPNeutronBuilder(quasiElasQGS); 119 // QGSPNeu->SetMinEnergy(minQGSP); << 126 //QGSPNeu->SetMinEnergy(minQGSP); 120 // fNeutrons->RegisterMe(QGSPNeu); << 127 //fNeutrons->RegisterMe(QGSPNeu); 121 G4FTFPNeutronBuilder* FTFPNeu = new G4FTFPNe 128 G4FTFPNeutronBuilder* FTFPNeu = new G4FTFPNeutronBuilder(quasiElasFTF); 122 FTFPNeu->SetMinEnergy(minFTFP); << 129 FTFPNeu->SetMinEnergy( minFTFP ); 123 FTFPNeu->SetMaxEnergy(maxFTFP); << 130 FTFPNeu->SetMaxEnergy( maxFTFP ); 124 fNeutrons->RegisterMe(FTFPNeu); << 131 fNeutrons->RegisterMe( FTFPNeu ); 125 G4BertiniNeutronBuilder* BertNeu = new G4Ber 132 G4BertiniNeutronBuilder* BertNeu = new G4BertiniNeutronBuilder(); 126 BertNeu->SetMaxEnergy(maxBERT); << 133 BertNeu->SetMaxEnergy( maxBERT ); 127 134 128 fPiK = new G4PiKBuilder; << 135 fPiK=new G4PiKBuilder; 129 G4QGSPPiKBuilder* QGSPPiK = new G4QGSPPiKBui << 136 G4QGSPPiKBuilder* QGSPPiK=new G4QGSPPiKBuilder(quasiElasQGS); 130 fPiK->RegisterMe(QGSPPiK); 137 fPiK->RegisterMe(QGSPPiK); 131 QGSPPiK->SetMinEnergy(minQGSP); 138 QGSPPiK->SetMinEnergy(minQGSP); 132 G4FTFPPiKBuilder* FTFPPiK = new G4FTFPPiKBui << 139 G4FTFPPiKBuilder* FTFPPiK=new G4FTFPPiKBuilder(quasiElasFTF); 133 fPiK->RegisterMe(FTFPPiK); 140 fPiK->RegisterMe(FTFPPiK); 134 FTFPPiK->SetMaxEnergy(maxFTFP); 141 FTFPPiK->SetMaxEnergy(maxFTFP); 135 FTFPPiK->SetMinEnergy(minFTFP); << 142 FTFPPiK->SetMinEnergy(minFTFP); 136 G4BertiniPiKBuilder* BertiniPiK = new G4Bert << 143 G4BertiniPiKBuilder* BertiniPiK=new G4BertiniPiKBuilder(); 137 fPiK->RegisterMe(BertiniPiK); 144 fPiK->RegisterMe(BertiniPiK); 138 BertiniPiK->SetMaxEnergy(maxBERT); 145 BertiniPiK->SetMaxEnergy(maxBERT); 139 146 140 // For Hyperons use FTF model << 147 //For Hyperons use FTF model 141 fHyperon = new G4HyperonBuilder; << 148 fHyperon=new G4HyperonFTFPBuilder; 142 fFTFPHyperon = new G4HyperonFTFPBuilder; << 149 143 fHyperon->RegisterMe(fFTFPHyperon); << 150 fAntiBaryon=new G4AntiBarionBuilder; 144 << 151 //FTFPAntiBaryon=new G4FTFPAntiBarionBuilder(quasiElasFTF); 145 fAntiBaryon = new G4AntiBarionBuilder; << 146 // FTFPAntiBaryon=new G4FTFPAntiBarionBuilde << 147 G4FTFPAntiBarionBuilder* FTFPAB = new G4FTFP 152 G4FTFPAntiBarionBuilder* FTFPAB = new G4FTFPAntiBarionBuilder(quasiElasFTF); 148 fAntiBaryon->RegisterMe(FTFPAB); << 153 fAntiBaryon->RegisterMe( FTFPAB ); 149 } 154 } 150 155 151 //....oooOO0OOooo........oooOO0OOooo........oo 156 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 152 157 153 HadronPhysicsHIJING::~HadronPhysicsHIJING() 158 HadronPhysicsHIJING::~HadronPhysicsHIJING() 154 { 159 { 155 delete fNeutrons; 160 delete fNeutrons; 156 delete fHIJINGNeutron; 161 delete fHIJINGNeutron; 157 162 158 delete fPiK; 163 delete fPiK; 159 delete fHIJINGPiK; 164 delete fHIJINGPiK; 160 << 165 161 delete fPro; 166 delete fPro; 162 delete fHIJINGPro; << 167 delete fHIJINGPro; 163 << 168 164 delete fHyperon; 169 delete fHyperon; 165 delete fFTFPHyperon; << 166 delete fAntiBaryon; 170 delete fAntiBaryon; 167 delete fHIJINGAntiBaryon; 171 delete fHIJINGAntiBaryon; 168 << 172 169 delete fCHIPSInelastic; 173 delete fCHIPSInelastic; 170 } 174 } 171 175 172 //....oooOO0OOooo........oooOO0OOooo........oo 176 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 173 177 174 void HadronPhysicsHIJING::ConstructParticle() 178 void HadronPhysicsHIJING::ConstructParticle() 175 { 179 { 176 G4MesonConstructor pMesonConstructor; 180 G4MesonConstructor pMesonConstructor; 177 pMesonConstructor.ConstructParticle(); 181 pMesonConstructor.ConstructParticle(); 178 182 179 G4BaryonConstructor pBaryonConstructor; 183 G4BaryonConstructor pBaryonConstructor; 180 pBaryonConstructor.ConstructParticle(); 184 pBaryonConstructor.ConstructParticle(); 181 185 182 G4ShortLivedConstructor pShortLivedConstruct 186 G4ShortLivedConstructor pShortLivedConstructor; 183 pShortLivedConstructor.ConstructParticle(); << 187 pShortLivedConstructor.ConstructParticle(); 184 } 188 } 185 189 186 //....oooOO0OOooo........oooOO0OOooo........oo 190 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 187 191 188 void HadronPhysicsHIJING::ConstructProcess() 192 void HadronPhysicsHIJING::ConstructProcess() 189 { 193 { 190 CreateModels(); 194 CreateModels(); 191 fNeutrons->Build(); 195 fNeutrons->Build(); 192 fPro->Build(); 196 fPro->Build(); 193 fPiK->Build(); 197 fPiK->Build(); 194 198 195 // use CHIPS cross sections also for Kaons << 199 // use CHIPS cross sections also for Kaons 196 G4VCrossSectionDataSet* ChipsKaonMinus = << 200 G4VCrossSectionDataSet* ChipsKaonMinus = 197 G4CrossSectionDataSetRegistry::Instance()- << 201 G4CrossSectionDataSetRegistry::Instance()-> 198 G4ChipsKaonMinusInelasticXS::Default_Nam << 202 GetCrossSectionDataSet(G4ChipsKaonMinusInelasticXS::Default_Name()); 199 G4VCrossSectionDataSet* ChipsKaonPlus = << 203 G4VCrossSectionDataSet* ChipsKaonPlus = 200 G4CrossSectionDataSetRegistry::Instance()- << 204 G4CrossSectionDataSetRegistry::Instance()-> 201 G4ChipsKaonPlusInelasticXS::Default_Name << 205 GetCrossSectionDataSet(G4ChipsKaonPlusInelasticXS::Default_Name()); 202 G4VCrossSectionDataSet* ChipsKaonZero = << 206 G4VCrossSectionDataSet* ChipsKaonZero = 203 G4CrossSectionDataSetRegistry::Instance()- << 207 G4CrossSectionDataSetRegistry::Instance()-> 204 G4ChipsKaonZeroInelasticXS::Default_Name << 208 GetCrossSectionDataSet(G4ChipsKaonZeroInelasticXS::Default_Name()); 205 // << 209 // 206 << 210 207 G4PhysListUtil::FindInelasticProcess(G4KaonM << 211 G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())-> 208 G4PhysListUtil::FindInelasticProcess(G4KaonP << 212 AddDataSet(ChipsKaonMinus); 209 G4PhysListUtil::FindInelasticProcess(G4KaonZ << 213 G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())-> 210 G4PhysListUtil::FindInelasticProcess(G4KaonZ << 214 AddDataSet(ChipsKaonPlus); 211 << 215 G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())-> >> 216 AddDataSet(ChipsKaonZero ); >> 217 G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())-> >> 218 AddDataSet(ChipsKaonZero ); >> 219 212 fHyperon->Build(); 220 fHyperon->Build(); 213 fAntiBaryon->Build(); 221 fAntiBaryon->Build(); 214 } 222 } 215 223 216 //....oooOO0OOooo........oooOO0OOooo........oo 224 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 217 225 218 G4HadronicProcess* HadronPhysicsHIJING::FindIn << 226 G4HadronicProcess* >> 227 HadronPhysicsHIJING::FindInelasticProcess(const G4ParticleDefinition* p) 219 { 228 { 220 G4HadronicProcess* had = 0; 229 G4HadronicProcess* had = 0; 221 if (p) { << 230 if(p) { 222 G4ProcessVector* pvec = p->GetProcessManag << 231 G4ProcessVector* pvec = p->GetProcessManager()->GetProcessList(); 223 size_t n = pvec->size(); << 232 size_t n = pvec->size(); 224 if (0 < n) { << 233 if(0 < n) { 225 for (size_t i = 0; i < n; ++i) { << 234 for(size_t i=0; i<n; ++i) { 226 if (fHadronInelastic == ((*pvec)[i])-> << 235 if(fHadronInelastic == ((*pvec)[i])->GetProcessSubType()) { 227 had = static_cast<G4HadronicProcess* << 236 had = static_cast<G4HadronicProcess*>((*pvec)[i]); 228 << 237 229 break; << 238 break; 230 } << 239 } 231 } << 240 } 232 } << 241 } 233 } 242 } 234 return had; 243 return had; 235 } 244 } 236 245 237 #endif // G4_USE_HIJING << 246 #endif //G4_USE_HIJING 238 247