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