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 // 27 //--------------------------------------------------------------------------- 28 // 29 // ClassName: G4HadronPhysicsQGSP_BIC 30 // 31 // Author: 2002 J.P. Wellisch 32 // 33 // Modified: 34 // 23.11.2005 G.Folger: migration to non static particles 35 // 08.06.2006 V.Ivanchenko: remove stopping 36 // 25.04.2007 G.Folger: Add code for quasielastic 37 // 31.10.2012 A.Ribon: Use G4MiscBuilder 38 // 19.03.2013 A.Ribon: Replace LEP with FTFP and BERT 39 // 05.05.2020 A.Ribon: Use QGSP for antibaryons at high energies 40 // 07.05.2020 A.Ribon: Use QGSP for hyperons (and anti-hyperons) at high energies 41 // 42 //---------------------------------------------------------------------------- 43 // 44 #include <iomanip> 45 46 #include "G4HadronPhysicsQGSP_BIC.hh" 47 48 #include "G4PiKBuilder.hh" 49 #include "G4FTFPPiKBuilder.hh" 50 #include "G4QGSPPiKBuilder.hh" 51 #include "G4BertiniPiKBuilder.hh" 52 53 #include "G4ProtonBuilder.hh" 54 #include "G4FTFPProtonBuilder.hh" 55 #include "G4QGSPProtonBuilder.hh" 56 #include "G4BinaryProtonBuilder.hh" 57 58 #include "G4NeutronBuilder.hh" 59 #include "G4FTFPNeutronBuilder.hh" 60 #include "G4QGSPNeutronBuilder.hh" 61 #include "G4BinaryNeutronBuilder.hh" 62 #include "globals.hh" 63 #include "G4ios.hh" 64 #include "G4SystemOfUnits.hh" 65 #include "G4ParticleDefinition.hh" 66 #include "G4ParticleTable.hh" 67 68 #include "G4MesonConstructor.hh" 69 #include "G4BaryonConstructor.hh" 70 #include "G4ShortLivedConstructor.hh" 71 #include "G4IonConstructor.hh" 72 73 #include "G4NeutronRadCapture.hh" 74 #include "G4NeutronInelasticXS.hh" 75 #include "G4NeutronCaptureXS.hh" 76 77 #include "G4PhysListUtil.hh" 78 #include "G4HadParticles.hh" 79 #include "G4HadronicParameters.hh" 80 #include "G4HadronicBuilder.hh" 81 #include "G4BuilderType.hh" 82 83 #include "G4PhysicsConstructorFactory.hh" 84 85 G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BIC); 86 87 G4HadronPhysicsQGSP_BIC::G4HadronPhysicsQGSP_BIC(G4int verb) 88 : G4HadronPhysicsQGSP_BIC("hInelastic QGSP_BIC",true) 89 { 90 G4HadronicParameters::Instance()->SetVerboseLevel(verb); 91 } 92 93 G4HadronPhysicsQGSP_BIC::G4HadronPhysicsQGSP_BIC(const G4String& name, G4bool) 94 : G4VPhysicsConstructor(name) 95 { 96 SetPhysicsType(bHadronInelastic); 97 QuasiElasticFTF= false; // Use built-in quasi-elastic (not add-on) 98 QuasiElasticQGS= true; // For QGS, it must use it. 99 G4HadronicParameters* param = G4HadronicParameters::Instance(); 100 minQGSP_proton = minQGSP_neutron = minQGSP_pik = 101 param->GetMinEnergyTransitionQGS_FTF(); 102 maxFTFP_proton = maxFTFP_neutron = maxFTFP_pik = 103 param->GetMaxEnergyTransitionQGS_FTF(); 104 minFTFP_proton = minFTFP_neutron = minFTFP_pik = 105 param->GetMinEnergyTransitionFTF_Cascade(); 106 maxBIC_proton = maxBIC_neutron = maxBERT_pik = 107 param->GetMaxEnergyTransitionFTF_Cascade(); 108 minBIC_proton = minBIC_neutron = 0.0; 109 } 110 111 void G4HadronPhysicsQGSP_BIC::CreateModels() 112 { 113 Neutron(); 114 Proton(); 115 Pion(); 116 Others(); 117 } 118 119 void G4HadronPhysicsQGSP_BIC::Neutron() 120 { 121 G4HadronicParameters* param = G4HadronicParameters::Instance(); 122 G4bool useFactorXS = param->ApplyFactorXS(); 123 124 auto neu = new G4NeutronBuilder; 125 AddBuilder(neu); 126 auto qgs = new G4QGSPNeutronBuilder(QuasiElasticQGS); 127 AddBuilder(qgs); 128 qgs->SetMinEnergy(minQGSP_neutron); 129 neu->RegisterMe(qgs); 130 auto ftf = new G4FTFPNeutronBuilder(QuasiElasticFTF); 131 AddBuilder(ftf); 132 ftf->SetMinEnergy(minFTFP_neutron); 133 ftf->SetMaxEnergy(maxFTFP_neutron); 134 neu->RegisterMe(ftf); 135 auto bic = new G4BinaryNeutronBuilder; 136 AddBuilder(bic); 137 bic->SetMinEnergy(minBIC_neutron); 138 bic->SetMaxEnergy(maxBIC_neutron); 139 neu->RegisterMe(bic); 140 neu->Build(); 141 142 const G4ParticleDefinition* neutron = G4Neutron::Neutron(); 143 G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess(neutron); 144 if(inel) { 145 inel->AddDataSet(new G4NeutronInelasticXS()); 146 if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() ); 147 } 148 G4HadronicProcess* capture = G4PhysListUtil::FindCaptureProcess(neutron); 149 if (capture) { 150 capture->RegisterMe(new G4NeutronRadCapture()); 151 } 152 } 153 154 void G4HadronPhysicsQGSP_BIC::Proton() 155 { 156 G4HadronicParameters* param = G4HadronicParameters::Instance(); 157 G4bool useFactorXS = param->ApplyFactorXS(); 158 159 auto pro = new G4ProtonBuilder; 160 AddBuilder(pro); 161 auto qgs = new G4QGSPProtonBuilder(QuasiElasticQGS); 162 AddBuilder(qgs); 163 qgs->SetMinEnergy(minQGSP_proton); 164 pro->RegisterMe(qgs); 165 auto ftf = new G4FTFPProtonBuilder(QuasiElasticFTF); 166 AddBuilder(ftf); 167 ftf->SetMinEnergy(minFTFP_proton); 168 ftf->SetMaxEnergy(maxFTFP_proton); 169 pro->RegisterMe(ftf); 170 auto bic = new G4BinaryProtonBuilder; 171 AddBuilder(bic); 172 bic->SetMinEnergy(minBIC_proton); 173 bic->SetMaxEnergy(maxBIC_proton); 174 pro->RegisterMe(bic); 175 pro->Build(); 176 177 const G4ParticleDefinition* proton = G4Proton::Proton(); 178 G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess(proton); 179 if(inel) { 180 if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() ); 181 } 182 } 183 184 void G4HadronPhysicsQGSP_BIC::Pion() 185 { 186 G4HadronicParameters* param = G4HadronicParameters::Instance(); 187 G4bool useFactorXS = param->ApplyFactorXS(); 188 189 auto pik = new G4PiKBuilder(); 190 AddBuilder(pik); 191 auto qgs = new G4QGSPPiKBuilder(QuasiElasticQGS); 192 AddBuilder(qgs); 193 qgs->SetMinEnergy(minQGSP_pik); 194 pik->RegisterMe(qgs); 195 auto ftf = new G4FTFPPiKBuilder(QuasiElasticFTF); 196 AddBuilder(ftf); 197 ftf->SetMaxEnergy(maxFTFP_pik); 198 ftf->SetMinEnergy(minFTFP_pik); 199 pik->RegisterMe(ftf); 200 auto bert = new G4BertiniPiKBuilder(); 201 AddBuilder(bert); 202 bert->SetMaxEnergy(maxBERT_pik); 203 pik->RegisterMe(bert); 204 pik->Build(); 205 206 // add cross section factor 207 if( useFactorXS ) { 208 const G4ParticleDefinition* pion = G4PionPlus::PionPlus(); 209 G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess(pion); 210 if(inel) { 211 inel->MultiplyCrossSectionBy( param->XSFactorPionInelastic() ); 212 } 213 pion = G4PionMinus::PionMinus(); 214 inel = G4PhysListUtil::FindInelasticProcess(pion); 215 if(inel) { 216 inel->MultiplyCrossSectionBy( param->XSFactorPionInelastic() ); 217 } 218 G4ParticleTable* table = G4ParticleTable::GetParticleTable(); 219 for( auto & pdg : G4HadParticles::GetKaons() ) { 220 auto part = table->FindParticle( pdg ); 221 if ( part == nullptr ) { continue; } 222 inel = G4PhysListUtil::FindInelasticProcess(part); 223 if(inel) { 224 inel->MultiplyCrossSectionBy( param->XSFactorHadronInelastic() ); 225 } 226 } 227 } 228 } 229 230 void G4HadronPhysicsQGSP_BIC::Others() 231 { 232 G4HadronicParameters* param = G4HadronicParameters::Instance(); 233 234 // high energy particles 235 if( param->GetMaxEnergy() > param->EnergyThresholdForHeavyHadrons() ) { 236 237 // anti light ions 238 G4HadronicBuilder::BuildAntiLightIonsFTFP(); 239 240 // hyperons 241 G4HadronicBuilder::BuildHyperonsQGSP_FTFP_BERT(true); 242 243 // b-, c- baryons and mesons 244 if( param->EnableBCParticles() ) { 245 G4HadronicBuilder::BuildBCHadronsQGSP_FTFP_BERT(true); 246 } 247 } 248 } 249 250 G4HadronPhysicsQGSP_BIC::~G4HadronPhysicsQGSP_BIC() 251 {} 252 253 void G4HadronPhysicsQGSP_BIC::ConstructParticle() 254 { 255 G4MesonConstructor pMesonConstructor; 256 pMesonConstructor.ConstructParticle(); 257 258 G4BaryonConstructor pBaryonConstructor; 259 pBaryonConstructor.ConstructParticle(); 260 261 G4ShortLivedConstructor pShortLivedConstructor; 262 pShortLivedConstructor.ConstructParticle(); 263 264 G4IonConstructor pIonConstructor; 265 pIonConstructor.ConstructParticle(); 266 } 267 268 void G4HadronPhysicsQGSP_BIC::ConstructProcess() 269 { 270 // allow changing of parameters at PreInit 271 G4HadronicParameters* param = G4HadronicParameters::Instance(); 272 minQGSP_proton = minQGSP_neutron = minQGSP_pik = 273 param->GetMinEnergyTransitionQGS_FTF(); 274 maxFTFP_proton = maxFTFP_neutron = maxFTFP_pik = 275 param->GetMaxEnergyTransitionQGS_FTF(); 276 minFTFP_proton = minFTFP_neutron = minFTFP_pik = 277 param->GetMinEnergyTransitionFTF_Cascade(); 278 maxBIC_proton = maxBIC_neutron = maxBERT_pik = 279 param->GetMaxEnergyTransitionFTF_Cascade(); 280 281 if(G4Threading::IsMasterThread() && param->GetVerboseLevel() > 0) { 282 DumpBanner(); 283 } 284 CreateModels(); 285 } 286