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