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