34 #define INCLXX_IN_GEANT4_MODE 1
46 :theNucleus(n), theParticle(p)
119 const G4double theProjectileExcitationEnergy =
127 const G4double theProjectileEffectiveMass =
129 + theProjectileExcitationEnergy;
131 const G4double theProjectileEnergy = std::sqrt(theProjectileMomentum.mag2() + theProjectileEffectiveMass*theProjectileEffectiveMass);
137 + theProjectileCorrection;
147 INCL_DEBUG(
"The following Particle enters with correction " << theCorrection <<
'\n'
184 theQValueCorrection(correction),
192 normal = - position / std::sqrt(r2);
194 if(cosIncidenceAngle < -1.)
195 sinIncidenceAnglePOut = 0.;
197 sinIncidenceAnglePOut = theMomentumDirection.mag()*std::sqrt(1.-cosIncidenceAngle*cosIncidenceAngle);
199 sinIncidenceAnglePOut = 0.;
202 ~IncomingEFunctor() {}
204 G4double energyInside =
std::max(theMass, theEnergy + v - theQValueCorrection);
209 const G4double pIn = std::sqrt(energyInside*energyInside-theMass*theMass);
210 const G4double sinRefractionAngle = sinIncidenceAnglePOut/pIn;
211 const G4double cosRefractionAngle = (sinRefractionAngle>1.) ? 0. : std::sqrt(1.-sinRefractionAngle*sinRefractionAngle);
219 return v - thePotential->computePotentialEnergy(
theParticle);
221 void cleanUp(
const G4bool )
const {}
241 theIncomingEFunctor(theSolution.
x);
244 INCL_WARN(
"Couldn't compute the potential for incoming particle, root-finding algorithm failed." <<
'\n');
G4int getA() const
Returns the baryon number.
G4double getCosRPAngle() const
Get the cosine of the angle between position and momentum.
G4double getMass() const
Get the cached particle mass.
G4bool particleEnters(const G4double theQValueCorrection)
Modify particle that enters the nucleus.
G4bool isNucleusNucleusCollision() const
Is it a nucleus-nucleus collision?
const G4INCL::ThreeVector & getMomentum() const
Get the momentum vector.
Config const * getConfig()
Get the config object.
std::string print() const
G4double getEnergy() const
Get the energy of the particle in MeV.
void setINCLMass()
Set the mass of the Particle to its table mass.
G4double getINCLMass() const
Get the INCL particle mass.
ParticleEntryChannel(Nucleus *n, Particle *p)
G4double mag2() const
Get the square of the length.
virtual ~ParticleEntryChannel()
G4double getFermiEnergy(const Particle *const p) const
Return the Fermi energy for a particle.
void setEnergy(G4double energy)
Set the energy of the particle in MeV.
static double normal(HepRandomEngine *eptr)
Final state of an interaction.
G4int getZ() const
Returns the charge number.
void setPotentialEnergy(G4double v)
Set the particle potential energy.
G4double computeExcitationEnergyExcept(const long exceptID) const
Compute the excitation energy when a nucleon is removed.
void fillFinalState(FinalState *fs)
void setTotalEnergyBeforeInteraction(G4double E)
void makeParticleBelowZero()
NuclearPotential::INuclearPotential const * getPotential() const
Getter for thePotential.
void makeParticleBelowFermi()
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
const G4INCL::ThreeVector & getPosition() const
Set the position vector.
Solution solve(RootFunctor const *const f, const G4double x0)
Numerically solve a one-dimensional equation.
G4bool isNucleon() const
Is this a nucleon?
void removeParticle(Particle *const p, const G4double theProjectileCorrection)
Remove a nucleon from the projectile remnant.
virtual G4double getTableMass() const
Get the tabulated particle mass.
ProjectileRemnant * getProjectileRemnant() const
Get the projectile remnant.
G4double getKineticEnergy() const
Get the particle kinetic energy.
virtual G4double computePotentialEnergy(const Particle *const p) const =0
void addEnteringParticle(Particle *p)
G4double getEmissionQValueCorrection(const G4int AParent, const G4int ZParent) const
Computes correction on the emission Q-value.
const ThreeVector & adjustMomentumFromEnergy()
Rescale the momentum to match the total energy.
Simple class for computing intersections between a straight line and a sphere.
Static root-finder algorithm.
G4bool getRefraction() const
True if we should use refraction.
virtual void setMomentum(const G4INCL::ThreeVector &momentum)
Set the momentum vector.