Geant4_10
G4INCLPauliStandard.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // INCL++ intra-nuclear cascade model
27 // Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
28 // Davide Mancusi, CEA
29 // Alain Boudard, CEA
30 // Sylvie Leray, CEA
31 // Joseph Cugnon, University of Liege
32 //
33 #define INCLXX_IN_GEANT4_MODE 1
34 
35 #include "globals.hh"
36 
37 #include "G4INCLPauliStandard.hh"
38 #include "G4INCLPauliBlocking.hh"
39 #include "G4INCLGlobals.hh"
40 #include "G4INCLRandom.hh"
41 
42 namespace G4INCL {
43 
44 
46  cellSize(std::pow(2.38*4.5*Math::pi,1./6.)*std::sqrt(PhysicalConstants::hc))
47  {
48  INCL_DEBUG("Initialising PauliStandard. cellSize=" << cellSize << std::endl);
49  }
50 
52 
54  for(ParticleIter p=pL.begin(), e=pL.end(); p!=e; ++p) {
55  if( !(*p)->isNucleon() ) continue;
56  if(getBlockingProbability(*p, n) > Random::shoot()) return true;
57  }
58  return false;
59  }
60 
61  G4double PauliStandard::getBlockingProbability(Particle const * const particle, Nucleus const * const nucleus) const {
62  const G4double r0 = ParticleTable::getNuclearRadius(particle->getType(), nucleus->getA(), nucleus->getZ());
63  const G4double pFermi = nucleus->getPotential()->getFermiMomentum(particle);
64 
65  const G4double pbl = cellSize * std::sqrt(pFermi/r0);
66  const G4double rbl = pbl * r0/pFermi;
67  const G4double maxVolR = rbl;
68  const G4double maxVolP = pbl;
69  G4double vol = std::pow(4.*Math::pi/3.0, 2)
70  * std::pow(maxVolR*maxVolP/(Math::twoPi*PhysicalConstants::hc), 3);
71 
72  const G4double rdeq = nucleus->getUniverseRadius();
73  const G4double rs = particle->getPosition().mag();
74 
75  if(rs - maxVolR > rdeq) {
76  return 0.0;
77  }
78 
79  if(rs + maxVolR > rdeq) {
80  vol = vol * 0.5 * (rdeq - rs + maxVolR) / maxVolR;
81  }
82 
83  // Get the list of particles that are currently inside the
84  // nucleus.
85  ParticleList const &particles = nucleus->getStore()->getParticles();
86 
87  G4int nl = 0;
88  for(ParticleIter it=particles.begin(), e=particles.end(); it!=e; ++it) {
89  // Skip comparing with the same particle
90  if( (*it)->getID() == particle->getID() ) continue;
91 
92  if((*it)->getType() == particle->getType()) {
93  const ThreeVector dx2v = particle->getPosition() - (*it)->getPosition();
94  const G4double dx2 = dx2v.mag2();
95  if(dx2 > maxVolR * maxVolR) continue;
96 
97  const ThreeVector dp2v = particle->getMomentum() - (*it)->getMomentum();
98  const G4double dp2 = dp2v.mag2();
99  if(dp2 > maxVolP * maxVolP) continue;
100 
101  nl++;
102  }
103  }
104  const G4double blockingProbability = ((G4double) nl) / vol / 2.0;
105 
106  if(blockingProbability > 1.0) return 1.0;
107  else if(blockingProbability < 0.0) return 0.0;
108  else return blockingProbability;
109  }
110 }
G4int getA() const
Returns the baryon number.
ParticleList const & getParticles() const
Definition: G4INCLStore.hh:231
G4double getFermiMomentum(const Particle *const p) const
Return the Fermi momentum for a particle.
const char * p
Definition: xmltok.h:285
const G4double pi
const G4double hc
[MeV*fm]
const G4INCL::ThreeVector & getMomentum() const
Store * getStore() const
G4bool isBlocked(ParticleList const &, Nucleus const *const)
int G4int
Definition: G4Types.hh:78
G4double mag2() const
G4double getNuclearRadius(const ParticleType t, const G4int A, const G4int Z)
Char_t n[5]
bool G4bool
Definition: G4Types.hh:79
G4int getZ() const
Returns the charge number.
G4double getBlockingProbability(Particle const *const, Nucleus const *const) const
NuclearPotential::INuclearPotential const * getPotential() const
Getter for thePotential.
G4INCL::ParticleType getType() const
const G4INCL::ThreeVector & getPosition() const
const G4double twoPi
G4double shoot()
Definition: G4INCLRandom.cc:74
G4double getUniverseRadius() const
Getter for theUniverseRadius.
G4double mag() const
double G4double
Definition: G4Types.hh:76
#define INCL_DEBUG(x)
ParticleList::const_iterator ParticleIter
long getID() const