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