G4INCL::PauliGlobal Class Reference

#include <G4INCLPauliGlobal.hh>

Inheritance diagram for G4INCL::PauliGlobal:

G4INCL::IPauli

Public Member Functions

 PauliGlobal ()
 ~PauliGlobal ()
G4bool isBlocked (ParticleList const, Nucleus const *const) const

Detailed Description

Definition at line 43 of file G4INCLPauliGlobal.hh.


Constructor & Destructor Documentation

G4INCL::PauliGlobal::PauliGlobal (  ) 

Definition at line 42 of file G4INCLPauliGlobal.cc.

00042 {}

G4INCL::PauliGlobal::~PauliGlobal (  ) 

Definition at line 43 of file G4INCLPauliGlobal.cc.

00043 {}


Member Function Documentation

G4bool G4INCL::PauliGlobal::isBlocked ( ParticleList  const,
Nucleus const *  const 
) const [virtual]

Implements G4INCL::IPauli.

Definition at line 45 of file G4INCLPauliGlobal.cc.

References CLHEP::detail::n, G4INCL::Proton, and G4INCL::Random::shoot().

00045                                                                                     {
00046     for(ParticleIter p=pL.begin(); p!=pL.end(); ++p) {
00047       // Pauli blocking only applies to nucleons
00048       if(!(*p)->isNucleon()) continue;
00049 
00050       // If the particle is above T_F, it is never blocked
00051       const ParticleType t = (*p)->getType();
00052       const G4double pFermi = n->getPotential()->getFermiMomentum(t);
00053       const G4double pFermiSquared = pFermi*pFermi;
00054       if((*p)->getMomentum().mag2() > pFermiSquared) continue;
00055 
00056       // Count particles of the same type as p below the Fermi sea
00057       const ParticleList particles = n->getStore()->getParticles();
00058       G4int nSea = 0;
00059       for(ParticleIter i=particles.begin(); i!=particles.end(); ++i) {
00060         if((*i)->getType() != t) continue;
00061         const G4double pmod2 = (*i)->getMomentum().mag2();
00062         if(pmod2<pFermiSquared) nSea++;
00063       }
00064 
00065       // Compute the blocking probability
00066       G4double probBlocking;
00067       if(t==Proton)
00068         probBlocking = ((G4double) nSea)/((G4double) n->getInitialZ());
00069       else
00070         probBlocking = ((G4double) nSea)/((G4double) (n->getInitialA() - n->getInitialZ()));
00071 
00072       // The avatar is blocked if any particle is blocked
00073       if(Random::shoot() < probBlocking) return true;
00074 
00075     }
00076 
00077     // Not blocked
00078     return false;
00079 
00080   }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:54:07 2013 for Geant4 by  doxygen 1.4.7