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 succeeded. 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) {
175 if(!outgoing.empty()) {
182 for(
ParticleIter i=components.begin(), e=components.end(); i!=e; ++i) {
183 if(!(*i)->isTargetSpectator())
195 std::stringstream ss;
196 ss <<
"(avatar " <<
theTime <<
" 'reflection" <<
'\n'
231 G4double theTransmissionProbability;
243 theTransmissionProbability = 1. - y*y;
255 const G4int particleZ = particle->
getZ();
256 if (particleZ <= 0 || particleZ >= theZ)
257 return theTransmissionProbability;
261 if (
TMinusV >= theTransmissionBarrier)
262 return theTransmissionProbability;
266 const G4double logCoulombTransmission =
269 INCL_DEBUG(
"Coulomb barrier, logCoulombTransmission=" << logCoulombTransmission <<
'\n');
270 if (logCoulombTransmission > 35.)
272 theTransmissionProbability *= std::exp(-2.*logCoulombTransmission);
274 return theTransmissionProbability;
292 INCL_DEBUG(
"Refraction parameters initialised as follows:\n"
Static class for cluster formation.
void decrementCascading()
void incrementEmittedClusters()
ParticleList const & getParticles() const
std::string print() const
G4bool getRefraction() const
True if we should use refraction.
ParticleList const & getOutgoingParticles() const
void setType(AvatarType t)
virtual void fillFinalState(FinalState *fs)=0
G4double getFermiEnergy(const Particle *const p) const
Return the Fermi energy for a particle.
G4bool isNucleusNucleusCollision() const
Is it a nucleus-nucleus collision?
G4double getTransmissionBarrier(Particle const *const p)
Get the transmission barrier.
NuclearPotential::INuclearPotential const * getPotential() const
Getter for thePotential.
std::vector< G4int > getParticleListBiasVector() const
G4int getS() const
Returns the strangeness number.
G4double getEmissionQValueCorrection(const G4int AParent, const G4int ZParent) const
Computes correction on the emission Q-value.
void setBiasCollisionVector(std::vector< G4int > BiasCollisionVector)
Set the vector list of biased vertices on the particle path.
void setNumberOfKaon(const G4int NK)
G4double getPotentialEnergy() const
Get the particle potential energy.
void rpCorrelate()
Make the particle follow a strict r-p correlation.
G4bool isNucleonorLambda() const
Is this a Nucleon or a Lambda?
G4int getZ() const
Returns the charge number.
G4double getKineticEnergy() const
Get the particle kinetic energy.
G4bool isTargetSpectator() const
G4double getCosRPAngle() const
Get the cosine of the angle between position and momentum.
G4bool isProjectileSpectator() const
const G4INCL::ThreeVector & getMomentum() const
G4bool isKaon() const
Is this a Kaon?
G4int getNumberOfKaon() const
Number of Kaon inside de nucleus.
G4bool isResonance() const
Is it a resonance?
G4double getMass() const
Get the cached particle mass.
G4int getA() const
Returns the baryon number.
Config const * getConfig()
G4double sinIncidentAngle
G4double sinRefractionAngle
void initializeRefractionVariables(Particle const *const particle)
G4double cosRefractionAngle
G4double refractionIndexRatio
SurfaceAvatar(G4INCL::Particle *aParticle, G4double time, G4INCL::Nucleus *aNucleus)
G4bool internalReflection
virtual void postInteraction(FinalState *)
G4double getTransmissionProbability(Particle const *const particle)
Calculate the transmission probability for the particle.
G4INCL::Particle * theParticle
G4INCL::Nucleus * theNucleus
G4double cosIncidentAngle
void fillFinalState(FinalState *fs)
virtual void preInteraction()
Cluster * getCluster(Nucleus *n, Particle *p)
Call the clustering algorithm.
G4bool clusterCanEscape(Nucleus const *const n, Cluster const *const c)
Determine whether the cluster can escape or not.
G4double arcCos(const G4double x)
Calculates arccos with some tolerance on illegal arguments.
ParticleList::const_iterator ParticleIter