34#define INCLXX_IN_GEANT4_MODE 1
38#ifndef G4INCLParticleStore_hh
39#define G4INCLParticleStore_hh 1
52#ifdef INCLXX_IN_GEANT4_MODE
53#define INCL_AVATAR_SEARCH_MinElement 1
56#if !defined(NDEBUG) && !defined(INCLXX_IN_GEANT4_MODE)
63template class std::multimap<G4INCL::Particle*, G4INCL::IAvatar*>;
135 void addIncomingParticle(
Particle *
const p);
151 for(
ParticleIter iter=incoming.begin(), e=incoming.end(); iter!=e; ++iter) {
163 void particleHasBeenUpdated(
Particle *
const);
166 void removeScheduledAvatars();
184 void particleHasBeenEjected(
Particle *
const);
211 void particleHasBeenDestroyed(
Particle *
const);
217 void particleHasEntered(
Particle *
const particle);
246 for(
ParticleIter p=outgoing.begin(), e=outgoing.end(); p!=e; ++p) {
247 if((*p)->isProjectileSpectator()) {
249 spectators.push_back(*p);
254 for(
ParticleIter i=spectators.begin(); i!=spectators.end(); ++i) {
281 for(
ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i) {
282 if(!(*i)->isTargetSpectator())
312 void clearOutgoing();
323 void loadParticles(std::string
const &filename);
346 std::string printParticleConfiguration();
351 void writeParticles(std::string
const &filename);
356 std::string printAvatars();
358 G4bool containsCollisions()
const;
360#if defined(INCL_AVATAR_SEARCH_FullSort) || defined(INCL_AVATAR_SEARCH_MinElement)
402 void disconnectAvatarFromParticle(
IAvatar *
const a,
Particle *
const p);
411 void removeAvatar(
IAvatar *
const a);
417 std::multimap<Particle*, IAvatar*> particleAvatarConnections;
418 typedef std::multimap<Particle*, IAvatar*>::value_type PAPair;
419 typedef std::multimap<Particle*, IAvatar*>::iterator PAIter;
420 typedef std::pair<PAIter, PAIter> PAIterPair;
423 std::set<IAvatar*> avatarsToBeRemoved;
424 typedef std::set<IAvatar*>::const_iterator ASIter;
G4PVDivision & operator=(const G4PVDivision &)=delete
void addToMissed(Particle *p)
add the particle to the missed particle list (for dbar).
ParticleList const & getIncomingParticles() const
void addParticleEntryAvatars(IAvatarList const &al)
Add one ParticleEntry avatar.
void addToOutgoing(ParticleList const &pl)
Add a list of particles to the outgoing particle list.
void deleteIncoming()
Clear the incoming list and delete the particles.
Store(Config const *const config)
ParticleList const & getOutgoingParticles() const
void addToOutgoing(Particle *p)
add the particle to the outgoing particle list.
ParticleList & getParticlesforSrc()
G4double getLoadedStoppingTime()
void clearIncoming()
Clear the incoming list.
static G4bool avatarComparisonPredicate(IAvatar *lhs, IAvatar *rhs)
Comparison predicate for avatars.
ParticleList const & getMissedParticles() const
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.
IAvatarList const & getAvatars() const
ParticleList::const_iterator ParticleIter
UnorderedVector< IAvatar * > IAvatarList