33 #define INCLXX_IN_GEANT4_MODE 1
44 #ifndef G4INCLPROJECTILEREMNANT_HH_
45 #define G4INCLPROJECTILEREMNANT_HH_
61 typedef std::vector<G4double> EnergyLevels;
62 typedef std::map<long, G4double> EnergyLevelMap;
74 const G4double momentumZ = std::sqrt(energy*energy - projectileMass*projectileMass);
134 for(std::map<long,Particle*>::const_iterator
p=storedComponents.begin();
p!=storedComponents.end(); ++
p)
141 storedComponents.clear();
146 theInitialEnergyLevels.clear();
147 theGroundStateEnergies.clear();
162 EnergyLevels theEnergyLevels;
164 if((*p)->getID()!=exceptID) {
165 EnergyLevelMap::const_iterator i = theInitialEnergyLevels.find((*p)->getID());
167 theEnergyLevels.push_back(i->second);
171 return theEnergyLevels;
178 storedComponents[(*p)->getID()]=
new Particle(**
p);
184 return storedComponents.size();
189 EnergyLevels energies;
192 const G4double theCMEnergy = (*p)->getEnergy();
194 theInitialEnergyLevels[(*p)->getID()] = theCMEnergy;
195 energies.push_back(theCMEnergy);
198 std::sort(energies.begin(), energies.end());
200 theGroundStateEnergies.resize(energies.size());
203 std::partial_sum(energies.begin(), energies.end(), theGroundStateEnergies.begin());
211 std::vector<Particle *> theVector(pL.begin(),pL.end());
218 for(std::map<long,Particle*>::const_iterator
p=storedComponents.begin();
p!=storedComponents.end(); ++
p)
219 pL.push_back(
p->second);
224 ThreeVector
const &getStoredMomentum(
Particle const *
const p)
const {
225 std::map<long,Particle*>::const_iterator i = storedComponents.find(p->getID());
226 if(i==storedComponents.end()) {
227 ERROR(
"Couldn't find particle " << p->getID() <<
" in the list of projectile components" << std::endl);
228 return p->getMomentum();
230 return i->second->getMomentum();
254 std::map<long, Particle*> storedComponents;
257 EnergyLevelMap theInitialEnergyLevels;
260 EnergyLevels theGroundStateEnergies;
265 #endif // G4INCLPROJECTILEREMNANT_HH_