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
54 #endif // INCLXX_IN_GEANT4_MODE
56 #if !defined(NDEBUG) && !defined(INCLXX_IN_GEANT4_MODE)
63 template class std::multimap<G4INCL::Particle*, G4INCL::IAvatar*>;
102 void addParticleEntryAvatar(
IAvatar *
a);
105 void addParticleEntryAvatars(
IAvatarList const &al);
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);
205 void particleHasBeenDestroyed(
Particle *
const);
211 void particleHasEntered(
Particle *
const particle);
234 for(
ParticleIter p=outgoing.begin(), e=outgoing.end(); p!=e; ++p) {
235 if((*p)->isProjectileSpectator()) {
237 spectators.push_back(*p);
242 for(
ParticleIter i=spectators.begin(); i!=spectators.end(); ++i) {
263 for(
ParticleIter i=inside.begin(), e=inside.end(); i!=e; ++i) {
264 if(!(*i)->isTargetSpectator())
294 void clearOutgoing();
305 void loadParticles(std::string
const &filename);
328 std::string printParticleConfiguration();
333 void writeParticles(std::string
const &filename);
338 std::string printAvatars();
340 G4bool containsCollisions()
const;
342 #if defined(INCL_AVATAR_SEARCH_FullSort) || defined(INCL_AVATAR_SEARCH_MinElement)
384 void disconnectAvatarFromParticle(
IAvatar *
const a,
Particle *
const p);
393 void removeAvatar(
IAvatar *
const a);
400 typedef std::multimap<Particle*, IAvatar*>::value_type
PAPair;
401 typedef std::multimap<Particle*, IAvatar*>::iterator
PAIter;
406 typedef std::set<IAvatar*>::const_iterator
ASIter;
The INCL configuration object.
static G4bool avatarComparisonPredicate(IAvatar *lhs, IAvatar *rhs)
Comparison predicate for 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.
ParticleList geomSpectators
List of geometrical spectators.
std::vector< ExP01TrackerHit * > a
Config const * getConfig()
Get the config object.
ParticleList outgoing
List of outgoing particles.
std::multimap< Particle *, IAvatar * >::value_type PAPair
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.
IAvatarList const & getAvatars() const
Return the list of avatars.
std::set< IAvatar * >::const_iterator ASIter
IAvatarList avatarList
List of all avatars.
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.
std::pair< PAIter, PAIter > PAIterPair
G4int getLoadedZ()
Get the value of the nucleus charge number that we read from file with loadParticles.
std::multimap< Particle *, IAvatar * >::iterator PAIter
ParticleList incoming
List of incoming particles.
void addToOutgoing(ParticleList const &pl)
Add a list of particles to the outgoing particle list.
std::multimap< Particle *, IAvatar * > particleAvatarConnections
Map particle -> [avatar].
The purpose of the Store object is to act as a "particle manager" that keeps track ofall the particle...
G4int loadedZ
The target nucleus charge number that was loaded from a particle file.
std::set< IAvatar * > avatarsToBeRemoved
Set of avatars to be removed.
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.
ParticleList::const_iterator ParticleIter
void removeFromIncoming(Particle *const p)
Add a particle to the incoming list.
void clearIncoming()
Clear the incoming list.
ParticleList inside
List of particles that are inside the nucleus.