34 #define INCLXX_IN_GEANT4_MODE 1
56 :
IAvatar(time), theParticle(aParticle), theNucleus(n),
65 sinRefractionAngle(0.),
66 cosRefractionAngle(0.),
67 refractionIndexRatio(0.),
68 internalReflection(false)
112 && transmissionProbability>1.
E-4) {
116 if(candidateCluster != 0 &&
119 INCL_DEBUG(
"Cluster algorithm succeded. Candidate cluster:" <<
'\n' << candidateCluster->
print() <<
'\n');
125 INCL_DEBUG(
"Transmission probability for cluster " << candidateCluster->
getID() <<
" = " << clusterTransmissionProbability <<
'\n');
127 if (x <= clusterTransmissionProbability) {
129 INCL_DEBUG(
"Cluster " << candidateCluster->
getID() <<
" passes the Coulomb barrier, transmitting." <<
'\n');
132 INCL_DEBUG(
"Cluster " << candidateCluster->
getID() <<
" does not pass the Coulomb barrier. Falling back to transmission of the leading particle." <<
'\n');
133 delete candidateCluster;
136 delete candidateCluster;
153 if(x <= transmissionProbability) {
174 if(!outgoing.empty()) {
181 for(
ParticleIter i=components.begin(),
e=components.end(); i!=
e; ++i) {
182 if(!(*i)->isTargetSpectator())
194 std::stringstream
ss;
195 ss <<
"(avatar " <<
theTime <<
" 'reflection" <<
'\n'
229 G4double theTransmissionProbability;
241 theTransmissionProbability = 1. - y*
y;
248 theTransmissionProbability = 4.*
particlePIn*particlePOut/(y*
y);
253 const G4int particleZ = particle->
getZ();
254 if (particleZ <= 0 || particleZ >= theZ)
255 return theTransmissionProbability;
259 if (TMinusV >= theTransmissionBarrier)
260 return theTransmissionProbability;
263 const G4double px = std::sqrt(TMinusV/theTransmissionBarrier);
264 const G4double logCoulombTransmission =
267 INCL_DEBUG(
"Coulomb barrier, logCoulombTransmission=" << logCoulombTransmission <<
'\n');
268 if (logCoulombTransmission > 35.)
270 theTransmissionProbability *= std::exp(-2.*logCoulombTransmission);
272 return theTransmissionProbability;
290 INCL_DEBUG(
"Refraction parameters initialised as follows:\n"
291 <<
" cosIncidentAngle=" << cosIncidentAngle <<
'\n'
292 <<
" sinIncidentAngle=" << sinIncidentAngle <<
'\n'
ParticleList::const_iterator ParticleIter
NuclearPotential::INuclearPotential const * getPotential() const
Getter for thePotential.
G4bool isNucleonorLambda() const
Is this a Nucleon or a Lambda?
void incrementEmittedClusters()
G4double getCosRPAngle() const
Get the cosine of the angle between position and momentum.
void setType(AvatarType t)
G4bool clusterCanEscape(Nucleus const *const n, Cluster const *const c)
Determine whether the cluster can escape or not.
G4double getKineticEnergy() const
Get the particle kinetic energy.
const G4INCL::ThreeVector & getMomentum() const
Static class for cluster formation.
G4INCL::Particle * theParticle
virtual void fillFinalState(FinalState *fs)=0
G4double getMass() const
Get the cached particle mass.
std::string print() const
void setBiasCollisionVector(std::vector< G4int > BiasCollisionVector)
Set the vector list of biased vertices on the particle path.
G4bool isResonance() const
Is it a resonance?
G4double sinIncidentAngle
Cluster * getCluster(Nucleus *n, Particle *p)
Call the clustering algorithm.
virtual void preInteraction()
G4double sinRefractionAngle
ParticleList const & getParticles() const
G4double getPotentialEnergy() const
Get the particle potential energy.
G4bool getRefraction() const
True if we should use refraction.
G4double arcCos(const G4double x)
Calculates arccos with some tolerance on illegal arguments.
G4int getZ() const
Returns the charge number.
G4int getA() const
Returns the baryon number.
SurfaceAvatar(G4INCL::Particle *aParticle, G4double time, G4INCL::Nucleus *aNucleus)
void rpCorrelate()
Make the particle follow a strict r-p correlation.
G4double getTransmissionProbability(Particle const *const particle)
Calculate the transmission probability for the particle.
G4bool isTargetSpectator() const
virtual void postInteraction(FinalState *)
G4double cosRefractionAngle
ParticleList const & getOutgoingParticles() const
Config const * getConfig()
G4double getEmissionQValueCorrection(const G4int AParent, const G4int ZParent) const
Computes correction on the emission Q-value.
void decrementCascading()
G4INCL::Nucleus * theNucleus
G4double getFermiEnergy(const Particle *const p) const
Return the Fermi energy for a particle.
G4double getTransmissionBarrier(Particle const *const p)
Get the transmission barrier.
G4double cosIncidentAngle
void initializeRefractionVariables(Particle const *const particle)
G4double refractionIndexRatio
G4bool isProjectileSpectator() const
G4bool isNucleusNucleusCollision() const
Is it a nucleus-nucleus collision?
G4bool internalReflection
std::vector< G4int > getParticleListBiasVector() const
void fillFinalState(FinalState *fs)