34 #define INCLXX_IN_GEANT4_MODE 1 38 #ifndef G4INCLCascade_hh 39 #define G4INCLCascade_hh 1 44 #include "G4INCLCascadeAction.hh" 120 if(aPR && aPR->
getA()>0) {
163 std::list<ThreeVector>::const_iterator iP = particleMomenta.begin();
164 std::list<G4double>::const_iterator iE = particleKineticEnergies.begin();
165 for(
ParticleIter i = outgoingParticles.begin(),
e = outgoingParticles.end(); i!=
e; ++i, ++iP, ++iE)
167 const G4double mass = (*i)->getMass();
168 const G4double newKineticEnergy = (*iE) * rescale;
170 (*i)->setMomentum(*iP);
171 (*i)->setEnergy(mass + newKineticEnergy);
172 (*i)->adjustMomentumFromEnergy();
174 pBalance -= (*i)->getMomentum();
180 const G4double recoilEnergy = pRem2/
181 (std::sqrt(pRem2+remnantMass*remnantMass) + remnantMass);
182 nucleus->
setEnergy(remnantMass + recoilEnergy);
196 theIncomingMomentum(nucleus->getIncomingMomentum()),
201 (*p)->boost(thePTBoostVector);
202 particleCMMomenta.push_back((*p)->getMomentum());
205 if(aPR && aPR->
getA()>0) {
206 aPR->
boost(thePTBoostVector);
219 scaleParticleCMMomenta(x);
226 scaleParticleCMMomenta(1.);
250 std::list<ThreeVector>::const_iterator iP = particleCMMomenta.begin();
251 for(
ParticleIter i = outgoingParticles.begin(),
e = outgoingParticles.end(); i!=
e; ++i, ++iP)
253 (*i)->setMomentum(*iP * rescale);
254 (*i)->adjustEnergyFromMomentum();
255 (*i)->boost(-thePTBoostVector);
257 remnantMomentum -= (*i)->getMomentum();
263 const G4double recoilEnergy = pRem2/
264 (std::sqrt(pRem2+remnantMass*remnantMass) + remnantMass);
265 nucleus->
setEnergy(remnantMass + recoilEnergy);
276 #ifndef INCLXX_IN_GEANT4_MODE 286 void globalConservationChecks(
G4bool afterRecoil);
G4double maxUniverseRadius
G4int minRemnantSize
Remnant size below which cascade stops.
INCL & operator=(const INCL &rhs)
Dummy assignment operator to silence Coverity warning.
std::list< G4double > particleKineticEnergies
Initial kinetic energies of the outgoing particles.
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 cleanUp(const G4bool success) const
Clean up after root finding.
void postCascade()
Finalise the cascade and clean up.
G4bool preCascade(ParticleSpecies const &projectileSpecies, const G4double kineticEnergy)
Initialise the cascade.
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.
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.
G4double operator()(const G4double x) const
Compute the energy-conservation violation.
std::list< ThreeVector > particleCMMomenta
Initial CM momenta of the outgoing particles.
const GlobalInfo & getGlobalInfo() const
G4int getA() const
Returns the baryon number.
G4int getZ() const
Returns the charge number.
G4double getKineticEnergy() const
Get the particle kinetic energy.
CascadeAction * cascadeAction
IPropagationModel * propagationModel
G4double getInitialEnergy() const
Get the initial energy.
Nucleus * nucleus
Pointer to the nucleus.
ParticleList outgoingParticles
List of final-state particles.
void setEnergy(G4double energy)
void scaleParticleEnergies(const G4double rescale) const
Scale the kinetic energies of the outgoing particles.
void finalizeGlobalInfo(Random::SeedVector const &initialSeeds)
G4double fixedImpactParameter
void rescaleOutgoingForRecoil()
Rescale the energies of the outgoing particles.
ThreeVector thePTBoostVector
Projectile-target CM boost vector.
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.
double A(double temperature)
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.
G4double getExcitationEnergy() const
Get the excitation energy of the nucleus.
const EventInfo & processEvent()
virtual ~RecoilCMFunctor()
RecoilFunctor(Nucleus *const n, const EventInfo &ei)
Prepare for calling the () operator and scaleParticleEnergies.
Class to adjust remnant recoil in the reaction CM system.
void scaleParticleCMMomenta(const G4double rescale) const
Scale the kinetic energies of the outgoing particles.
G4double operator()(const G4double x) const
Compute the energy-conservation violation.
ProjectileRemnant * getProjectileRemnant() const
Get the projectile remnant.
G4bool initializeTarget(const G4int A, const G4int Z)
G4double maxImpactParameter
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
void makeCompoundNucleus()
Make a compound nucleus.
void cleanUp(const G4bool success) const
Clean up after root finding.
ThreeVector theIncomingMomentum
Incoming momentum.
ParticleSpecies getProjectileSpecies() const
Get the projectile species.
G4int getTargetZ() const
Get the target charge number.
ParticleList outgoingParticles
List of final-state particles.
G4double getProjectileKineticEnergy() const
Get the projectile kinetic energy.
const G4INCL::ThreeVector & getMomentum() const
G4int makeProjectileRemnant()
Make a projectile pre-fragment out of geometrical spectators.
Nucleus * nucleus
Pointer to the nucleus.
const ThreeVector & getIncomingMomentum() const
Get the incoming momentum vector.
G4int getTargetA() const
Get the target mass number.
ConservationBalance getConservationBalance(EventInfo const &theEventInfo, const G4bool afterRecoil) const
Compute charge, mass, energy and momentum balance.
ParticleList::const_iterator ParticleIter
Static root-finder algorithm.
virtual void setMomentum(const G4INCL::ThreeVector &momentum)
EventInfo const & theEventInfo