Geant4 11.2.2
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// Alain Boudard, CEA-Saclay, France
28// Joseph Cugnon, University of Liege, Belgium
29// Jean-Christophe David, CEA-Saclay, France
30// Pekka Kaitaniemi, CEA-Saclay, France, and Helsinki Institute of Physics, Finland
31// Sylvie Leray, CEA-Saclay, France
32// Davide Mancusi, CEA-Saclay, France
33//
34#define INCLXX_IN_GEANT4_MODE 1
35
36#include "globals.hh"
37
40#include "G4INCLGlobals.hh"
41#include "G4INCLRandom.hh"
42
43namespace G4INCL {
44
45
47 cellSize(std::pow(2.38*4.5*Math::pi,1./6.)*std::sqrt(PhysicalConstants::hc))
48 {
49 INCL_DEBUG("Initialising PauliStandard. cellSize=" << cellSize << '\n');
50 }
51
53
55 for(ParticleIter p=pL.begin(), e=pL.end(); p!=e; ++p) {
56 if( !(*p)->isNucleon() ) continue;
57 if(getBlockingProbability(*p, n) > Random::shoot()) return true;
58 }
59 return false;
60 }
61
62 G4double PauliStandard::getBlockingProbability(Particle const * const particle, Nucleus const * const nucleus) const {
63 const G4double r0 = ParticleTable::getNuclearRadius(particle->getType(), nucleus->getA(), nucleus->getZ());
64 const G4double pFermi = nucleus->getPotential()->getFermiMomentum(particle);
65
66 const G4double pbl = cellSize * std::sqrt(pFermi/r0);
67 const G4double rbl = pbl * r0/pFermi;
68 const G4double maxVolR = rbl;
69 const G4double maxVolP = pbl;
70 G4double vol = std::pow(4.*Math::pi/3.0, 2)
71 * std::pow(maxVolR*maxVolP/(Math::twoPi*PhysicalConstants::hc), 3);
72
73 const G4double rdeq = nucleus->getUniverseRadius();
74 const G4double rs = particle->getPosition().mag();
75
76 if(rs - maxVolR > rdeq) {
77 return 0.0;
78 }
79
80 if(rs + maxVolR > rdeq) {
81 vol = vol * 0.5 * (rdeq - rs + maxVolR) / maxVolR;
82 }
83
84 // Get the list of particles that are currently inside the
85 // nucleus.
86 ParticleList const &particles = nucleus->getStore()->getParticles();
87
88 G4int nl = 0;
89 for(ParticleIter it=particles.begin(), e=particles.end(); it!=e; ++it) {
90 // Skip comparing with the same particle
91 if( (*it)->getID() == particle->getID() ) continue;
92
93 if((*it)->getType() == particle->getType()) {
94 const ThreeVector dx2v = particle->getPosition() - (*it)->getPosition();
95 const G4double dx2 = dx2v.mag2();
96 if(dx2 > maxVolR * maxVolR) continue;
97
98 const ThreeVector dp2v = particle->getMomentum() - (*it)->getMomentum();
99 const G4double dp2 = dp2v.mag2();
100 if(dp2 > maxVolP * maxVolP) continue;
101
102 nl++;
103 }
104 }
105 const G4double blockingProbability = ((G4double) nl) / vol / 2.0;
106
107 if(blockingProbability > 1.0) return 1.0;
108 else if(blockingProbability < 0.0) return 0.0;
109 else return blockingProbability;
110 }
111}
#define INCL_DEBUG(x)
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
G4double getFermiMomentum(const Particle *const p) const
Return the Fermi momentum for a particle.
Store * getStore() const
NuclearPotential::INuclearPotential const * getPotential() const
Getter for thePotential.
G4double getUniverseRadius() const
Getter for theUniverseRadius.
G4int getZ() const
Returns the charge number.
const G4INCL::ThreeVector & getPosition() const
const G4INCL::ThreeVector & getMomentum() const
G4INCL::ParticleType getType() const
G4int getA() const
Returns the baryon number.
G4double getBlockingProbability(Particle const *const, Nucleus const *const) const
G4bool isBlocked(ParticleList const &, Nucleus const *const)
ParticleList const & getParticles() const
G4double mag2() const
const G4double pi
const G4double twoPi
G4double getNuclearRadius(const ParticleType t, const G4int A, const G4int Z)
const G4double hc
[MeV*fm]
G4double shoot()
ParticleList::const_iterator ParticleIter