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: G4BGGNucleonElasticXS.cc,v 1.3 2008/12/01 16:50:23 vnivanch Exp $ >> 27 // GEANT4 tag $Name: geant4-09-02-patch-04 $ >> 28 // 26 // ------------------------------------------- 29 // ------------------------------------------------------------------- 27 // 30 // 28 // GEANT4 Class file 31 // GEANT4 Class file 29 // 32 // 30 // 33 // 31 // File name: G4BGGNucleonElasticXS 34 // File name: G4BGGNucleonElasticXS 32 // 35 // 33 // Author: Vladimir Ivanchenko 36 // Author: Vladimir Ivanchenko 34 // 37 // 35 // Creation date: 13.03.2007 38 // Creation date: 13.03.2007 >> 39 // Modifications: >> 40 // 36 // 41 // 37 // ------------------------------------------- 42 // ------------------------------------------------------------------- 38 // 43 // 39 44 40 #include "G4BGGNucleonElasticXS.hh" 45 #include "G4BGGNucleonElasticXS.hh" 41 #include "G4SystemOfUnits.hh" << 46 #include "G4GlauberGribovCrossSection.hh" 42 #include "G4ComponentGGHadronNucleusXsc.hh" << 43 #include "G4NucleonNuclearCrossSection.hh" 47 #include "G4NucleonNuclearCrossSection.hh" 44 #include "G4HadronNucleonXsc.hh" 48 #include "G4HadronNucleonXsc.hh" 45 #include "G4NuclearRadii.hh" << 46 #include "G4Proton.hh" 49 #include "G4Proton.hh" 47 #include "G4Neutron.hh" 50 #include "G4Neutron.hh" 48 #include "G4NistManager.hh" 51 #include "G4NistManager.hh" 49 #include "G4NuclearRadii.hh" << 50 52 51 #include "G4CrossSectionDataSetRegistry.hh" << 53 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 52 << 53 G4double G4BGGNucleonElasticXS::theGlauberFacP << 54 G4double G4BGGNucleonElasticXS::theCoulombFacP << 55 G4double G4BGGNucleonElasticXS::theGlauberFacN << 56 G4double G4BGGNucleonElasticXS::theCoulombFacN << 57 G4int G4BGGNucleonElasticXS::theA[93] = {0}; << 58 54 59 G4BGGNucleonElasticXS::G4BGGNucleonElasticXS(c << 55 G4BGGNucleonElasticXS::G4BGGNucleonElasticXS(const G4ParticleDefinition*) 60 : G4VCrossSectionDataSet("BarashenkovGlauberG << 61 { 56 { 62 verboseLevel = 0; 57 verboseLevel = 0; 63 fGlauberEnergy = 91.*GeV; 58 fGlauberEnergy = 91.*GeV; 64 fLowEnergy = 14.0*MeV; << 59 fLowEnergy = 20.*MeV; 65 fNucleon = new G4NucleonNuclearCrossSection( << 60 fNucleon = 0; 66 fGlauber = new G4ComponentGGHadronNucleusXsc << 61 fGlauber = 0; 67 fHadron = new G4HadronNucleonXsc(); << 62 fHadron = 0; 68 << 63 particle = 0; 69 theProton = G4Proton::Proton(); << 64 isProton = false; 70 isProton = (theProton == p); << 65 isInitialized = false; 71 SetForAllAtomsAndEnergies(true); << 72 << 73 if (0 == theA[0]) { Initialise(); } << 74 } 66 } 75 67 76 //....oooOO0OOooo........oooOO0OOooo........oo 68 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 77 69 78 G4BGGNucleonElasticXS::~G4BGGNucleonElasticXS( 70 G4BGGNucleonElasticXS::~G4BGGNucleonElasticXS() 79 { 71 { >> 72 delete fGlauber; >> 73 delete fNucleon; 80 delete fHadron; 74 delete fHadron; 81 } 75 } 82 76 83 //....oooOO0OOooo........oooOO0OOooo........oo 77 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 84 78 85 G4bool << 79 G4double G4BGGNucleonElasticXS::GetIsoZACrossSection(const G4DynamicParticle* dp, 86 G4BGGNucleonElasticXS::IsElementApplicable(con << 80 G4double Z, 87 con << 81 G4double A, 88 { << 82 G4double) 89 return true; << 90 } << 91 << 92 //....oooOO0OOooo........oooOO0OOooo........oo << 93 << 94 G4bool G4BGGNucleonElasticXS::IsIsoApplicable( << 95 << 96 << 97 << 98 { << 99 return (1 == Z); << 100 } << 101 << 102 //....oooOO0OOooo........oooOO0OOooo........oo << 103 << 104 G4double << 105 G4BGGNucleonElasticXS::GetElementCrossSection( << 106 << 107 { 83 { 108 // this method should be called only for Z > << 109 << 110 G4double cross = 0.0; 84 G4double cross = 0.0; 111 G4int Z = std::min(ZZ, 92); << 112 G4double ekin = dp->GetKineticEnergy(); 85 G4double ekin = dp->GetKineticEnergy(); 113 if(1 == Z) { << 86 G4int iz = G4int(Z); 114 cross = 1.0115*GetIsoCrossSection(dp,1,1); << 87 if(iz > 92) iz = 92; 115 } else { << 88 116 if(ekin <= fLowEnergy) { << 89 if(ekin <= fLowEnergy) { 117 cross = (isProton) ? theCoulombFacP[Z] : << 90 cross = theCoulombFac[iz]; 118 cross *= CoulombFactor(ekin, Z); << 91 if(isProton) { cross *= CoulombFactor(ekin, A); } 119 } else if(ekin > fGlauberEnergy) { << 92 120 cross = (isProton) ? theGlauberFacP[Z] : << 93 } else if(iz == 1) { 121 cross *= fGlauber->GetElasticGlauberGrib << 94 if( A < 1.5) { >> 95 //fHadron->GetHadronNucleonXscPDG(dp, G4Proton::Proton()); >> 96 //fHadron->GetHadronNucleonXscEL(dp, G4Proton::Proton()); >> 97 //fHadron->GetHadronNucleonXscNS(dp, G4Proton::Proton()); >> 98 fHadron->GetHadronNucleonXscMK(dp, G4Proton::Proton()); >> 99 cross = fHadron->GetElasticHadronNucleonXsc(); 122 } else { 100 } else { 123 cross = fNucleon->GetElasticCrossSection << 101 fHadron->GetHadronNucleonXscMK(dp, G4Proton::Proton()); >> 102 cross = fHadron->GetElasticHadronNucleonXsc(); >> 103 fHadron->GetHadronNucleonXscMK(dp, G4Neutron::Neutron()); >> 104 cross += fHadron->GetElasticHadronNucleonXsc(); 124 } 105 } >> 106 } else if(ekin > fGlauberEnergy) { >> 107 cross = theGlauberFac[iz]*fGlauber->GetElasticGlauberGribov(dp, Z, A); >> 108 } else { >> 109 cross = fNucleon->GetElasticCrossSection(dp, Z, A); 125 } 110 } 126 #ifdef G4VERBOSE << 127 if (verboseLevel > 1) { << 128 G4cout << "G4BGGNucleonElasticXS::GetEleme << 129 << dp->GetDefinition()->GetParticle << 130 << " Ekin(GeV)= " << dp->GetKineti << 131 << " in nucleus Z= " << Z << " A= << 132 << " XS(b)= " << cross/barn << 133 << G4endl; << 134 } << 135 #endif << 136 return cross; << 137 } << 138 111 139 //....oooOO0OOooo........oooOO0OOooo........oo << 112 if(verboseLevel > 1) >> 113 G4cout << "G4BGGNucleonElasticXS::GetCrossSection for " >> 114 << dp->GetDefinition()->GetParticleName() >> 115 << " Ekin(GeV)= " << dp->GetKineticEnergy() >> 116 << " in nucleus Z= " << Z << " A= " << A >> 117 << " XS(b)= " << cross/barn >> 118 << G4endl; 140 119 141 G4double << 142 G4BGGNucleonElasticXS::GetIsoCrossSection(cons << 143 G4in << 144 cons << 145 cons << 146 cons << 147 { << 148 // this method should be called only for Z = << 149 fHadron->HadronNucleonXscNS(dp->GetDefinitio << 150 dp->GetKineticEn << 151 G4double cross = A*fHadron->GetElasticHadron << 152 << 153 #ifdef G4VERBOSE << 154 if (verboseLevel > 1) { << 155 G4cout << "G4BGGNucleonElasticXS::GetIsoCr << 156 << dp->GetDefinition()->GetParticle << 157 << " Ekin(GeV)= " << dp->GetKineti << 158 << " in nucleus Z=1 A=" << A << 159 << " XS(b)= " << cross/barn << 160 << G4endl; << 161 } << 162 #endif << 163 return cross; 120 return cross; 164 } 121 } 165 122 166 //....oooOO0OOooo........oooOO0OOooo........oo 123 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 167 124 168 void G4BGGNucleonElasticXS::BuildPhysicsTable( 125 void G4BGGNucleonElasticXS::BuildPhysicsTable(const G4ParticleDefinition& p) 169 { 126 { 170 if(&p == theProton || &p == G4Neutron::Neutr << 127 if(&p == G4Proton::Proton() || &p == G4Neutron::Neutron()) { 171 isProton = (theProton == &p); << 128 particle = &p; 172 << 129 Initialise(); 173 } else { 130 } else { 174 G4ExceptionDescription ed; << 131 G4cout << "### G4BGGNucleonElasticXS WARNING: is not applicable to " 175 ed << "This BGG cross section is applicabl << 132 << p.GetParticleName() 176 << p.GetParticleName() << G4endl; << 133 << G4endl; 177 G4Exception("G4BGGNucleonElasticXS::BuildP << 178 FatalException, ed); << 179 } 134 } 180 } 135 } 181 136 182 //....oooOO0OOooo........oooOO0OOooo........oo 137 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 183 138 184 void G4BGGNucleonElasticXS::Initialise() << 139 void G4BGGNucleonElasticXS::DumpPhysicsTable(const G4ParticleDefinition&) 185 { 140 { 186 theA[0] = theA[1] = 1; << 141 G4cout << "G4BGGNucleonElasticXS:"<<G4endl; >> 142 } >> 143 >> 144 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... >> 145 >> 146 void G4BGGNucleonElasticXS::Initialise() >> 147 { >> 148 if(isInitialized) return; >> 149 isInitialized = true; >> 150 >> 151 fNucleon = new G4NucleonNuclearCrossSection(); >> 152 fGlauber = new G4GlauberGribovCrossSection(); >> 153 fHadron = new G4HadronNucleonXsc(); >> 154 fNucleon->BuildPhysicsTable(*particle); >> 155 fGlauber->BuildPhysicsTable(*particle); >> 156 if(particle == G4Proton::Proton()) isProton = true; >> 157 >> 158 G4ParticleDefinition* part = const_cast<G4ParticleDefinition*>(particle); 187 G4ThreeVector mom(0.0,0.0,1.0); 159 G4ThreeVector mom(0.0,0.0,1.0); 188 G4DynamicParticle dp(theProton, mom, fGlaube << 160 G4DynamicParticle dp(part, mom, fGlauberEnergy); 189 161 190 G4NistManager* nist = G4NistManager::Instanc 162 G4NistManager* nist = G4NistManager::Instance(); 191 G4double csup, csdn; << 192 163 193 for (G4int iz=2; iz<93; ++iz) { << 164 G4double A, csup, csdn; 194 G4int A = G4lrint(nist->GetAtomicMassAmu(i << 195 theA[iz] = A; << 196 << 197 csup = fGlauber->GetElasticGlauberGribov(& << 198 csdn = fNucleon->GetElasticCrossSection(&d << 199 theGlauberFacP[iz] = csdn/csup; << 200 } << 201 165 202 dp.SetDefinition(G4Neutron::Neutron()); << 166 if(verboseLevel > 0) G4cout << "### G4BGGNucleonElasticXS::Initialise for " 203 for (G4int iz=2; iz<93; ++iz) { << 167 << particle->GetParticleName() << G4endl; 204 csup = fGlauber->GetElasticGlauberGribov(& << 205 csdn = fNucleon->GetElasticCrossSection(&d << 206 theGlauberFacN[iz] = csdn/csup; << 207 << 208 if (verboseLevel > 1) { << 209 G4cout << "G4BGGNucleonElasticXS::Init << 210 << " GFactorP=" << theGlauberFa << 211 << " GFactorN=" << theGlauberFa << 212 } << 213 } << 214 168 215 theCoulombFacP[0] = theCoulombFacP[1] = << 169 for(G4int iz=2; iz<93; iz++) { 216 theCoulombFacN[0] = theCoulombFacN[1] = 1. << 170 217 dp.SetDefinition(theProton); << 171 G4double Z = G4double(iz); 218 dp.SetKineticEnergy(fLowEnergy); << 172 A = nist->GetAtomicMassAmu(iz); 219 for (G4int iz=2; iz<93; ++iz) { << 173 220 theCoulombFacP[iz] = fNucleon->GetElasticC << 174 csup = fGlauber->GetElasticGlauberGribov(&dp, Z, A); 221 /CoulombFactor(fLowEnergy, iz); << 175 csdn = fNucleon->GetElasticCrossSection(&dp, Z, A); >> 176 >> 177 theGlauberFac[iz] = csdn/csup; >> 178 if(verboseLevel > 0) G4cout << "Z= " << Z << " A= " << A >> 179 << " factor= " << theGlauberFac[iz] << G4endl; 222 } 180 } 223 dp.SetDefinition(G4Neutron::Neutron()); << 181 dp.SetKineticEnergy(fLowEnergy); 224 for(G4int iz=2; iz<93; ++iz) { << 182 fHadron->GetHadronNucleonXscMK(&dp, G4Proton::Proton()); 225 theCoulombFacN[iz] = fNucleon->GetElasticC << 183 theCoulombFac[1] = fHadron->GetElasticHadronNucleonXsc(); 226 /CoulombFactor(fLowEnergy, iz); << 184 if(isProton) { theCoulombFac[1] /= CoulombFactor(fLowEnergy, 1.0); } 227 << 185 228 if (verboseLevel > 1) { << 186 for(G4int iz=2; iz<93; iz++) { 229 G4cout << "G4BGGNucleonElasticXS::Initia << 187 230 << " CFactorP=" << theCoulombFacP[iz] << 188 G4double Z = G4double(iz); 231 << " CFactorN=" << theCoulombFacN[iz] < << 189 A = nist->GetAtomicMassAmu(iz); 232 } << 190 >> 191 theCoulombFac[iz] = fNucleon->GetElasticCrossSection(&dp, Z, A); >> 192 if(isProton) { theCoulombFac[iz] /= CoulombFactor(fLowEnergy, A); } >> 193 if(verboseLevel > 0) G4cout << "Z= " << Z << " A= " << A >> 194 << " factor= " << theCoulombFac[iz] << G4endl; 233 } 195 } 234 } 196 } 235 197 236 //....oooOO0OOooo........oooOO0OOooo........oo 198 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 237 199 238 G4double G4BGGNucleonElasticXS::CoulombFactor( << 200 G4double G4BGGNucleonElasticXS::CoulombFactor(G4double kinEnergy, G4double A) 239 { 201 { 240 return (isProton) ? << 202 G4double res= 0.0; 241 G4NuclearRadii::CoulombFactor(Z, theA[Z], << 203 if(kinEnergy <= DBL_MIN) return res; 242 } << 204 else if(A < 1.5) return kinEnergy*kinEnergy; 243 205 244 //....oooOO0OOooo........oooOO0OOooo........oo << 206 G4double elog = std::log10(kinEnergy/GeV); 245 207 246 void G4BGGNucleonElasticXS::CrossSectionDescri << 208 // from G4ProtonInelasticCrossSection 247 { << 209 G4double f1 = 8.0 - 8.0/A - 0.008*A; 248 outFile << "The Barashenkov-Glauber-Gribov c << 210 G4double f2 = 2.34 - 5.4/A - 0.0028*A; 249 << "scattering of protons and neutro << 211 250 << "Barashenkov parameterization bel << 212 res = 1.0/(1.0 + std::exp(-f1*(elog + f2))); 251 << "parameterization above 91 GeV. n << 213 >> 214 f1 = 5.6 - 0.016*A; >> 215 f2 = 1.37 + 1.37/A; >> 216 res *= ( 1.0 + (0.8 + 18./A - 0.002*A)/(1.0 + std::exp(f1*(elog + f2)))); >> 217 return res; 252 } 218 } 253 219 254 //....oooOO0OOooo........oooOO0OOooo........oo 220 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... >> 221 >> 222 255 223