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: G4HadronElasticPhysics 30 // 31 // Author: 23 November 2006 V. Ivanchenko 32 // 33 // Modified: 34 // 21.03.2007 V.Ivanchenko Use G4BGGNucleonElasticXS and G4BGGPionElasticXS; 35 // Reduce thresholds for HE and Q-models to zero 36 // 03.06.2010 V.Ivanchenko cleanup constructors and ConstructProcess method 37 // 29.07.2010 V.Ivanchenko rename this class from G4HadronHElasticPhysics to 38 // G4HadronElasticPhysics, old version of the class 39 // is renamed to G4HadronElasticPhysics93 40 // 41 //---------------------------------------------------------------------------- 42 // 43 #include "G4HadronElasticPhysics.hh" 44 45 #include "G4SystemOfUnits.hh" 46 #include "G4ParticleDefinition.hh" 47 #include "G4ProcessManager.hh" 48 49 #include "G4MesonConstructor.hh" 50 #include "G4BaryonConstructor.hh" 51 #include "G4IonConstructor.hh" 52 53 #include "G4HadronElasticProcess.hh" 54 #include "G4HadronElastic.hh" 55 #include "G4ChipsElasticModel.hh" 56 #include "G4ElasticHadrNucleusHE.hh" 57 #include "G4AntiNuclElastic.hh" 58 59 #include "G4BGGNucleonElasticXS.hh" 60 #include "G4BGGPionElasticXS.hh" 61 62 #include "G4ChipsProtonElasticXS.hh" 63 64 #include "G4NeutronElasticXS.hh" 65 66 #include "G4HadronicParameters.hh" 67 #include "G4HadronicBuilder.hh" 68 #include "G4HadParticles.hh" 69 #include "G4HadProcesses.hh" 70 #include "G4PhysListUtil.hh" 71 #include "G4BuilderType.hh" 72 73 // factory 74 #include "G4PhysicsConstructorFactory.hh" 75 // 76 G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronElasticPhysics); 77 // 78 79 G4HadronElasticPhysics::G4HadronElasticPhysics(G4int ver, const G4String& nam) 80 : G4VPhysicsConstructor(nam) 81 { 82 G4HadronicParameters::Instance()->SetVerboseLevel(ver); 83 if(ver > 1) { 84 G4cout << "### G4HadronElasticPhysics: " << GetPhysicsName() 85 << G4endl; 86 } 87 SetPhysicsType(bHadronElastic); 88 } 89 90 void G4HadronElasticPhysics::ConstructParticle() 91 { 92 G4MesonConstructor pMesonConstructor; 93 pMesonConstructor.ConstructParticle(); 94 95 G4BaryonConstructor pBaryonConstructor; 96 pBaryonConstructor.ConstructParticle(); 97 98 G4IonConstructor pConstructor; 99 pConstructor.ConstructParticle(); 100 } 101 102 void G4HadronElasticPhysics::ConstructProcess() 103 { 104 G4HadronicParameters* param = G4HadronicParameters::Instance(); 105 G4bool useFactorXS = param->ApplyFactorXS(); 106 G4ParticleTable* table = G4ParticleTable::GetParticleTable(); 107 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper(); 108 109 const G4double elimitAntiNuc = 100.*MeV; 110 const G4double delta = 0.1*MeV; 111 G4double emax = std::max(param->GetMaxEnergy(), elimitAntiNuc+delta); 112 if ( param->GetVerboseLevel() > 1 ) { 113 G4cout << "### HadronElasticPhysics::ConstructProcess: " 114 << "Elimit for for anti-neuclei " << elimitAntiNuc/CLHEP::GeV << " GeV" 115 << " for all hadrons Emax(GeV)= " << emax/CLHEP::GeV 116 << G4endl; 117 } 118 119 G4HadronElastic* lhep0 = new G4HadronElastic(); 120 G4HadronElastic* lhep2 = new G4HadronElastic(); 121 lhep0->SetMaxEnergy(emax); 122 lhep2->SetMaxEnergy(elimitAntiNuc+delta); 123 124 G4ElasticHadrNucleusHE* he = new G4ElasticHadrNucleusHE(); 125 he->SetMaxEnergy(emax); 126 127 G4AntiNuclElastic* anuc = new G4AntiNuclElastic(); 128 anuc->SetMinEnergy(elimitAntiNuc); 129 anuc->SetMaxEnergy(emax); 130 131 auto anucxs = G4HadProcesses::ElasticXS("AntiAGlauber"); 132 auto xsNN = G4HadProcesses::ElasticXS("Glauber-Gribov Nucl-nucl"); 133 134 // p 135 G4ParticleDefinition* particle = G4Proton::Proton(); 136 G4HadronElasticProcess* hel = new G4HadronElasticProcess(); 137 hel->AddDataSet(new G4BGGNucleonElasticXS(particle)); 138 hel->RegisterMe(new G4ChipsElasticModel()); 139 if ( useFactorXS ) hel->MultiplyCrossSectionBy( param->XSFactorNucleonElastic() ); 140 ph->RegisterProcess(hel, particle); 141 142 // n 143 hel = new G4HadronElasticProcess(); 144 hel->RegisterMe(new G4ChipsElasticModel()); 145 G4HadProcesses::BuildNeutronElastic(hel); 146 147 // pi+ 148 particle = G4PionPlus::PionPlus(); 149 hel = new G4HadronElasticProcess(); 150 hel->AddDataSet(new G4BGGPionElasticXS(particle)); 151 hel->RegisterMe(he); 152 if ( useFactorXS ) hel->MultiplyCrossSectionBy( param->XSFactorPionElastic() ); 153 ph->RegisterProcess(hel, particle); 154 155 // pi- 156 particle = G4PionMinus::PionMinus(); 157 hel = new G4HadronElasticProcess(); 158 hel->AddDataSet(new G4BGGPionElasticXS(particle)); 159 hel->RegisterMe(he); 160 if ( useFactorXS ) hel->MultiplyCrossSectionBy( param->XSFactorPionElastic() ); 161 ph->RegisterProcess(hel, particle); 162 163 // kaons 164 G4HadronicBuilder::BuildElastic( G4HadParticles::GetKaons() ); 165 166 // d, t, He3, alpha 167 for ( auto & pdg : G4HadParticles::GetLightIons() ) { 168 particle = table->FindParticle( pdg ); 169 if ( particle == nullptr ) { continue; } 170 171 hel = new G4HadronElasticProcess(); 172 hel->AddDataSet(xsNN); 173 hel->RegisterMe(lhep0); 174 if( useFactorXS ) hel->MultiplyCrossSectionBy( param->XSFactorHadronElastic() ); 175 ph->RegisterProcess(hel, particle); 176 } 177 178 // high energy particles 179 if( emax > param->EnergyThresholdForHeavyHadrons() ) { 180 181 // pbar, nbar, anti light ions 182 for( auto & pdg : G4HadParticles::GetLightAntiIons() ) { 183 particle = table->FindParticle( pdg ); 184 if ( particle == nullptr ) { continue; } 185 186 hel = new G4HadronElasticProcess(); 187 hel->RegisterMe(lhep2); 188 hel->RegisterMe(anuc); 189 hel->AddDataSet(anucxs); 190 if( useFactorXS ) hel->MultiplyCrossSectionBy( param->XSFactorHadronElastic() ); 191 ph->RegisterProcess(hel, particle); 192 } 193 194 // hyperons 195 G4HadronicBuilder::BuildElastic( G4HadParticles::GetHyperons() ); 196 G4HadronicBuilder::BuildElastic( G4HadParticles::GetAntiHyperons() ); 197 198 // b-, c- baryons and mesons 199 if( G4HadronicParameters::Instance()->EnableBCParticles() ) { 200 G4HadronicBuilder::BuildElastic( G4HadParticles::GetBCHadrons() ); 201 } 202 203 // light hypernuclei and anti-hypernuclei 204 if ( G4HadronicParameters::Instance()->EnableHyperNuclei() ) { 205 // for light hypernuclei, we can use directly the following method: 206 G4HadronicBuilder::BuildElastic( G4HadParticles::GetHyperNuclei() ); 207 // but not for light anti-hypernuclei, because they need a different cross section: 208 for ( auto & pdg : G4HadParticles::GetHyperAntiNuclei() ) { 209 particle = table->FindParticle( pdg ); 210 if ( particle == nullptr ) continue; 211 hel = new G4HadronElasticProcess; 212 hel->AddDataSet( anucxs ); 213 hel->RegisterMe( lhep0 ); 214 if ( useFactorXS ) hel->MultiplyCrossSectionBy( param->XSFactorHadronElastic() ); 215 ph->RegisterProcess( hel, particle ); 216 } 217 } 218 } 219 } 220 221 G4HadronicProcess* 222 G4HadronElasticPhysics::GetElasticProcess(const G4ParticleDefinition* part) const 223 { 224 return G4PhysListUtil::FindElasticProcess(part); 225 } 226 227 G4HadronElastic* 228 G4HadronElasticPhysics::GetElasticModel(const G4ParticleDefinition* part) const 229 { 230 G4HadronElastic* mod = nullptr; 231 G4HadronicProcess* hel = GetElasticProcess(part); 232 if ( nullptr != hel ) { 233 const std::vector<G4HadronicInteraction*>& hi = hel->GetHadronicInteractionList(); 234 if ( !hi.empty() ) { 235 for (auto const & p : hi) { 236 auto ptr = dynamic_cast<G4HadronElastic*>(p); 237 if ( nullptr != ptr ) { 238 mod = ptr; 239 break; 240 } 241 } 242 } 243 } 244 return mod; 245 } 246 247 G4HadronicProcess* G4HadronElasticPhysics::GetNeutronProcess() const 248 { 249 return GetElasticProcess(G4Neutron::Neutron()); 250 } 251 252 G4HadronElastic* G4HadronElasticPhysics::GetNeutronModel() const 253 { 254 return GetElasticModel(G4Neutron::Neutron()); 255 } 256 257 void G4HadronElasticPhysics::AddXSection(const G4ParticleDefinition* part, 258 G4VCrossSectionDataSet* cross) const 259 { 260 G4HadronicProcess* hel = GetElasticProcess(part); 261 if ( nullptr != hel ) { hel->AddDataSet(cross); } 262 } 263 264 265