33 #define INCLXX_IN_GEANT4_MODE 1
37 #ifndef G4INCLCascade_hh
38 #define G4INCLCascade_hh 1
119 if(aPR && aPR->
getA()>0) {
162 std::list<ThreeVector>::const_iterator iP = particleMomenta.begin();
163 std::list<G4double>::const_iterator iE = particleKineticEnergies.begin();
164 for(
ParticleIter i = outgoingParticles.begin(), e = outgoingParticles.end(); i!=e; ++i, ++iP, ++iE)
166 const G4double mass = (*i)->getMass();
167 const G4double newKineticEnergy = (*iE) * rescale;
169 (*i)->setMomentum(*iP);
170 (*i)->setEnergy(mass + newKineticEnergy);
171 (*i)->adjustMomentumFromEnergy();
173 pBalance -= (*i)->getMomentum();
179 const G4double recoilEnergy = pRem2/
180 (std::sqrt(pRem2+remnantMass*remnantMass) + remnantMass);
181 nucleus->
setEnergy(remnantMass + recoilEnergy);
204 if(aPR && aPR->
getA()>0) {
249 std::list<ThreeVector>::const_iterator iP = particleCMMomenta.begin();
250 for(
ParticleIter i = outgoingParticles.begin(), e = outgoingParticles.end(); i!=e; ++i, ++iP)
252 (*i)->setMomentum(*iP * rescale);
253 (*i)->adjustEnergyFromMomentum();
254 (*i)->boost(-thePTBoostVector);
256 remnantMomentum -= (*i)->getMomentum();
262 const G4double recoilEnergy = pRem2/
263 (std::sqrt(pRem2+remnantMass*remnantMass) + remnantMass);
264 nucleus->
setEnergy(remnantMass + recoilEnergy);
275 #ifndef INCLXX_IN_GEANT4_MODE
285 void globalConservationChecks(
G4bool afterRecoil);
G4int getA() const
Returns the baryon number.
G4double operator()(const G4double x) const
Compute the energy-conservation violation.
G4double maxUniverseRadius
ConservationBalance getConservationBalance(EventInfo const &theEventInfo, const G4bool afterRecoil) const
Compute charge, mass, energy and momentum balance.
G4int minRemnantSize
Remnant size below which cascade stops.
INCL & operator=(const INCL &rhs)
Dummy assignment operator to silence Coverity warning.
The INCL configuration object.
void cleanUp(const G4bool success) const
Clean up after root finding.
std::list< G4double > particleKineticEnergies
Initial kinetic energies of the outgoing particles.
const GlobalInfo & getGlobalInfo() const
G4bool prepareReaction(const ParticleSpecies &projectileSpecies, const G4double kineticEnergy, const G4int A, const G4int Z)
G4bool continueCascade()
Stopping criterion for the cascade.
void cascade()
The actual cascade loop.
G4double maxInteractionDistance
void postCascade()
Finalise the cascade and clean up.
G4int getTargetZ() const
Get the target charge number.
const ThreeVector & getIncomingMomentum() const
Get the incoming momentum vector.
std::list< ThreeVector > particleMomenta
Initial momenta of the outgoing particles.
Config const *const theConfig
void updateGlobalInfo()
Update global counters and other members of theGlobalInfo object.
const G4INCL::ThreeVector & getMomentum() const
Get the momentum vector.
G4double operator()(const G4double x) const
Compute the energy-conservation violation.
EventInfo const & theEventInfo
RecoilCMFunctor(Nucleus *const n, const EventInfo &ei)
Prepare for calling the () operator and scaleParticleEnergies.
Class to adjust remnant recoil.
void boost(const ThreeVector &aBoostVector)
Boost the cluster with the indicated velocity.
std::list< ThreeVector > particleCMMomenta
Initial CM momenta of the outgoing particles.
void finalizeGlobalInfo()
CascadeAction * cascadeAction
Propagation model takes care of transporting the particles until something interesting (i...
G4double mag2() const
Get the square of the length.
Class containing default actions to be performed at intermediate cascade steps.
IPropagationModel * propagationModel
Nucleus * nucleus
Pointer to the nucleus.
ParticleList outgoingParticles
List of final-state particles.
void setEnergy(G4double energy)
Set the energy of the particle in MeV.
G4bool preCascade(ParticleSpecies const projectileSpecies, const G4double kineticEnergy)
Initialise the cascade.
void cleanUp(const G4bool success) const
Clean up after root finding.
G4double fixedImpactParameter
void rescaleOutgoingForRecoil()
Rescale the energies of the outgoing particles.
ThreeVector thePTBoostVector
Projectile-target CM boost vector.
G4double getInitialEnergy() const
Get the initial energy.
INCL(Config const *const config)
void initMaxInteractionDistance(ParticleSpecies const &p, const G4double kineticEnergy)
Initialise the maximum interaction distance.
Simple container for output of calculation-wide results.
Simple container for output of event results.
void initUniverseRadius(ParticleSpecies const &p, const G4double kineticEnergy, const G4int A, const G4int Z)
Initialize the universe radius.
G4int getTargetA() const
Get the target mass number.
const EventInfo & processEvent()
void scaleParticleCMMomenta(const G4double rescale) const
Scale the kinetic energies of the outgoing particles.
G4int getZ() const
Returns the charge number.
virtual ~RecoilCMFunctor()
RecoilFunctor(Nucleus *const n, const EventInfo &ei)
Prepare for calling the () operator and scaleParticleEnergies.
G4double getExcitationEnergy() const
Get the excitation energy of the nucleus.
Class to adjust remnant recoil in the reaction CM system.
static const G4double A[nN]
G4bool initializeTarget(const G4int A, const G4int Z)
G4double maxImpactParameter
ParticleSpecies getProjectileSpecies() const
Get the projectile species.
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
void makeCompoundNucleus()
Make a compound nucleus.
ThreeVector theIncomingMomentum
Incoming momentum.
ProjectileRemnant * getProjectileRemnant() const
Get the projectile remnant.
G4double getKineticEnergy() const
Get the particle kinetic energy.
void scaleParticleEnergies(const G4double rescale) const
Scale the kinetic energies of the outgoing particles.
ParticleList outgoingParticles
List of final-state particles.
G4double getProjectileKineticEnergy() const
Get the projectile kinetic energy.
G4int makeProjectileRemnant()
Make a projectile pre-fragment out of geometrical spectators.
Nucleus * nucleus
Pointer to the nucleus.
ParticleList::const_iterator ParticleIter
Static root-finder algorithm.
virtual void setMomentum(const G4INCL::ThreeVector &momentum)
Set the momentum vector.
EventInfo const & theEventInfo