35#define INCLXX_IN_GEANT4_MODE 1
46#ifndef G4INCLPROJECTILEREMNANT_HH_
47#define G4INCLPROJECTILEREMNANT_HH_
63 typedef std::vector<G4double> EnergyLevels;
64 typedef std::map<long, G4double> EnergyLevelMap;
75 const G4double energy = kineticEnergy + projectileMass;
76 const G4double momentumZ = std::sqrt(energy*energy - projectileMass*projectileMass);
136 for(std::map<long,Particle*>::const_iterator p=storedComponents.begin(); p!=storedComponents.end(); ++p)
143 storedComponents.clear();
148 theInitialEnergyLevels.clear();
149 theGroundStateEnergies.clear();
164 EnergyLevels theEnergyLevels;
166 if((*p)->getID()!=exceptID) {
167 EnergyLevelMap::const_iterator i = theInitialEnergyLevels.find((*p)->getID());
169 theEnergyLevels.push_back(i->second);
173 return theEnergyLevels;
180 storedComponents[(*p)->getID()]=
new Particle(**p);
186 return storedComponents.size();
191 EnergyLevels energies;
194 const G4double theCMEnergy = (*p)->getEnergy();
196 theInitialEnergyLevels[(*p)->getID()] = theCMEnergy;
197 energies.push_back(theCMEnergy);
200 std::sort(energies.begin(), energies.end());
202 theGroundStateEnergies.resize(energies.size());
205 std::partial_sum(energies.begin(), energies.end(), theGroundStateEnergies.begin());
213 std::vector<Particle *> theVector(pL.begin(),pL.end());
220 for(std::map<long,Particle*>::const_iterator p=storedComponents.begin(); p!=storedComponents.end(); ++p)
221 pL.push_back(p->second);
226 ThreeVector
const &getStoredMomentum(Particle
const *
const p)
const {
227 std::map<long,Particle*>::const_iterator i = storedComponents.find(p->getID());
228 if(i==storedComponents.end()) {
229 ERROR(
"Couldn't find particle " << p->getID() <<
" in the list of projectile components" << std::endl);
230 return p->getMomentum();
232 return i->second->getMomentum();
242 G4bool addDynamicalSpectator(Particle *
const p);
256 std::map<long, Particle*> storedComponents;
259 EnergyLevelMap theInitialEnergyLevels;
262 EnergyLevels theGroundStateEnergies;
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.
G4double computeExcitationEnergy(const long exceptID) const
Compute the excitation energy.
void removeParticle(Particle *const p, const G4double theProjectileCorrection)
Remove a nucleon from the projectile remnant.
void clearStoredComponents()
Clear the stored projectile components.
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.
void clearEnergyLevels()
Clear the stored energy levels.
ParticleList addDynamicalSpectators(ParticleList pL)
Add back dynamical spectators to the projectile remnant.
ProjectileRemnant(ParticleSpecies const species, const G4double kineticEnergy)
void deleteStoredComponents()
Clear the stored projectile components and delete the particles.
EnergyLevels getPresentEnergyLevels(const long exceptID) const
void reset()
Reset the projectile remnant to the state at the beginning of the cascade.
void storeEnergyLevels()
Store the energy levels.
std::list< G4INCL::Particle * > ParticleList
G4int shuffleComponentsHelper(G4int range)
Helper function for ProjectileRemnant::shuffleStoredComponents.
std::list< G4INCL::Particle * >::const_iterator ParticleIter