35#define INCLXX_IN_GEANT4_MODE 1
39#ifndef G4INCLParticleStore_hh
40#define G4INCLParticleStore_hh 1
53#ifdef INCLXX_IN_GEANT4_MODE
54#define INCL_AVATAR_SEARCH_MinElement 1
136 for(
ParticleIter iter = incoming.begin(); iter != incoming.end(); ++iter) {
215 std::list<std::list<Particle*>::iterator> toBeErased;
216 for(std::list<Particle*>::iterator p=outgoing.begin(); p!=outgoing.end(); ++p) {
217 if((*p)->isProjectileSpectator()) {
219 spectators.push_back(*p);
220 toBeErased.push_back(p);
225 for(std::list<std::list<Particle*>::iterator>::iterator i=toBeErased.begin();
226 i!=toBeErased.end(); ++i) {
247 for(
ParticleIter i=inside.begin(); i!=inside.end(); ++i) {
248 if(!(*i)->isTargetSpectator())
340#if defined(INCL_AVATAR_SEARCH_FullSort) || defined(INCL_AVATAR_SEARCH_MinElement)
353#elif defined(INCL_AVATAR_SEARCH_INCLSort)
367 std::list<IAvatarIter>::iterator binaryIterSearch(
IAvatar const *
const avatar);
380 void removeAvatarsFromParticle(
long ID);
385 G4bool avatarInConnectionMap(
long);
391 void connectParticleAndAvatar(
long particleID,
long avatarID);
396 void removeAvatarFromParticle(
long particleID,
long avatarID);
397 void removeAvatarByID(
long ID);
403 std::map<long, Particle*> particles;
408 std::map<long, IAvatar*> avatars;
413 std::map<long, std::vector<long>* > particleAvatarConnections;
470#ifdef INCL_AVATAR_SEARCH_INCLSort
476 std::list<IAvatarIter> avatarIterList;
ParticleList const & getIncomingParticles() const
void particleHasBeenDestroyed(long)
void addParticleEntryAvatars(IAvatarList const &al)
Add one ParticleEntry avatar.
void timeStep(G4double step)
void addToOutgoing(ParticleList const &pl)
Add a list of particles to the outgoing particle list.
IAvatar * findSmallestTime()
void deleteIncoming()
Clear the incoming list and delete the particles.
void initialiseParticleAvatarConnections()
Initialise the particleAvatarConnections map.
void particleHasBeenEjected(long)
ParticleList const & getOutgoingParticles() const
std::string printAvatars()
void particleHasBeenUpdated(long)
void addToOutgoing(Particle *p)
add the particle to the outgoing particle list.
void addIncomingParticle(Particle *const p)
G4double getLoadedStoppingTime()
void particleHasEntered(Particle *const particle)
Move a particle from incoming to inside.
std::string printParticleConfiguration()
void writeParticles(std::string filename)
G4bool containsCollisions() const
void clearIncoming()
Clear the incoming list.
static G4bool avatarComparisonPredicate(IAvatar *lhs, IAvatar *rhs)
Comparison predicate for avatars.
void loadParticles(std::string filename)
ParticleList const & getParticles() const
Config const * getConfig()
void addParticleEntryAvatar(IAvatar *a)
Add one ParticleEntry avatar.
void removeFromIncoming(Particle *const p)
ParticleList extractDynamicalSpectators()
Returns a list of dynamical spectators.
ParticleList getSpectators()
ParticleList getParticipants()
IAvatarList const & getAvatars() const
std::list< IAvatar * > IAvatarList
std::list< G4INCL::Particle * > ParticleList
std::list< G4INCL::Particle * >::const_iterator ParticleIter