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: G4BGGNucleonInelasticXS.cc,v 1.1 2007/03/13 15:19:30 vnivanch Exp $ >> 27 // GEANT4 tag $Name: geant4-08-03-patch-01 $ >> 28 // 26 // ------------------------------------------- 29 // ------------------------------------------------------------------- 27 // 30 // 28 // GEANT4 Class file 31 // GEANT4 Class file 29 // 32 // 30 // 33 // 31 // File name: G4BGGNucleonInelasticXS 34 // File name: G4BGGNucleonInelasticXS 32 // 35 // 33 // Author: Vladimir Ivanchenko 36 // Author: Vladimir Ivanchenko 34 // 37 // 35 // Creation date: 13.03.2007 38 // Creation date: 13.03.2007 36 // Modifications: 39 // Modifications: 37 // 40 // 38 // 41 // 39 // ------------------------------------------- 42 // ------------------------------------------------------------------- 40 // 43 // 41 44 42 #include "G4BGGNucleonInelasticXS.hh" 45 #include "G4BGGNucleonInelasticXS.hh" 43 #include "G4SystemOfUnits.hh" << 46 #include "G4GlauberGribovCrossSection.hh" 44 #include "G4ComponentGGHadronNucleusXsc.hh" << 45 #include "G4NucleonNuclearCrossSection.hh" 47 #include "G4NucleonNuclearCrossSection.hh" 46 #include "G4HadronNucleonXsc.hh" << 47 #include "G4ComponentSAIDTotalXS.hh" << 48 #include "G4Proton.hh" 48 #include "G4Proton.hh" 49 #include "G4Neutron.hh" 49 #include "G4Neutron.hh" 50 #include "G4NistManager.hh" 50 #include "G4NistManager.hh" 51 #include "G4Material.hh" << 52 #include "G4Element.hh" << 53 #include "G4Isotope.hh" << 54 #include "G4Log.hh" << 55 #include "G4Exp.hh" << 56 #include "G4NuclearRadii.hh" << 57 51 58 //....oooOO0OOooo........oooOO0OOooo........oo 52 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 59 53 60 namespace << 54 G4BGGNucleonInelasticXS::G4BGGNucleonInelasticXS(const G4ParticleDefinition* p) 61 { << 62 const G4double llog10 = G4Log(10.); << 63 } << 64 << 65 G4double G4BGGNucleonInelasticXS::theGlauberFa << 66 G4double G4BGGNucleonInelasticXS::theCoulombFa << 67 G4double G4BGGNucleonInelasticXS::theGlauberFa << 68 G4double G4BGGNucleonInelasticXS::theCoulombFa << 69 G4int G4BGGNucleonInelasticXS::theA[93] = {0}; << 70 << 71 G4BGGNucleonInelasticXS::G4BGGNucleonInelastic << 72 : G4VCrossSectionDataSet("BarashenkovGlauberG << 73 { 55 { 74 verboseLevel = 0; 56 verboseLevel = 0; 75 fGlauberEnergy = 91.*CLHEP::GeV; << 57 thEnergy = 100.*GeV; 76 fLowEnergy = 14.*CLHEP::MeV; << 58 if(p == G4Proton::Proton() || p == G4Neutron::Neutron()) { 77 << 59 fNucleon = new G4NucleonNuclearCrossSection(); 78 fNucleon = new G4NucleonNuclearCrossSection( << 60 fGlauber = new G4GlauberGribovCrossSection(); 79 fGlauber = new G4ComponentGGHadronNucleusXsc << 61 particle = p; 80 fHadron = new G4HadronNucleonXsc(); << 62 Initialise(); 81 << 63 } else { 82 theProton= G4Proton::Proton(); << 64 fNucleon = 0; 83 isProton = (theProton == p); << 65 fGlauber = 0; 84 SetForAllAtomsAndEnergies(true); << 66 particle = 0; 85 << 67 if(p) G4cout << "### G4BGGNucleonInelasticXS WARNING: is not applicable to " 86 if (0 == theA[0]) { Initialise(); } << 68 << p->GetParticleName() >> 69 << G4endl; >> 70 else G4cout << "### G4BGGNucleonInelasticXS WARNING: particle is not defined " >> 71 << G4endl; >> 72 } 87 } 73 } 88 74 89 //....oooOO0OOooo........oooOO0OOooo........oo 75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 90 76 91 G4BGGNucleonInelasticXS::~G4BGGNucleonInelasti 77 G4BGGNucleonInelasticXS::~G4BGGNucleonInelasticXS() 92 { 78 { 93 delete fHadron; << 79 delete fGlauber; 94 } << 80 delete fNucleon; 95 << 96 //....oooOO0OOooo........oooOO0OOooo........oo << 97 << 98 G4bool G4BGGNucleonInelasticXS::IsElementAppli << 99 << 100 { << 101 return true; << 102 } 81 } 103 82 104 //....oooOO0OOooo........oooOO0OOooo........oo 83 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 105 84 106 G4bool G4BGGNucleonInelasticXS::IsIsoApplicabl << 85 G4double G4BGGNucleonInelasticXS::GetIsoZACrossSection(const G4DynamicParticle* dp, 107 << 86 G4double Z, 108 << 87 G4double A, 109 << 88 G4double) 110 { << 111 return (1 == Z); << 112 } << 113 << 114 //....oooOO0OOooo........oooOO0OOooo........oo << 115 << 116 G4double << 117 G4BGGNucleonInelasticXS::GetElementCrossSectio << 118 << 119 { 89 { 120 G4double cross = 0.0; 90 G4double cross = 0.0; 121 G4double ekin = dp->GetKineticEnergy(); 91 G4double ekin = dp->GetKineticEnergy(); 122 G4int Z = std::min(ZZ, 92); << 92 G4int iz = G4int(Z + 0.5); 123 if (1 == Z) { << 93 if(iz > 92) iz = 92; 124 cross = 1.0115*GetIsoCrossSection(dp,1,1); << 94 >> 95 if(ekin > thEnergy) { >> 96 cross = theFac[iz]*fGlauber->GetInelasticGlauberGribov(dp, Z, A); 125 } else { 97 } else { 126 if (ekin <= fLowEnergy) { << 98 cross = fNucleon->GetIsoZACrossSection(dp, Z, A); 127 cross = CoulombFactor(ekin, Z); << 128 cross *= (isProton) ? theCoulombFacP[Z] << 129 } else if (ekin > fGlauberEnergy) { << 130 cross = fGlauber->GetInelasticGlauberGri << 131 cross *= (isProton) ? theGlauberFacP[Z] << 132 } else { << 133 cross = fNucleon->GetElementCrossSection << 134 } << 135 } 99 } 136 100 137 #ifdef G4VERBOSE << 101 if(verboseLevel > 1) 138 if (verboseLevel > 1) { << 139 G4cout << "G4BGGNucleonInelasticXS::GetCro 102 G4cout << "G4BGGNucleonInelasticXS::GetCrossSection for " 140 << dp->GetDefinition()->GetParticle << 103 << dp->GetDefinition()->GetParticleName() 141 << " Ekin(GeV)= " << dp->GetKineti << 104 << " Ekin(GeV)= " << dp->GetKineticEnergy() 142 << " in nucleus Z= " << Z << " A= << 105 << " in nucleus Z= " << Z << " A= " << A 143 << " XS(b)= " << cross/barn << 106 << " XS(b)= " << cross/barn 144 << G4endl; << 107 << G4endl; 145 } << 108 146 #endif << 147 return cross; 109 return cross; 148 } 110 } 149 111 150 //....oooOO0OOooo........oooOO0OOooo........oo 112 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 151 113 152 G4double << 114 void G4BGGNucleonInelasticXS::BuildPhysicsTable(const G4ParticleDefinition&) 153 G4BGGNucleonInelasticXS::GetIsoCrossSection(co << 154 G4int, << 155 const G << 156 const G << 157 const G << 158 { 115 { 159 // this method should be called only for Z = << 160 fHadron->HadronNucleonXscNS(dp->GetDefinitio << 161 dp->GetKineticEnerg << 162 G4double cross = A*fHadron->GetInelasticHadr << 163 << 164 #ifdef G4VERBOSE << 165 if(verboseLevel > 1) { << 166 G4cout << "G4BGGNucleonInelasticXS::GetIso << 167 << dp->GetDefinition()->GetParticle << 168 << " Ekin(GeV)= " << dp->GetKineti << 169 << " in nucleus Z=1 A=" << A << 170 << " XS(b)= " << cross/barn << 171 << G4endl; << 172 } << 173 #endif << 174 return cross; << 175 } 116 } 176 117 177 //....oooOO0OOooo........oooOO0OOooo........oo 118 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 178 119 179 void G4BGGNucleonInelasticXS::BuildPhysicsTabl << 120 void G4BGGNucleonInelasticXS::DumpPhysicsTable(const G4ParticleDefinition&) 180 { 121 { 181 if(&p == theProton || &p == G4Neutron::Neutr << 122 G4cout << "G4BGGNucleonInelasticXS:"<<G4endl; 182 isProton = (theProton == &p); << 183 } else { << 184 G4ExceptionDescription ed; << 185 ed << "This BGG cross section is applicabl << 186 << p.GetParticleName() << G4endl; << 187 G4Exception("G4BGGNucleonInelasticXS::Buil << 188 FatalException, ed); << 189 return; << 190 } << 191 } 123 } 192 124 193 //....oooOO0OOooo........oooOO0OOooo........oo 125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 194 126 195 void G4BGGNucleonInelasticXS::Initialise() << 127 void G4BGGNucleonInelasticXS::Initialise() 196 { 128 { 197 theA[0] = theA[1] = 1; << 129 G4ParticleDefinition* part = const_cast<G4ParticleDefinition*>(particle); 198 G4ThreeVector mom(0.0,0.0,1.0); 130 G4ThreeVector mom(0.0,0.0,1.0); 199 G4DynamicParticle dp(theProton, mom, fGlaube << 131 G4DynamicParticle dp(part, mom, thEnergy); 200 132 201 G4NistManager* nist = G4NistManager::Instanc 133 G4NistManager* nist = G4NistManager::Instance(); 202 G4double csup, csdn; << 134 G4double A = nist->GetAtomicMassAmu(2); 203 << 204 for (G4int iz=2; iz<93; ++iz) { << 205 << 206 G4int A = G4lrint(nist->GetAtomicMassAmu(i << 207 theA[iz] = A; << 208 << 209 csup = fGlauber->GetInelasticGlauberGribov << 210 csdn = fNucleon->GetElementCrossSection(&d << 211 theGlauberFacP[iz] = csdn/csup; << 212 } << 213 << 214 dp.SetDefinition(G4Neutron::Neutron()); << 215 for (G4int iz=2; iz<93; ++iz) { << 216 csup = fGlauber->GetInelasticGlauberGribov << 217 csdn = fNucleon->GetElementCrossSection(&d << 218 theGlauberFacN[iz] = csdn/csup; << 219 << 220 if(verboseLevel > 1) { << 221 G4cout << "G4BGGNucleonInelasticXS::Init << 222 << " GFactorP= " << theGlauberFacP[iz] << 223 << " GFactorN= " << theGlauberFacN[iz] << 224 } << 225 } << 226 135 227 theCoulombFacP[1] = theCoulombFacN[1] = 1.0; << 136 G4double csup, csdn; 228 dp.SetDefinition(theProton); << 229 dp.SetKineticEnergy(fLowEnergy); << 230 for (G4int iz=2; iz<93; ++iz) { << 231 theCoulombFacP[iz] = fNucleon->GetElementC << 232 /CoulombFactor(fLowEnergy, iz); << 233 } << 234 dp.SetDefinition(G4Neutron::Neutron()); << 235 for (G4int iz=2; iz<93; ++iz) { << 236 theCoulombFacN[iz] = fNucleon->GetElementC << 237 /CoulombFactor(fLowEnergy, iz); << 238 << 239 if (verboseLevel > 1) { << 240 G4cout << "G4BGGNucleonInelasticXS::Init << 241 << " CFactorP= " << theCoulombFacP[iz] << 242 << " CFactorN= " << theCoulombFacN[iz] << 243 } << 244 } << 245 } << 246 137 247 //....oooOO0OOooo........oooOO0OOooo........oo << 138 if(verboseLevel > 0) G4cout << "### G4BGGNucleonInelasticXS::Initialise for " >> 139 << particle->GetParticleName() << G4endl; 248 140 249 G4double G4BGGNucleonInelasticXS::CoulombFacto << 141 for(G4int iz=2; iz<93; iz++) { 250 { << 251 G4double res = 0.0; << 252 142 253 if(kinEnergy <= 0.0) { return res; } << 143 G4double Z = G4double(iz); >> 144 A = nist->GetAtomicMassAmu(iz); 254 145 255 G4double elog = G4Log(kinEnergy/GeV)/llog10; << 146 csup = fGlauber->GetInelasticGlauberGribov(&dp, Z, A); 256 G4double aa = theA[Z]; << 147 csdn = fNucleon->GetIsoZACrossSection(&dp, Z, A); 257 << 258 if(isProton) { << 259 << 260 res = G4NuclearRadii::CoulombFactor(Z, aa, << 261 << 262 // from G4ProtonInelasticCrossSection << 263 if(res > 0.0) { << 264 G4double ff1 = 5.6 - 0.016*aa; // slope << 265 G4double ff2 = 1.37 + 1.37/aa; // start << 266 G4double ff3 = 0.8 + 18./aa - 0.002*aa; << 267 res *= (1.0 + ff3*(1.0 - (1.0/(1+G4Exp(- << 268 ff1 = 8. - 8./aa - 0.008*aa; // slope << 269 ff2 = 2.34 - 5.4/aa - 0.0028*aa; // star << 270 res /= (1.0 + G4Exp(-ff1*(elog + ff2))); << 271 } << 272 } else { << 273 // from G4NeutronInelasticCrossSection << 274 G4double p3 = 0.6 + 13./aa - 0.0005*aa; << 275 G4double p4 = 7.2449 - 0.018242*aa; << 276 G4double p5 = 1.36 + 1.8/aa + 0.0005*aa; << 277 G4double p6 = 1. + 200./aa + 0.02*aa; << 278 G4double p7 = 3.0 - (aa-70.)*(aa-200.)/110 << 279 << 280 G4double firstexp = G4Exp(-p4*(elog + p5) << 281 G4double secondexp = G4Exp(-p6*(elog + p7) << 282 148 283 res = (1. + p3*firstexp/(1. + firstexp))/( << 149 theFac[iz] = csdn/csup; >> 150 if(verboseLevel > 0) G4cout << "Z= " << Z << " A= " << A >> 151 << " factor= " << theFac[iz] << G4endl; 284 } 152 } 285 return res; << 286 } 153 } 287 154 288 //....oooOO0OOooo........oooOO0OOooo........oo 155 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 289 156 290 void G4BGGNucleonInelasticXS::CrossSectionDesc << 291 { << 292 outFile << "The Barashenkov-Glauber-Gribov c << 293 << "scattering of protons and neutro << 294 << "Barashenkov parameterization bel << 295 << "parameterization above 91 GeV. << 296 << "cross section component for hydr << 297 << "G4ComponentGGHadronNucleusXsc co << 298 } << 299 157 300 //....oooOO0OOooo........oooOO0OOooo........oo << 301 158