Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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// INCL++ revision: v5.1.8
34//
35#define INCLXX_IN_GEANT4_MODE 1
36
37#include "globals.hh"
38
41#include "G4INCLGlobals.hh"
42#include "G4INCLRandom.hh"
43
44namespace G4INCL {
45
46
48 cellSize(std::pow(2.38*4.5*Math::pi,1./6.)*std::sqrt(PhysicalConstants::hc))
49 {
50 DEBUG("Initialising PauliStandard. cellSize=" << cellSize << std::endl);
51 }
52
54
55 G4bool PauliStandard::isBlocked(ParticleList const pL, Nucleus const * const n) const {
56 for(ParticleIter p = pL.begin(); p != pL.end(); ++p) {
57 if( !(*p)->isNucleon() ) continue;
58 if(getBlockingProbability(*p, n) > Random::shoot()) return true;
59 }
60 return false;
61 }
62
63 G4double PauliStandard::getBlockingProbability(Particle const * const particle, Nucleus const * const nucleus) const {
64 const G4double r0 = nucleus->getDensity()->getNuclearRadius();
65 const G4double pFermi = nucleus->getPotential()->getFermiMomentum(particle);
66
67 const G4double pbl = cellSize * std::sqrt(pFermi/r0);
68 const G4double rbl = pbl * r0/pFermi;
69 const G4double maxVolR = rbl;
70 const G4double maxVolP = pbl;
71 G4double vol = std::pow(4.*Math::pi/3.0, 2)
72 * std::pow(maxVolR*maxVolP/(Math::twoPi*PhysicalConstants::hc), 3);
73
74 const G4double rdeq = nucleus->getUniverseRadius();
75 const G4double rs = particle->getPosition().mag();
76
77 if(rs - maxVolR > rdeq) {
78 return 0.0;
79 }
80
81 if(rs + maxVolR > rdeq) {
82 vol = vol * 0.5 * (rdeq - rs + maxVolR) / maxVolR;
83 }
84
85 // Get the list of particles that are currently inside the
86 // nucleus.
87 ParticleList particles = nucleus->getStore()->getParticles();
88
89 G4int nl = 0;
90 for(ParticleIter it = particles.begin(); it != particles.end(); ++it) {
91 // Skip comparing with the same particle
92 if( (*it)->getID() == particle->getID() ) continue;
93
94 if((*it)->getType() == particle->getType()) {
95 const ThreeVector dx2v = particle->getPosition() - (*it)->getPosition();
96 const G4double dx2 = dx2v.mag2();
97 if(dx2 > maxVolR * maxVolR) continue;
98
99 const ThreeVector dp2v = particle->getMomentum() - (*it)->getMomentum();
100 const G4double dp2 = dp2v.mag2();
101 if(dp2 > maxVolP * maxVolP) continue;
102
103 nl++;
104 }
105 }
106 const G4double blockingProbability = ((G4double) nl) / vol / 2.0;
107
108 if(blockingProbability > 1.0) return 1.0;
109 else if(blockingProbability < 0.0) return 0.0;
110 else return blockingProbability;
111 }
112}
#define DEBUG(x)
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
G4double getFermiMomentum(const Particle *const p) const
Return the Fermi momentum for a particle.
NuclearPotential::INuclearPotential * getPotential() const
Getter for thePotential.
Store * getStore() const
NuclearDensity * getDensity() const
Getter for theDensity.
G4double getUniverseRadius() const
Getter for theUniverseRadius.
const G4INCL::ThreeVector & getPosition() const
const G4INCL::ThreeVector & getMomentum() const
G4INCL::ParticleType getType() const
long getID() const
G4bool isBlocked(ParticleList const, Nucleus const *const) const
G4double getBlockingProbability(Particle const *const, Nucleus const *const) const
static G4double shoot()
Definition: G4INCLRandom.hh:99
ParticleList const & getParticles() const
Definition: G4INCLStore.hh:237
G4double mag() const
G4double mag2() const
const G4double pi
const G4double twoPi
const G4double hc
[MeV*fm]
std::list< G4INCL::Particle * > ParticleList
std::list< G4INCL::Particle * >::const_iterator ParticleIter