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