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);
138 + theProjectileCorrection;
150 INCL_DEBUG(
"The following Particle enters with correction " << theCorrection <<
'\n'
187 theQValueCorrection(correction),
195 normal = - position / std::sqrt(r2);
197 if(cosIncidenceAngle < -1.)
198 sinIncidenceAnglePOut = 0.;
200 sinIncidenceAnglePOut = theMomentumDirection.mag()*std::sqrt(1.-cosIncidenceAngle*cosIncidenceAngle);
202 sinIncidenceAnglePOut = 0.;
205 ~IncomingEFunctor() {}
207 G4double energyInside =
std::max(theMass, theEnergy + v - theQValueCorrection);
212 const G4double pIn = std::sqrt(energyInside*energyInside-theMass*theMass);
213 const G4double sinRefractionAngle = sinIncidenceAnglePOut/pIn;
214 const G4double cosRefractionAngle = (sinRefractionAngle>1.) ? 0. : std::sqrt(1.-sinRefractionAngle*sinRefractionAngle);
222 return v - thePotential->computePotentialEnergy(
theParticle);
224 void cleanUp(
const G4bool )
const {}
244 theIncomingEFunctor(theSolution.
x);
247 INCL_WARN(
"Couldn't compute the potential for incoming particle, root-finding algorithm failed." <<
'\n');