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 // $Id: G4BGGPionInelasticXS.cc,v 1.11 2010/11/19 08:15:55 gunter Exp $ >> 27 // GEANT4 tag $Name: geant4-09-04 $ >> 28 // 26 // ------------------------------------------- 29 // ------------------------------------------------------------------- 27 // 30 // 28 // GEANT4 Class file 31 // GEANT4 Class file 29 // 32 // 30 // 33 // 31 // File name: G4BGGPionInelasticXS 34 // File name: G4BGGPionInelasticXS 32 // 35 // 33 // Author: Vladimir Ivanchenko 36 // Author: Vladimir Ivanchenko 34 // 37 // 35 // Creation date: 01.10.2003 38 // Creation date: 01.10.2003 36 // Modifications: 39 // Modifications: 37 // 40 // 38 // ------------------------------------------- 41 // ------------------------------------------------------------------- 39 // 42 // 40 43 41 #include "G4BGGPionInelasticXS.hh" 44 #include "G4BGGPionInelasticXS.hh" 42 #include "G4SystemOfUnits.hh" << 45 #include "G4GlauberGribovCrossSection.hh" 43 #include "G4ComponentGGHadronNucleusXsc.hh" << 44 #include "G4UPiNuclearCrossSection.hh" 46 #include "G4UPiNuclearCrossSection.hh" 45 #include "G4HadronNucleonXsc.hh" 47 #include "G4HadronNucleonXsc.hh" 46 #include "G4NuclearRadii.hh" << 47 << 48 #include "G4Proton.hh" << 49 #include "G4PionPlus.hh" 48 #include "G4PionPlus.hh" 50 #include "G4PionMinus.hh" 49 #include "G4PionMinus.hh" 51 #include "G4NistManager.hh" 50 #include "G4NistManager.hh" 52 #include "G4Pow.hh" << 53 #include "G4HadronicParameters.hh" << 54 51 55 G4double G4BGGPionInelasticXS::theGlauberFacPi << 56 G4double G4BGGPionInelasticXS::theGlauberFacPi << 57 G4double G4BGGPionInelasticXS::theLowEPiPlus[9 << 58 G4double G4BGGPionInelasticXS::theLowEPiMinus[ << 59 G4int G4BGGPionInelasticXS::theA[93] = {0}; << 60 52 61 G4BGGPionInelasticXS::G4BGGPionInelasticXS(con 53 G4BGGPionInelasticXS::G4BGGPionInelasticXS(const G4ParticleDefinition* p) 62 : G4VCrossSectionDataSet("BarashenkovGlauberG << 63 { 54 { 64 verboseLevel = 0; 55 verboseLevel = 0; 65 fGlauberEnergy = 91.*CLHEP::GeV; << 56 fGlauberEnergy = 91.*GeV; 66 fLowEnergy = 20.*CLHEP::MeV; << 57 fLowEnergy = 20.*MeV; 67 fLowestEnergy = 1.*CLHEP::MeV; << 58 for (G4int i = 0; i < 93; i++) { 68 SetMinKinEnergy(0.0); << 59 theGlauberFac[i] = 0.0; 69 SetMaxKinEnergy( G4HadronicParameters::Insta << 60 theCoulombFac[i] = 0.0; 70 << 61 } 71 fPion = new G4UPiNuclearCrossSection(); << 62 fPion = 0; 72 fGlauber = new G4ComponentGGHadronNucleusXsc << 63 fGlauber = 0; 73 fHadron = new G4HadronNucleonXsc(); << 64 fHadron = 0; 74 << 65 particle = p; 75 fG4pow = G4Pow::GetInstance(); << 66 isPiplus = false; 76 << 67 isInitialized = false; 77 theProton = G4Proton::Proton(); << 78 thePiPlus = G4PionPlus::PionPlus(); << 79 isPiplus = (p == thePiPlus); << 80 SetForAllAtomsAndEnergies(true); << 81 << 82 if (0 == theA[0]) { Initialise(); } << 83 } 68 } 84 69 85 //....oooOO0OOooo........oooOO0OOooo........oo << 86 70 87 G4BGGPionInelasticXS::~G4BGGPionInelasticXS() 71 G4BGGPionInelasticXS::~G4BGGPionInelasticXS() 88 { 72 { >> 73 delete fGlauber; >> 74 delete fPion; 89 delete fHadron; 75 delete fHadron; 90 } 76 } 91 77 92 //....oooOO0OOooo........oooOO0OOooo........oo << 93 << 94 G4bool << 95 G4BGGPionInelasticXS::IsElementApplicable(cons << 96 cons << 97 { << 98 return true; << 99 } << 100 << 101 //....oooOO0OOooo........oooOO0OOooo........oo << 102 << 103 G4bool G4BGGPionInelasticXS::IsIsoApplicable(c << 104 G << 105 c << 106 c << 107 { << 108 return (1 == Z); << 109 } << 110 << 111 //....oooOO0OOooo........oooOO0OOooo........oo << 112 78 113 G4double 79 G4double 114 G4BGGPionInelasticXS::GetElementCrossSection(c << 80 G4BGGPionInelasticXS::GetZandACrossSection(const G4DynamicParticle* dp, 115 G << 81 G4int Z, G4int A, G4double) 116 { 82 { 117 // this method should be called only for Z > << 118 << 119 G4double cross = 0.0; 83 G4double cross = 0.0; 120 G4double ekin = std::max(dp->GetKineticEnerg << 84 G4double ekin = dp->GetKineticEnergy(); 121 G4int Z = std::min(ZZ, 92); << 85 // G4int iz = G4int(Z); >> 86 if(Z > 92) Z = 92; >> 87 >> 88 if(ekin <= fLowEnergy) { >> 89 cross = theCoulombFac[Z]; >> 90 if(isPiplus) { cross *= CoulombFactor(ekin, A); } >> 91 >> 92 } else if(Z == 1) { >> 93 >> 94 if( A < 2) { >> 95 fHadron->GetHadronNucleonXscNS(dp, G4Proton::Proton()); >> 96 cross = fHadron->GetInelasticHadronNucleonXsc(); >> 97 } else { >> 98 fHadron->GetHadronNucleonXscNS(dp, G4Proton::Proton()); >> 99 cross = fHadron->GetInelasticHadronNucleonXsc(); >> 100 fHadron->GetHadronNucleonXscNS(dp, G4Neutron::Neutron()); >> 101 cross += fHadron->GetInelasticHadronNucleonXsc(); >> 102 } 122 103 123 if(1 == Z) { << 124 cross = 1.0115*GetIsoCrossSection(dp,1,1); << 125 } else if(ekin < fLowEnergy) { << 126 cross = (isPiplus) ? theLowEPiPlus[Z]*Coul << 127 : theLowEPiMinus[Z]*FactorPiMinus(ekin); << 128 } else if(ekin > fGlauberEnergy) { 104 } else if(ekin > fGlauberEnergy) { 129 cross = (isPiplus) ? theGlauberFacPiPlus[Z << 105 cross = theGlauberFac[Z]*fGlauber->GetInelasticGlauberGribov(dp, Z, A); 130 cross *= fGlauber->GetInelasticGlauberGrib << 106 131 } else { 107 } else { 132 cross = fPion->GetInelasticCrossSection(dp << 108 cross = fPion->GetZandACrossSection(dp, Z, A); 133 } 109 } 134 #ifdef G4VERBOSE << 135 if(verboseLevel > 1) { << 136 G4cout << "G4BGGPionInelasticXS::GetCrossS << 137 << dp->GetDefinition()->GetParticle << 138 << " Ekin(GeV)= " << dp->GetKineti << 139 << " in nucleus Z= " << Z << " A= << 140 << " XS(b)= " << cross/barn << 141 << G4endl; << 142 } << 143 #endif << 144 return cross; << 145 } << 146 << 147 //....oooOO0OOooo........oooOO0OOooo........oo << 148 << 149 G4double << 150 G4BGGPionInelasticXS::GetIsoCrossSection(const << 151 G4int << 152 const << 153 const << 154 const << 155 { << 156 // this method should be called only for Z = << 157 fHadron->HadronNucleonXscNS(dp->GetDefinitio << 158 dp->GetKineticEn << 159 G4double cross = A*fHadron->GetInelasticHadr << 160 110 161 #ifdef G4VERBOSE << 111 if(verboseLevel > 1) 162 if(verboseLevel > 1) { << 163 G4cout << "G4BGGPionInelasticXS::GetCrossS 112 G4cout << "G4BGGPionInelasticXS::GetCrossSection for " 164 << dp->GetDefinition()->GetParticle << 113 << dp->GetDefinition()->GetParticleName() 165 << " Ekin(GeV)= " << dp->GetKineti << 114 << " Ekin(GeV)= " << dp->GetKineticEnergy() 166 << " in nucleus Z=1 A=" << A << 115 << " in nucleus Z= " << Z << " A= " << A 167 << " XS(b)= " << cross/barn << 116 << " XS(b)= " << cross/barn 168 << G4endl; << 117 << G4endl; 169 } << 118 170 #endif << 171 return cross; 119 return cross; 172 } 120 } 173 121 174 //....oooOO0OOooo........oooOO0OOooo........oo 122 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 175 123 176 void G4BGGPionInelasticXS::BuildPhysicsTable(c 124 void G4BGGPionInelasticXS::BuildPhysicsTable(const G4ParticleDefinition& p) 177 { 125 { 178 if(verboseLevel > 1) { << 179 G4cout << "G4BGGPionInelasticXS::BuildPhys << 180 << p.GetParticleName() << G4endl; << 181 } << 182 if(&p == G4PionPlus::PionPlus() || &p == G4P 126 if(&p == G4PionPlus::PionPlus() || &p == G4PionMinus::PionMinus()) { 183 isPiplus = (&p == G4PionPlus::PionPlus()); << 127 particle = &p; >> 128 Initialise(); 184 } else { 129 } else { 185 G4ExceptionDescription ed; << 130 G4cout << "### G4BGGPionInelasticXS WARNING: is not applicable to " 186 ed << "This BGG cross section is applicabl << 131 << p.GetParticleName() 187 << p.GetParticleName() << G4endl; << 132 << G4endl; 188 G4Exception("G4BGGPionInelasticXS::BuildPh << 189 FatalException, ed); << 190 } 133 } 191 } 134 } 192 135 193 //....oooOO0OOooo........oooOO0OOooo........oo 136 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 194 137 195 void G4BGGPionInelasticXS::Initialise() << 138 void G4BGGPionInelasticXS::DumpPhysicsTable(const G4ParticleDefinition&) >> 139 { >> 140 G4cout << "G4BGGPionInelasticXS:"<<G4endl; >> 141 } >> 142 >> 143 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... >> 144 >> 145 void G4BGGPionInelasticXS::Initialise() 196 { 146 { 197 theA[0] = theA[1] = 1; << 147 if(isInitialized) return; >> 148 isInitialized = true; >> 149 >> 150 fPion = new G4UPiNuclearCrossSection(); >> 151 fGlauber = new G4GlauberGribovCrossSection(); >> 152 fHadron = new G4HadronNucleonXsc(); >> 153 fPion->BuildPhysicsTable(*particle); >> 154 fGlauber->BuildPhysicsTable(*particle); >> 155 if(particle == G4PionPlus::PionPlus()) isPiplus = true; >> 156 >> 157 G4ParticleDefinition* part = const_cast<G4ParticleDefinition*>(particle); 198 G4ThreeVector mom(0.0,0.0,1.0); 158 G4ThreeVector mom(0.0,0.0,1.0); 199 G4DynamicParticle dp(thePiPlus, mom, fGlaube << 159 G4DynamicParticle dp(part, mom, fGlauberEnergy); 200 160 201 G4NistManager* nist = G4NistManager::Instanc 161 G4NistManager* nist = G4NistManager::Instance(); >> 162 202 G4double csup, csdn; 163 G4double csup, csdn; >> 164 G4int A; >> 165 >> 166 if(verboseLevel > 0) G4cout << "### G4BGGPionInelasticXS::Initialise for " >> 167 << particle->GetParticleName() >> 168 << " isPiplus: " << isPiplus >> 169 << G4endl; 203 170 204 for (G4int iz=2; iz<93; ++iz) { << 171 for(G4int iz=2; iz<93; iz++) { 205 G4int A = G4lrint(nist->GetAtomicMassAmu(i << 172 206 theA[iz] = A; << 173 G4double Z = G4double(iz); >> 174 A = G4lrint(nist->GetAtomicMassAmu(iz)); 207 175 208 csup = fGlauber->GetInelasticGlauberGribov 176 csup = fGlauber->GetInelasticGlauberGribov(&dp, iz, A); 209 csdn = fPion->GetInelasticCrossSection(&dp 177 csdn = fPion->GetInelasticCrossSection(&dp, iz, A); 210 theGlauberFacPiPlus[iz] = csdn/csup; << 211 } << 212 178 213 dp.SetDefinition(G4PionMinus::PionMinus()); << 179 theGlauberFac[iz] = csdn/csup; 214 for (G4int iz=2; iz<93; ++iz) { << 180 if(verboseLevel > 0) G4cout << "Z= " << Z << " A= " << A 215 csup = fGlauber->GetInelasticGlauberGribov << 181 << " factor= " << theGlauberFac[iz] << G4endl; 216 csdn = fPion->GetInelasticCrossSection(&dp << 217 theGlauberFacPiMinus[iz] = csdn/csup; << 218 << 219 if(verboseLevel > 1) { << 220 G4cout << "Z= " << iz << " A= " << the << 221 << " factorPiPlus= " << theGlauberFacPi << 222 << " factorPiMinus= " << theGlauberFacP << 223 << G4endl; << 224 } << 225 } 182 } 226 << 227 theLowEPiPlus[1] = theLowEPiMinus[1]= 1.0; << 228 dp.SetDefinition(thePiPlus); << 229 dp.SetKineticEnergy(fLowEnergy); 183 dp.SetKineticEnergy(fLowEnergy); 230 for (G4int iz=2; iz<93; ++iz) { << 184 fHadron->GetHadronNucleonXscNS(&dp, G4Proton::Proton()); 231 theLowEPiPlus[iz] = fPion->GetInelasticCro << 185 theCoulombFac[1] = fHadron->GetInelasticHadronNucleonXsc(); 232 /CoulombFactorPiPlus(fLowEnergy, iz); << 186 if(isPiplus) { theCoulombFac[1] /= CoulombFactor(fLowEnergy,1); } 233 } << 187 >> 188 for(G4int iz=2; iz<93; iz++) { 234 189 235 dp.SetDefinition(G4PionMinus::PionMinus()); << 190 G4double Z = G4double(iz); 236 for (G4int iz=2; iz<93; ++iz) { << 191 A = G4lrint(nist->GetAtomicMassAmu(iz)); 237 theLowEPiMinus[iz] = fPion->GetInelasticCr << 238 /FactorPiMinus(fLowEnergy); << 239 << 240 if (verboseLevel > 1) { << 241 G4cout << "Z= " << iz << " A= " << the << 242 << " LowEtorPiPlus= " << theLowEPiPlus[ << 243 << " LowEtorPiMinus= " << theLowEPiMinu << 244 << G4endl; << 245 } << 246 } << 247 } << 248 192 249 //....oooOO0OOooo........oooOO0OOooo........oo << 193 theCoulombFac[iz] = fPion->GetZandACrossSection(&dp, iz, A); >> 194 if(isPiplus) { theCoulombFac[iz] /= CoulombFactor(fLowEnergy,A); } 250 195 251 G4double G4BGGPionInelasticXS::CoulombFactorPi << 196 if(verboseLevel > 0) G4cout << "Z= " << Z << " A= " << A 252 { << 197 << " factor= " << theCoulombFac[iz] << G4endl; 253 return (kinEnergy > 0.0) ? << 198 } 254 G4NuclearRadii::CoulombFactor(Z, theA[Z], << 255 } 199 } 256 200 257 //....oooOO0OOooo........oooOO0OOooo........oo << 258 201 259 G4double G4BGGPionInelasticXS::FactorPiMinus(G << 202 G4double G4BGGPionInelasticXS::CoulombFactor(G4double kinEnergy, G4int A) 260 { 203 { 261 return 1.0/std::sqrt(kinEnergy); << 204 G4double res= 0.0; 262 } << 205 if(kinEnergy <= DBL_MIN) return res; >> 206 else if(A < 2) return kinEnergy*kinEnergy; >> 207 >> 208 G4double elog = std::log10(kinEnergy/GeV); >> 209 G4double aa = A; 263 210 264 //....oooOO0OOooo........oooOO0OOooo........oo << 211 // from G4ProtonInelasticCrossSection >> 212 G4double f1 = 8.0 - 8.0/aa - 0.008*aa; >> 213 G4double f2 = 2.34 - 5.4/aa - 0.0028*aa; 265 214 266 void << 215 res = 1.0/(1.0 + std::exp(-f1*(elog + f2))); 267 G4BGGPionInelasticXS::CrossSectionDescription( << 216 268 { << 217 f1 = 5.6 - 0.016*aa; 269 outFile << "The Barashenkov-Glauber-Gribov c << 218 f2 = 1.37 + 1.37/aa; 270 << "pion scattering from nuclei at a << 219 res *= ( 1.0 + (0.8 + 18./aa - 0.002*aa)/(1.0 + std::exp(f1*(elog + f2)))); 271 << "parameterization is used below 9 << 220 return res; 272 << "parameterization is used above 9 << 273 } 221 } 274 222 275 //....oooOO0OOooo........oooOO0OOooo........oo << 223 276 224