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');
NuclearPotential::INuclearPotential const * getPotential() const
Getter for thePotential.
T max(const T t1, const T t2)
brief Return the largest of the two arguments
virtual G4double getTableMass() const
Get the tabulated particle mass.
const G4INCL::ThreeVector & getPosition() const
G4double getCosRPAngle() const
Get the cosine of the angle between position and momentum.
Static root-finder algorithm.
G4double getEnergy() const
const ThreeVector & adjustMomentumFromEnergy()
Rescale the momentum to match the total energy.
ParticleEntryChannel(Nucleus *n, Particle *p)
G4double getKineticEnergy() const
Get the particle kinetic energy.
const G4INCL::ThreeVector & getMomentum() const
void fillFinalState(FinalState *fs)
ProjectileRemnant * getProjectileRemnant() const
Get the projectile remnant.
void setINCLMass()
Set the mass of the Particle to its table mass.
G4double computeExcitationEnergyExcept(const long exceptID) const
Compute the excitation energy when a nucleon is removed.
static double normal(HepRandomEngine *eptr)
G4double getMass() const
Get the cached particle mass.
Solution solve(RootFunctor const *const f, const G4double x0)
Numerically solve a one-dimensional equation.
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
G4bool getRefraction() const
True if we should use refraction.
void setTotalEnergyBeforeInteraction(G4double E)
void setPotentialEnergy(G4double v)
Set the particle potential energy.
std::string print() const
virtual ~ParticleEntryChannel()
G4int getZ() const
Returns the charge number.
G4int getA() const
Returns the baryon number.
void makeParticleBelowZero()
void makeParticleBelowFermi()
G4double getINCLMass() const
Get the INCL particle mass.
virtual void setMomentum(const G4INCL::ThreeVector &momentum)
G4bool particleEnters(const G4double theQValueCorrection)
Modify particle that enters the nucleus.
Config const * getConfig()
Simple class for computing intersections between a straight line and a sphere.
G4double getEmissionQValueCorrection(const G4int AParent, const G4int ZParent) const
Computes correction on the emission Q-value.
void setEnergy(G4double energy)
void addEnteringParticle(Particle *p)
void removeParticle(Particle *const p, const G4double theProjectileCorrection)
Remove a nucleon from the projectile remnant.
G4double getFermiEnergy(const Particle *const p) const
Return the Fermi energy for a particle.
virtual G4double computePotentialEnergy(const Particle *const p) const =0
G4bool isNucleusNucleusCollision() const
Is it a nucleus-nucleus collision?