33 #define INCLXX_IN_GEANT4_MODE 1
37 #ifndef G4INCLParticleStore_hh
38 #define G4INCLParticleStore_hh 1
50 #ifdef INCLXX_IN_GEANT4_MODE
51 #define INCL_AVATAR_SEARCH_MinElement 1
52 #endif // INCLXX_IN_GEANT4_MODE
213 if((*p)->isProjectileSpectator()) {
215 spectators.push_back(*p);
220 for(
ParticleIter i=spectators.begin(); i!=spectators.end(); ++i) {
242 if(!(*i)->isTargetSpectator())
327 #if defined(INCL_AVATAR_SEARCH_FullSort) || defined(INCL_AVATAR_SEARCH_MinElement)
340 #elif defined(INCL_AVATAR_SEARCH_INCLSort)
354 std::list<IAvatarIter>::iterator binaryIterSearch(
IAvatar const *
const avatar);
464 #ifdef INCL_AVATAR_SEARCH_INCLSort
470 std::list<IAvatarIter> avatarIterList;
std::string printParticleConfiguration()
Print the nucleon configuration of the nucleus.
void writeParticles(std::string filename)
Print the nucleon configuration of the nucleus.
void clearAvatars()
Clear avatars only.
The INCL configuration object.
static G4bool avatarComparisonPredicate(IAvatar *lhs, IAvatar *rhs)
Comparison predicate for avatars.
void disconnectAvatarFromParticle(IAvatar *const a, Particle *const p)
Disconnect an avatar from a particle.
std::string printAvatars()
Print the list of avatars.
ParticleList const & getParticles() const
Return the list of "active" particles (i.e.
Config const * theConfig
Pointer to the Config object.
G4int getLoadedA()
Get the value of the nucleus mass number that we read from file with loadParticles.
void removeAndDeleteAvatar(IAvatar *const a)
Remove an avatar from the list of avatars.
ParticleList geomSpectators
List of geometrical spectators.
G4bool containsCollisions() const
IAvatar * findSmallestTime()
Find the avatar that has the smallest time.
Config const * getConfig()
Get the config object.
void add(Particle *p)
Add one particle to the store.
ParticleList outgoing
List of outgoing particles.
G4int loadedA
The target nucleus mass number that was loaded from a particle file.
void deleteIncoming()
Clear the incoming list and delete the particles.
ParticleList const & getIncomingParticles() const
Return the list of incoming particles (i.e.
Store(Config const *const config)
Store constructor.
void connectAvatarToParticle(IAvatar *const a, Particle *const p)
Connect an avatar to a particle.
void removeAvatar(IAvatar *const a)
Remove an avatar from the list of avatars.
IAvatarList const & getAvatars() const
Return the list of avatars.
IAvatarList avatarList
List of all avatars.
void clear()
Clear all avatars and particles from the store.
void addParticleEntryAvatars(IAvatarList const &al)
Add one ParticleEntry avatar.
G4double getLoadedStoppingTime()
Get the value of the stopping time that we read from file with loadParticles.
ParticleList const & getOutgoingParticles() const
Return the list of outgoing particles (i.e.
Book & getBook()
Return the pointer to the Book object which keeps track of various counters.
G4double loadedStoppingTime
The stopping time that was loaded from a particle file.
ParticleList extractDynamicalSpectators()
Returns a list of dynamical spectators.
void particleHasBeenDestroyed(Particle *const)
Remove the particle from the system.
void initialiseParticleAvatarConnections()
Initialise the particleAvatarConnections map.
void particleHasBeenEjected(Particle *const)
Mark the particle as ejected.
Store & operator=(Store const &rhs)
Dummy assignment operator to shut up Coverity warnings.
void clearInside()
Clear all inside particles from the store.
G4int getLoadedZ()
Get the value of the nucleus charge number that we read from file with loadParticles.
void clearOutgoing()
Clear all outgoing particles from the store.
void addParticleEntryAvatar(IAvatar *a)
Add one ParticleEntry avatar.
void particleHasBeenUpdated(Particle *const)
Notify the Store that a particle has been updated.
void loadParticles(std::string filename)
Load particle configuration from ASCII file (see avatarPredictionTest).
ParticleList incoming
List of incoming particles.
void addToOutgoing(ParticleList const &pl)
Add a list of particles to the outgoing particle list.
void addIncomingParticle(Particle *const p)
Add a particle to the incoming list.
std::map< Particle *, IAvatarList * > particleAvatarConnections
Map particle -> [avatar].
The purpose of the Store object is to act as a "particle manager" that keeps track ofall the particle...
~Store()
Store destructor.
G4int loadedZ
The target nucleus charge number that was loaded from a particle file.
void addToOutgoing(Particle *p)
add the particle to the outgoing particle list.
Book theBook
The Book object keeps track of global counters.
G4double currentTime
The current time in the simulation.
void timeStep(G4double step)
Make one time step: propagate particles and subtract the length of the step from the avatar times...
ParticleList::const_iterator ParticleIter
void removeFromIncoming(Particle *const p)
Add a particle to the incoming list.
void clearIncoming()
Clear the incoming list.
void particleHasEntered(Particle *const particle)
Move a particle from incoming to inside.
ParticleList inside
List of particles that are inside the nucleus.