#include <G4INCLPauliStandard.hh>
Inheritance diagram for G4INCL::PauliStandard:
Public Member Functions | |
PauliStandard () | |
~PauliStandard () | |
G4bool | isBlocked (ParticleList const, Nucleus const *const) const |
G4double | getBlockingProbability (Particle const *const, Nucleus const *const) const |
Definition at line 43 of file G4INCLPauliStandard.hh.
G4INCL::PauliStandard::PauliStandard | ( | ) |
Definition at line 45 of file G4INCLPauliStandard.cc.
References DEBUG.
00045 : 00046 cellSize(std::pow(2.38*4.5*Math::pi,1./6.)*std::sqrt(PhysicalConstants::hc)) 00047 { 00048 DEBUG("Initialising PauliStandard. cellSize=" << cellSize << std::endl); 00049 }
G4INCL::PauliStandard::~PauliStandard | ( | ) |
G4double G4INCL::PauliStandard::getBlockingProbability | ( | Particle const * | const, | |
Nucleus const * | const | |||
) | const |
Definition at line 61 of file G4INCLPauliStandard.cc.
References G4INCL::Nucleus::getDensity(), G4INCL::NuclearPotential::INuclearPotential::getFermiMomentum(), G4INCL::Particle::getID(), G4INCL::Particle::getMomentum(), G4INCL::NuclearDensity::getNuclearRadius(), G4INCL::Store::getParticles(), G4INCL::Particle::getPosition(), G4INCL::Nucleus::getPotential(), G4INCL::Nucleus::getStore(), G4INCL::Particle::getType(), G4INCL::Nucleus::getUniverseRadius(), G4INCL::PhysicalConstants::hc, G4INCL::ThreeVector::mag(), G4INCL::ThreeVector::mag2(), G4INCL::Math::pi, and G4INCL::Math::twoPi.
Referenced by isBlocked().
00061 { 00062 const G4double r0 = nucleus->getDensity()->getNuclearRadius(); 00063 const G4double pFermi = nucleus->getPotential()->getFermiMomentum(particle); 00064 00065 const G4double pbl = cellSize * std::sqrt(pFermi/r0); 00066 const G4double rbl = pbl * r0/pFermi; 00067 const G4double maxVolR = rbl; 00068 const G4double maxVolP = pbl; 00069 G4double vol = std::pow(4.*Math::pi/3.0, 2) 00070 * std::pow(maxVolR*maxVolP/(Math::twoPi*PhysicalConstants::hc), 3); 00071 00072 const G4double rdeq = nucleus->getUniverseRadius(); 00073 const G4double rs = particle->getPosition().mag(); 00074 00075 if(rs - maxVolR > rdeq) { 00076 return 0.0; 00077 } 00078 00079 if(rs + maxVolR > rdeq) { 00080 vol = vol * 0.5 * (rdeq - rs + maxVolR) / maxVolR; 00081 } 00082 00083 // Get the list of particles that are currently inside the 00084 // nucleus. 00085 ParticleList particles = nucleus->getStore()->getParticles(); 00086 00087 G4int nl = 0; 00088 for(ParticleIter it = particles.begin(); it != particles.end(); ++it) { 00089 // Skip comparing with the same particle 00090 if( (*it)->getID() == particle->getID() ) continue; 00091 00092 if((*it)->getType() == particle->getType()) { 00093 const ThreeVector dx2v = particle->getPosition() - (*it)->getPosition(); 00094 const G4double dx2 = dx2v.mag2(); 00095 if(dx2 > maxVolR * maxVolR) continue; 00096 00097 const ThreeVector dp2v = particle->getMomentum() - (*it)->getMomentum(); 00098 const G4double dp2 = dp2v.mag2(); 00099 if(dp2 > maxVolP * maxVolP) continue; 00100 00101 nl++; 00102 } 00103 } 00104 const G4double blockingProbability = ((G4double) nl) / vol / 2.0; 00105 00106 if(blockingProbability > 1.0) return 1.0; 00107 else if(blockingProbability < 0.0) return 0.0; 00108 else return blockingProbability; 00109 }
G4bool G4INCL::PauliStandard::isBlocked | ( | ParticleList | const, | |
Nucleus const * | const | |||
) | const [virtual] |
Implements G4INCL::IPauli.
Definition at line 53 of file G4INCLPauliStandard.cc.
References getBlockingProbability(), CLHEP::detail::n, and G4INCL::Random::shoot().
00053 { 00054 for(ParticleIter p = pL.begin(); p != pL.end(); ++p) { 00055 if( !(*p)->isNucleon() ) continue; 00056 if(getBlockingProbability(*p, n) > Random::shoot()) return true; 00057 } 00058 return false; 00059 }