34#define INCLXX_IN_GEANT4_MODE 1
45#ifndef G4INCLPROJECTILEREMNANT_HH_
46#define G4INCLPROJECTILEREMNANT_HH_
73 const G4double energy = kineticEnergy + projectileMass;
74 const G4double momentumZ = std::sqrt(energy*energy - projectileMass*projectileMass);
142 for(std::map<long,Particle*>::const_iterator p=storedComponents.begin(), e=storedComponents.end(); p!=e; ++p)
149 storedComponents.clear();
154 theInitialEnergyLevels.clear();
155 theGroundStateEnergies.clear();
179 storedComponents[(*p)->getID()]=
new Particle(**p);
185 return storedComponents.size();
193 const G4double theCMEnergy = (*p)->getEnergy();
195 theInitialEnergyLevels[(*p)->getID()] = theCMEnergy;
196 energies.push_back(theCMEnergy);
199 std::sort(energies.begin(), energies.end());
201 theGroundStateEnergies.resize(energies.size());
204 std::partial_sum(energies.begin(), energies.end(), theGroundStateEnergies.begin());
208 return theGroundStateEnergies;
223 EnergyLevels getPresentEnergyLevelsExcept(
const long exceptID)
const;
234 ParticleList getStoredComponents()
const {
236 for(std::map<long,Particle*>::const_iterator p=storedComponents.begin(), e=storedComponents.end(); p!=e; ++p)
237 pL.push_back(p->second);
242 ThreeVector
const &getStoredMomentum(Particle
const *
const p)
const {
243 std::map<long,Particle*>::const_iterator i = storedComponents.find(p->getID());
244 if(i==storedComponents.end()) {
245 INCL_ERROR(
"Couldn't find particle " << p->getID() <<
" in the list of projectile components" <<
'\n');
246 return p->getMomentum();
248 return i->second->getMomentum();
258 G4bool addDynamicalSpectator(Particle *
const p);
275 std::map<long, Particle*> storedComponents;
Singleton for recycling allocation of instances of a given class.
#define INCL_DECLARE_ALLOCATION_POOL(T)
void boost(const ThreeVector &aBoostVector)
Boost the cluster with the indicated velocity.
void internalBoostToCM()
Boost to the CM of the component particles.
virtual void makeProjectileSpectator()
Make all the components projectile spectators, too.
virtual void initializeParticles()
Initialise the NuclearDensity pointer and sample the particles.
void freezeInternalMotion()
Freeze the internal motion of the particles.
void putParticlesOffShell()
Put the cluster components off shell.
G4double getMass() const
Get the cached particle mass.
void setTableMass()
Set the mass of the Particle to its table mass.
void removeParticle(Particle *const p, const G4double theProjectileCorrection)
Remove a nucleon from the projectile remnant.
std::vector< G4double > EnergyLevels
ProjectileRemnant(ParticleSpecies const &species, const G4double kineticEnergy)
void clearStoredComponents()
Clear the stored projectile components.
G4double computeExcitationEnergyWith(const ParticleList &pL) const
Compute the excitation energy if some nucleons are put back.
G4int getNumberStoredComponents() const
Get the number of the stored components.
ParticleList addMostDynamicalSpectators(ParticleList pL)
Add back dynamical spectators to the projectile remnant.
void storeComponents()
Store the projectile components.
ParticleList addAllDynamicalSpectators(ParticleList const &pL)
Add back all dynamical spectators to the projectile remnant.
void clearEnergyLevels()
Clear the stored energy levels.
ParticleList addDynamicalSpectators(ParticleList pL)
Add back dynamical spectators to the projectile remnant.
std::map< long, G4double > EnergyLevelMap
void deleteStoredComponents()
Clear the stored projectile components and delete the particles.
G4double computeExcitationEnergyExcept(const long exceptID) const
Compute the excitation energy when a nucleon is removed.
EnergyLevels const & getGroundStateEnergies() const
void reset()
Reset the projectile remnant to the state at the beginning of the cascade.
void storeEnergyLevels()
Store the energy levels.
Adapter const & getAdapter()
ParticleList::const_iterator ParticleIter