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())
193 std::stringstream ss;
194 ss <<
"(avatar " <<
theTime <<
" 'reflection" <<
'\n'
225 G4double theTransmissionProbability;
237 theTransmissionProbability = 1. - y*y;
245 theTransmissionProbability = 4.*
particlePIn*particlePOut/(y*y);
250 const G4int particleZ = particle->
getZ();
251 if (particleZ <= 0 || particleZ >= theZ)
252 return theTransmissionProbability;
256 if (TMinusV >= theTransmissionBarrier)
257 return theTransmissionProbability;
260 const G4double px = std::sqrt(TMinusV/theTransmissionBarrier);
261 const G4double logCoulombTransmission =
264 INCL_DEBUG(
"Coulomb barrier, logCoulombTransmission=" << logCoulombTransmission <<
'\n');
265 if (logCoulombTransmission > 35.)
267 theTransmissionProbability *= std::exp(-2.*logCoulombTransmission);
269 return theTransmissionProbability;
287 INCL_DEBUG(
"Refraction parameters initialised as follows:\n"
288 <<
" cosIncidentAngle=" << cosIncidentAngle <<
'\n'
289 <<
" sinIncidentAngle=" << sinIncidentAngle <<
'\n'
G4int getA() const
Returns the baryon number.
G4double arcCos(const G4double x)
Calculates arccos with some tolerance on illegal arguments.
G4double getCosRPAngle() const
Get the cosine of the angle between position and momentum.
G4bool isResonance() const
Is it a resonance?
G4double getMass() const
Get the cached particle mass.
Channel generates a final state of an avatar.
ParticleList const & getParticles() const
Get the list of particles in the cluster.
G4bool internalReflection
G4bool isNucleusNucleusCollision() const
Is it a nucleus-nucleus collision?
G4INCL::Particle * theParticle
G4bool isTargetSpectator() const
const G4INCL::ThreeVector & getMomentum() const
Get the momentum vector.
Config const * getConfig()
Get the config object.
virtual void postInteraction(FinalState *)
G4double getTransmissionProbability(Particle const *const particle)
Calculate the transmission probability for the particle.
Cluster is a particle (inherits from the Particle class) that is actually a collection of elementary ...
G4double mag2() const
Get the square of the length.
G4double getPotentialEnergy() const
Get the particle potential energy.
G4double getFermiEnergy(const Particle *const p) const
Return the Fermi energy for a particle.
virtual void fillFinalState(FinalState *fs)=0
G4bool clusterCanEscape(Nucleus const *const n, Cluster const *const c)
Determine whether the cluster can escape or not.
void rpCorrelate()
Make the particle follow a strict r-p correlation.
ParticleList const & getOutgoingParticles() const
void initializeRefractionVariables(Particle const *const particle)
Final state of an interaction.
void setType(AvatarType t)
SurfaceAvatar(G4INCL::Particle *aParticle, G4double time, G4INCL::Nucleus *aNucleus)
Book & getBook()
Return the pointer to the Book object which keeps track of various counters.
G4double cosIncidentAngle
std::string print() const
G4double cosRefractionAngle
G4int getZ() const
Returns the charge number.
void incrementEmittedClusters()
Cluster * getCluster(Nucleus *n, Particle *p)
Call the clustering algorithm.
G4double sinRefractionAngle
NuclearPotential::INuclearPotential const * getPotential() const
Getter for thePotential.
void decrementCascading()
Static class for cluster formation.
G4double getTransmissionBarrier(Particle const *const p)
Get the transmission barrier.
const G4double x[NPOINTSGL]
G4bool isProjectileSpectator() const
virtual void preInteraction()
G4bool isNucleon() const
Is this a nucleon?
G4double shoot()
Generate flat distribution of random numbers.
G4double getKineticEnergy() const
Get the particle kinetic energy.
void fillFinalState(FinalState *fs)
G4double getEmissionQValueCorrection(const G4int AParent, const G4int ZParent) const
Computes correction on the emission Q-value.
G4INCL::Nucleus * theNucleus
G4double sinIncidentAngle
ParticleList::const_iterator ParticleIter
G4bool getRefraction() const
True if we should use refraction.
G4double refractionIndexRatio