33 #define INCLXX_IN_GEANT4_MODE 1
55 :
IAvatar(time), theParticle(aParticle), theNucleus(n),
64 sinRefractionAngle(0.),
65 cosRefractionAngle(0.),
66 refractionIndexRatio(0.),
67 internalReflection(false)
100 INCL_DEBUG(
"Transmission probability for particle " <<
theParticle->
getID() <<
" = " << transmissionProbability << std::endl);
111 && transmissionProbability>1.E-4) {
115 if(candidateCluster != 0 &&
118 INCL_DEBUG(
"Cluster algorithm succeded. Candidate cluster:" << std::endl << candidateCluster->
print() << std::endl);
124 INCL_DEBUG(
"Transmission probability for cluster " << candidateCluster->
getID() <<
" = " << clusterTransmissionProbability << std::endl);
126 if (x <= clusterTransmissionProbability) {
128 INCL_DEBUG(
"Cluster " << candidateCluster->
getID() <<
" passes the Coulomb barrier, transmitting." << std::endl);
131 INCL_DEBUG(
"Cluster " << candidateCluster->
getID() <<
" does not pass the Coulomb barrier. Falling back to transmission of the leading particle." << std::endl);
132 delete candidateCluster;
135 delete candidateCluster;
152 if(x <= transmissionProbability) {
173 if(!outgoing.empty()) {
180 for(
ParticleIter i=components.begin(), e=components.end(); i!=e; ++i) {
181 if(!(*i)->isTargetSpectator())
193 std::stringstream ss;
194 ss <<
"(avatar " <<
theTime <<
" 'reflection" << std::endl
195 <<
"(list " << std::endl
197 <<
"))" << std::endl;
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 =
263 *(std::acos(px)-px*std::sqrt(1.-px*px));
264 INCL_DEBUG(
"Coulomb barrier, logCoulombTransmission=" << logCoulombTransmission << std::endl);
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 getCosRPAngle() const
Get the cosine of the angle between position and momentum.
G4bool isResonance() const
Is it a resonance?
G4INCL::IChannel * getChannel()
G4double getMass() const
Get the cached particle mass.
Channel generates a final state of an avatar.
virtual FinalState * postInteraction(FinalState *)
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
G4INCL::FinalState * getFinalState()
G4bool isTargetSpectator() const
const G4INCL::ThreeVector & getMomentum() const
Get the momentum vector.
Config const * getConfig()
Get the config object.
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.
static G4bool clusterCanEscape(Nucleus const *const n, Cluster const *const c)
Determine whether cluster can escape or not.
G4double getFermiEnergy(const Particle *const p) const
Return the Fermi energy for a particle.
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()
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.
static Cluster * getCluster(Nucleus *n, Particle *p)
Choose a cluster candidate to be produced.
G4bool isProjectileSpectator() const
virtual G4INCL::FinalState * getFinalState()=0
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.
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