34#define INCLXX_IN_GEANT4_MODE 1
49#ifndef G4INCLINTERACTIONAVATAR_HH_
50#define G4INCLINTERACTIONAVATAR_HH_
135 class ViolationEMomentumFunctor :
public RootFunctor {
142 virtual ~ViolationEMomentumFunctor();
152 void cleanUp(
const G4bool success)
const;
158 std::vector<ThreeVector> particleMomenta;
177 void scaleParticleMomenta(
const G4double alpha)
const;
182 class ViolationEEnergyFunctor :
public RootFunctor {
188 ViolationEEnergyFunctor(
Nucleus *
const nucleus,
Particle *
const aParticle,
const G4double totalEnergyBeforeInteraction,
const G4bool localE);
189 virtual ~ViolationEEnergyFunctor() {}
199 void cleanUp(
const G4bool success)
const;
205 void setParticleEnergy(
const G4double energy)
const;
213 Particle *theParticle;
217 ThreeVector theMomentum;
227 RootFunctor *violationEFunctor;
Singleton for recycling allocation of instances of a given class.
#define INCL_DECLARE_ALLOCATION_POOL(T)
Static root-finder algorithm.
static const G4int maxIterLocE
Max number of iterations for the determination of the local-energy Q-value.
void restoreParticles() const
Restore the state of both particles.
ParticleList modifiedAndCreated
ParticleList ModifiedAndDestroyed
ThreeVector getboostVector()
static InteractionAvatar * Instance()
virtual ~InteractionAvatar()
G4bool enforceEnergyConservation(FinalState *const fs)
Enforce energy conservation.
static void deleteBackupParticles()
Release the memory allocated for the backup particles.
void preInteractionBlocking()
Store the state of the particles before the interaction.
static const G4double locEAccuracy
Target accuracy in the determination of the local-energy Q-value.
void setboostVector(ThreeVector &v)
void restoreSrcPartner(FinalState *fs)
virtual G4INCL::IChannel * getChannel()=0
InteractionAvatar(G4double, G4INCL::Nucleus *, G4INCL::Particle *)
static G4ThreadLocal Particle * backupParticle2
G4bool shouldUseLocalEnergy() const
true if the given avatar should use local energy
void postInteraction(FinalState *)
static G4ThreadLocal Particle * backupParticle1
G4bool bringParticleInside(Particle *const p)
void preInteractionLocalEnergy(Particle *const p)
Apply local-energy transformation, if appropriate.
void setSrcPartner(Particle *p)