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