Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4INCL::PauliGlobal Class Reference

#include <G4INCLPauliGlobal.hh>

Inheritance diagram for G4INCL::PauliGlobal:
Collaboration diagram for G4INCL::PauliGlobal:

Public Member Functions

 PauliGlobal ()
 
 ~PauliGlobal ()
 
G4bool isBlocked (ParticleList const &, Nucleus const *const)
 
- Public Member Functions inherited from G4INCL::IPauli
 IPauli ()
 
virtual ~IPauli ()
 

Detailed Description

Definition at line 44 of file G4INCLPauliGlobal.hh.

Constructor & Destructor Documentation

G4INCL::PauliGlobal::PauliGlobal ( )

Definition at line 43 of file G4INCLPauliGlobal.cc.

43 {}
G4INCL::PauliGlobal::~PauliGlobal ( )

Definition at line 44 of file G4INCLPauliGlobal.cc.

44 {}

Member Function Documentation

G4bool G4INCL::PauliGlobal::isBlocked ( ParticleList const &  pL,
Nucleus const * const  n 
)
virtual

Implements G4INCL::IPauli.

Definition at line 46 of file G4INCLPauliGlobal.cc.

46  {
47  for(ParticleIter p=pL.begin(), e=pL.end(); p!=e; ++p) {
48  // Pauli blocking only applies to nucleons
49  if(!(*p)->isNucleon()) continue;
50 
51  // If the particle is above T_F, it is never blocked
52  const ParticleType t = (*p)->getType();
53  const G4double pFermi = n->getPotential()->getFermiMomentum(t);
54  const G4double pFermiSquared = pFermi*pFermi;
55  if((*p)->getMomentum().mag2() > pFermiSquared) continue;
56 
57  // Count particles of the same type as p below the Fermi sea
58  ParticleList const &particles = n->getStore()->getParticles();
59  G4int nSea = 0;
60  for(ParticleIter i=particles.begin(), end=particles.end(); i!=end; ++i) {
61  if((*i)->getType() != t) continue;
62  const G4double pmod2 = (*i)->getMomentum().mag2();
63  if(pmod2<pFermiSquared) nSea++;
64  }
65 
66  // Compute the blocking probability
67  G4double probBlocking;
68  if(t==Proton)
69  probBlocking = ((G4double) nSea)/((G4double) n->getInitialZ());
70  else
71  probBlocking = ((G4double) nSea)/((G4double) (n->getInitialA() - n->getInitialZ()));
72 
73  // The avatar is blocked if any particle is blocked
74  if(Random::shoot() < probBlocking) return true;
75 
76  }
77 
78  // Not blocked
79  return false;
80 
81  }
const char * p
Definition: xmltok.h:285
int G4int
Definition: G4Types.hh:78
G4double shoot()
Definition: G4INCLRandom.cc:93
double G4double
Definition: G4Types.hh:76
ParticleList::const_iterator ParticleIter

Here is the call graph for this function:


The documentation for this class was generated from the following files: