35#define INCLXX_IN_GEANT4_MODE 1
47 const G4double ReflectionChannel::sinMinReflectionAngleSquaredOverFour = std::pow(std::sin(2.*
Math::pi/200.),2.);
48 const G4double ReflectionChannel::positionScalingFactor = 0.99;
51 :theNucleus(n),theParticle(p)
69 const G4double deltaP2 = (newMomentum-oldMomentum).mag2();
71 const G4double minDeltaP2 = sinMinReflectionAngleSquaredOverFour * newMomentum.
mag2();
72 if(deltaP2 < minDeltaP2) {
74 DEBUG(
"Reflection angle for particle " << theParticle->
getID() <<
" was too tangential: " << std::endl
75 <<
" " << deltaP2 <<
"=deltaP2<minDeltaP2=" << minDeltaP2 << std::endl
76 <<
" Resetting the particle position to ("
Abstract interface to the nuclear potential.
void addModifiedParticle(Particle *p)
void setTotalEnergyBeforeInteraction(G4double E)
void updatePotentialEnergy(Particle *p)
Update the particle potential energy.
G4double getEnergy() const
G4double getPotentialEnergy() const
Get the particle potential energy.
const G4INCL::ThreeVector & getPosition() const
const G4INCL::ThreeVector & getMomentum() const
virtual void setMomentum(const G4INCL::ThreeVector &momentum)
void thawPropagation()
Unfreeze particle propagation.
virtual void setPosition(const G4INCL::ThreeVector &position)
ReflectionChannel(Nucleus *n, Particle *p)
virtual ~ReflectionChannel()
FinalState * getFinalState()
G4double dot(const ThreeVector &v) const