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