34 #define INCLXX_IN_GEANT4_MODE 1
49 #ifndef G4INCLINTERACTIONAVATAR_HH_
50 #define G4INCLINTERACTIONAVATAR_HH_
static const G4int maxIterLocE
Max number of iterations for the determination of the local-energy Q-value.
const G4bool shouldUseLocalEnergy
True if we should use local energy.
ThreeVector const & boostVector
Pointer to the boost vector.
Static root-finder algorithm.
void preInteractionLocalEnergy(Particle *const p)
Apply local-energy transformation, if appropriate.
#define INCL_DECLARE_ALLOCATION_POOL(T)
static G4ThreadLocal Particle * backupParticle1
G4bool enforceEnergyConservation(FinalState *const fs)
Enforce energy conservation.
G4bool bringParticleInside(Particle *const p)
G4double initialEnergy
Total energy before the interaction.
static void deleteBackupParticles()
Release the memory allocated for the backup particles.
G4bool shouldUseLocalEnergy() const
true if the given avatar should use local energy
G4double energyThreshold
Threshold for the energy of the particle.
InteractionAvatar(G4double, G4INCL::Nucleus *, G4INCL::Particle *)
G4double operator()(const G4double x) const
Compute the energy-conservation violation.
Nucleus * theNucleus
Pointer to the nucleus.
Nucleus * theNucleus
Pointer to the nucleus.
RootFunctor-derived object for enforcing energy conservation in delta production. ...
ParticleList finalParticles
List of final-state particles.
ViolationEEnergyFunctor(Nucleus *const nucleus, Particle *const aParticle, const G4double totalEnergyBeforeInteraction, const G4bool localE)
Prepare for calling the () operator and setParticleEnergy.
virtual G4INCL::IChannel * getChannel()=0
void setParticleEnergy(const G4double energy) const
Set the energy of the particle.
void preInteractionBlocking()
Store the state of the particles before the interaction.
const G4bool shouldUseLocalEnergy
Whether we should use local energy.
static const G4double alpha
RootFunctor * violationEFunctor
Singleton for recycling allocation of instances of a given class.
virtual ~ViolationEMomentumFunctor()
void cleanUp(const G4bool success) const
Clean up after root finding.
virtual ~InteractionAvatar()
ViolationEMomentumFunctor(Nucleus *const nucleus, ParticleList const &modAndCre, const G4double totalEnergyBeforeInteraction, ThreeVector const &boost, const G4bool localE)
Prepare for calling the () operator and scaleParticleMomenta.
void postInteraction(FinalState *)
G4double operator()(const G4double x) const
Compute the energy-conservation violation.
ThreeVector theMomentum
The initial momentum of the particle.
std::vector< ThreeVector > particleMomenta
CM particle momenta, as determined by the channel.
void scaleParticleMomenta(const G4double alpha) const
Scale the momenta of the modified and created particles.
static const G4double locEAccuracy
Target accuracy in the determination of the local-energy Q-value.
void cleanUp(const G4bool success) const
Clean up after root finding.
Particle * theParticle
The final-state particle.
ParticleList modifiedAndCreated
static G4ThreadLocal Particle * backupParticle2
RootFunctor-derived object for enforcing energy conservation in N-N.
void restoreParticles() const
Restore the state of both particles.
virtual ~ViolationEEnergyFunctor()
ParticleList ModifiedAndDestroyed
G4double theEnergy
The initial energy of the particle.
G4double initialEnergy
Total energy before the interaction.