33 #define INCLXX_IN_GEANT4_MODE 1
44 #ifndef G4INCLPROJECTILEREMNANT_HH_
45 #define G4INCLPROJECTILEREMNANT_HH_
75 const G4double momentumZ = std::sqrt(energy*energy - projectileMass*projectileMass);
143 for(std::map<long,Particle*>::const_iterator
p=storedComponents.begin(), e=storedComponents.end();
p!=e; ++
p)
150 storedComponents.clear();
155 theInitialEnergyLevels.clear();
156 theGroundStateEnergies.clear();
180 storedComponents[(*p)->getID()]=
new Particle(**
p);
186 return storedComponents.size();
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());
209 return theGroundStateEnergies;
224 EnergyLevels getPresentEnergyLevelsExcept(
const long exceptID)
const;
237 for(std::map<long,Particle*>::const_iterator
p=storedComponents.begin(), e=storedComponents.end();
p!=e; ++
p)
238 pL.push_back(
p->second);
243 ThreeVector
const &getStoredMomentum(
Particle const *
const p)
const {
244 std::map<long,Particle*>::const_iterator i = storedComponents.find(p->getID());
245 if(i==storedComponents.end()) {
246 INCL_ERROR(
"Couldn't find particle " << p->getID() <<
" in the list of projectile components" << std::endl);
247 return p->getMomentum();
249 return i->second->getMomentum();
276 std::map<long, Particle*> storedComponents;
287 #endif // G4INCLPROJECTILEREMNANT_HH_
G4int shuffleComponentsHelper(G4int range)
Helper function for ProjectileRemnant::shuffleStoredComponents.
G4double getMass() const
Get the cached particle mass.
void storeEnergyLevels()
Store the energy levels.
void putParticlesOffShell()
Put the cluster components off shell.
ParticleList addAllDynamicalSpectators(ParticleList pL)
Add back all dynamical spectators to the projectile remnant.
void deleteStoredComponents()
Clear the stored projectile components and delete the particles.
std::map< long, G4double > EnergyLevelMap
void storeComponents()
Store the projectile components.
void clearStoredComponents()
Clear the stored projectile components.
void boost(const ThreeVector &aBoostVector)
Boost the cluster with the indicated velocity.
void reset()
Reset the projectile remnant to the state at the beginning of the cascade.
G4double computeExcitationEnergyWith(const ParticleList &pL) const
Compute the excitation energy if some nucleons are put back.
UnorderedVector< Particle * > ParticleList
const G4ParticleDefinition const G4Material *G4double range
virtual void initializeParticles()
Initialise the NuclearDensity pointer and sample the particles.
void freezeInternalMotion()
Freeze the internal motion of the particles.
G4double computeExcitationEnergyExcept(const long exceptID) const
Compute the excitation energy when a nucleon is removed.
G4int getNumberStoredComponents() const
Get the number of the stored components.
EnergyLevels const & getGroundStateEnergies() const
ParticleList addDynamicalSpectators(ParticleList pL)
Add back dynamical spectators to the projectile remnant.
void setTableMass()
Set the mass of the Particle to its table mass.
ParticleList addMostDynamicalSpectators(ParticleList pL)
Add back dynamical spectators to the projectile remnant.
void internalBoostToCM()
Boost to the CM of the component particles.
void clearEnergyLevels()
Clear the stored energy levels.
std::vector< G4double > EnergyLevels
void removeParticle(Particle *const p, const G4double theProjectileCorrection)
Remove a nucleon from the projectile remnant.
ProjectileRemnant(ParticleSpecies const species, const G4double kineticEnergy)
virtual void makeProjectileSpectator()
Make all the components projectile spectators, too.
ParticleList::const_iterator ParticleIter