Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCL::Store Class Reference

#include <G4INCLStore.hh>

Public Member Functions

 Store (Config const *const config)
 
 ~Store ()
 
void add (Particle *p)
 
void addParticleEntryAvatar (IAvatar *a)
 Add one ParticleEntry avatar.
 
void addParticleEntryAvatars (IAvatarList const &al)
 Add one ParticleEntry avatar.
 
void add (IAvatar *a)
 
IAvatarList constgetAvatars () const
 
void addIncomingParticle (Particle *const p)
 
void removeFromIncoming (Particle *const p)
 
void clearIncoming ()
 Clear the incoming list.
 
void deleteIncoming ()
 Clear the incoming list and delete the particles.
 
void particleHasBeenUpdated (long)
 
IAvatarfindSmallestTime ()
 
void timeStep (G4double step)
 
void particleHasBeenEjected (long)
 
void addToOutgoing (Particle *p)
 add the particle to the outgoing particle list.
 
void addToOutgoing (ParticleList const &pl)
 Add a list of particles to the outgoing particle list.
 
void particleHasBeenDestroyed (long)
 
void particleHasEntered (Particle *const particle)
 Move a particle from incoming to inside.
 
ParticleList constgetIncomingParticles () const
 
ParticleList constgetOutgoingParticles () const
 
ParticleList extractDynamicalSpectators ()
 Returns a list of dynamical spectators.
 
ParticleList constgetParticles () const
 
BookgetBook ()
 
G4int countCascading ()
 
Config constgetConfig ()
 
ParticleList getParticipants ()
 
ParticleList getSpectators ()
 
void clear ()
 
void clearOutgoing ()
 
void clearAvatars ()
 
void initialiseParticleAvatarConnections ()
 Initialise the particleAvatarConnections map.
 
void loadParticles (std::string filename)
 
G4int getLoadedA ()
 
G4int getLoadedZ ()
 
G4double getLoadedStoppingTime ()
 
std::string printParticleConfiguration ()
 
void writeParticles (std::string filename)
 
std::string printAvatars ()
 
G4bool containsCollisions () const
 

Static Public Member Functions

static G4bool avatarComparisonPredicate (IAvatar *lhs, IAvatar *rhs)
 Comparison predicate for avatars.
 

Detailed Description

The purpose of the Store object is to act as a "particle manager" that keeps track ofall the particles in our simulation. It also tracks the avatars and their connections to particles.

Definition at line 64 of file G4INCLStore.hh.

Constructor & Destructor Documentation

◆ Store()

G4INCL::Store::Store ( Config const *const  config)

Store constructor

Definition at line 46 of file G4INCLStore.cc.

46 :
47 theBook(new Book),
48 loadedA(0),
49 loadedZ(0),
50 loadedStoppingTime(0.),
51 theConfig(config)
52 {
53 }

◆ ~Store()

G4INCL::Store::~Store ( )

Store destructor

Definition at line 55 of file G4INCLStore.cc.

55 {
56 theBook->reset();
57 delete theBook;
58 theBook = 0;
59 clear();
60 }
void reset()
Definition: G4INCLBook.hh:53

Member Function Documentation

◆ add() [1/2]

void G4INCL::Store::add ( IAvatar a)

Add one avatar to the store

Avatars know about the particles they are associated with. Adding an avatar consists of the following steps:

  1. Add the new avatar to the avatar list
  2. Add any related new particles to the store by calling add(Particle*) (this should not happen, by the time we are adding avatars all particles should have already been added)
  3. Connect the particles involved to the avatar in the map: particleAvatarConnections :: ParticleID -> [AvatarID]
  4. Add the new avatar to the map: avatarParticleConnections :: AvatarID -> [ParticleID]

Definition at line 91 of file G4INCLStore.cc.

91 {
92 // Add the avatar to the avatar map
93 avatars[a->getID()]=a;
94 avatarList.push_back(a);
95
96 ParticleList pList = a->getParticles();
97 for(ParticleIter i = pList.begin(); i != pList.end(); ++i) {
98 // If one of the particles participating in this avatar haven't
99 // been registered with the store we can do it now. On the other
100 // hand, if this happens, it's probably a symptom of a bug
101 // somewhere...
102 if(particles.find((*i)->getID()) == particles.end()) {
103 ERROR("Avatar was added before related particles. This is probably a bug." << std::endl);
104 add((*i));
105 }
106 // Connect each particle to the avatar
107 connectParticleAndAvatar((*i)->getID(), a->getID());
108 }
109
110 }
#define ERROR(x)
void add(Particle *p)
Definition: G4INCLStore.cc:62
std::list< G4INCL::Particle * > ParticleList
std::list< G4INCL::Particle * >::const_iterator ParticleIter

◆ add() [2/2]

void G4INCL::Store::add ( Particle p)

Add one particle to the store.

Particle objects don't know anything about avatars so this method will only do two things:

  1. add the particle to the particle map ParticleID -> Particle*
  2. add an empty entry for this particle into map AvatarID -> [ParticleID]

Definition at line 62 of file G4INCLStore.cc.

62 {
63 const long ID = p->getID();
64 particles[ID]=p;
65 inside.push_back(p);
66
67 if(particleAvatarConnections.find(ID)==particleAvatarConnections.end()) {
68 std::vector<long> *aIDs = new std::vector<long>;
69 particleAvatarConnections[ID] = aIDs;
70 }
71 }

Referenced by add(), G4INCL::Nucleus::applyFinalState(), G4INCL::Nucleus::initializeParticles(), loadParticles(), particleHasEntered(), and G4INCL::StandardPropagationModel::registerAvatar().

◆ addIncomingParticle()

void G4INCL::Store::addIncomingParticle ( Particle *const  p)

Add a particle to the incoming list.

Parameters
pparticle to add

Definition at line 112 of file G4INCLStore.cc.

112 {
113 incoming.push_back(p);
114 }

Referenced by addParticleEntryAvatar().

◆ addParticleEntryAvatar()

void G4INCL::Store::addParticleEntryAvatar ( IAvatar a)

Add one ParticleEntry avatar.

Definition at line 73 of file G4INCLStore.cc.

73 {
74 // Add the avatar to the avatar map
75 avatars[a->getID()]=a;
76 avatarList.push_back(a);
77
78 ParticleList pList = a->getParticles();
79 for(ParticleIter i = pList.begin(); i != pList.end(); ++i) {
81 // Connect each particle to the avatar
82 connectParticleAndAvatar((*i)->getID(), a->getID());
83 }
84 }
void addIncomingParticle(Particle *const p)
Definition: G4INCLStore.cc:112

Referenced by addParticleEntryAvatars(), and G4INCL::StandardPropagationModel::shootParticle().

◆ addParticleEntryAvatars()

void G4INCL::Store::addParticleEntryAvatars ( IAvatarList const al)

Add one ParticleEntry avatar.

Definition at line 86 of file G4INCLStore.cc.

86 {
87 for(IAvatarIter a=al.begin(); a!=al.end(); ++a)
89 }
void addParticleEntryAvatar(IAvatar *a)
Add one ParticleEntry avatar.
Definition: G4INCLStore.cc:73
std::list< IAvatar * >::const_iterator IAvatarIter

Referenced by G4INCL::StandardPropagationModel::shootComposite().

◆ addToOutgoing() [1/2]

void G4INCL::Store::addToOutgoing ( Particle p)
inline

◆ addToOutgoing() [2/2]

void G4INCL::Store::addToOutgoing ( ParticleList const pl)
inline

Add a list of particles to the outgoing particle list.

Parameters
pllist of particles to be added

Definition at line 177 of file G4INCLStore.hh.

177 {
178 for(ParticleIter p=pl.begin(); p!=pl.end(); ++p)
179 addToOutgoing(*p);
180 }
void addToOutgoing(Particle *p)
add the particle to the outgoing particle list.
Definition: G4INCLStore.hh:171

◆ avatarComparisonPredicate()

static G4bool G4INCL::Store::avatarComparisonPredicate ( IAvatar lhs,
IAvatar rhs 
)
inlinestatic

Comparison predicate for avatars.

avatarComparisonPredicate is used by the std::sort or std::min_element functions to compare the avatar objects according to their time.

Parameters
lhspointer to the first avatar
rhspointer to the second avatar
Returns
true iff lhs' time is smaller than rhs'.

Definition at line 350 of file G4INCLStore.hh.

350 {
351 return (lhs->getTime() < rhs->getTime());
352 }

Referenced by findSmallestTime().

◆ clear()

void G4INCL::Store::clear ( )

Clear all avatars and particles from the store.

Warning! This actually deletes the objects as well!

Definition at line 342 of file G4INCLStore.cc.

342 {
343 clearAvatars();
344 inside.clear();
345
346 for(std::map<long, Particle*>::iterator iter = particles.begin();
347 iter != particles.end(); ++iter) {
348 delete (*iter).second;
349 }
350 particles.clear();
351
353
354 if( incoming.size() != 0 ) {
355 WARN("Incoming list is not empty when Store::clear() is called" << std::endl);
356 }
357 incoming.clear();
358
359#ifdef INCL_AVATAR_SEARCH_INCLSort
360 avatarIterList.clear();
361#endif
362
363 }
#define WARN(x)
void clearAvatars()
Definition: G4INCLStore.cc:318
void clearOutgoing()
Definition: G4INCLStore.cc:365

Referenced by loadParticles(), and ~Store().

◆ clearAvatars()

void G4INCL::Store::clearAvatars ( )

Clear avatars only.

Definition at line 318 of file G4INCLStore.cc.

318 {
319 for(std::map<long, IAvatar*>::iterator iter = avatars.begin();
320 iter != avatars.end(); ++iter) {
321 delete (*iter).second;
322 }
323
324 for(std::map<long, std::vector<long>*>::iterator iter = particleAvatarConnections.begin();
325 iter != particleAvatarConnections.end(); ++iter) {
326 delete (*iter).second;
327 }
328
329 particleAvatarConnections.clear();
330 avatars.clear();
331 avatarList.clear();
332
333 }

Referenced by clear(), and G4INCL::StandardPropagationModel::propagate().

◆ clearIncoming()

void G4INCL::Store::clearIncoming ( )
inline

Clear the incoming list.

Definition at line 130 of file G4INCLStore.hh.

130 {
131 incoming.clear();
132 }

Referenced by deleteIncoming().

◆ clearOutgoing()

void G4INCL::Store::clearOutgoing ( )

Clear all outgoing particles from the store.

Warning! This actually deletes the objects as well!

Definition at line 365 of file G4INCLStore.cc.

365 {
366 for(ParticleIter iter = outgoing.begin(); iter != outgoing.end(); ++iter) {
367 if((*iter)->isCluster()) {
368 Cluster *c = dynamic_cast<Cluster *>(*iter);
369// assert(c);
370#ifdef INCLXX_IN_GEANT4_MODE
371 if(!c)
372 continue;
373#endif
374 c->deleteParticles();
375 }
376 delete (*iter);
377 }
378 outgoing.clear();
379 }

Referenced by clear().

◆ containsCollisions()

G4bool G4INCL::Store::containsCollisions ( ) const

Definition at line 494 of file G4INCLStore.cc.

494 {
495 IAvatarIter i;
496 for(i = avatarList.begin(); i != avatarList.end(); ++i)
497 if((*i)->getType()==CollisionAvatarType) return true;
498 return false;
499 }
@ CollisionAvatarType

◆ countCascading()

G4int G4INCL::Store::countCascading ( )
inline

Definition at line 245 of file G4INCLStore.hh.

245 {
246 G4int n=0;
247 for(ParticleIter i=inside.begin(); i!=inside.end(); ++i) {
248 if(!(*i)->isTargetSpectator())
249 ++n;
250 }
251 return n;
252 }
int G4int
Definition: G4Types.hh:66

◆ deleteIncoming()

void G4INCL::Store::deleteIncoming ( )
inline

Clear the incoming list and delete the particles.

Definition at line 135 of file G4INCLStore.hh.

135 {
136 for(ParticleIter iter = incoming.begin(); iter != incoming.end(); ++iter) {
137 delete (*iter);
138 }
140 }
void clearIncoming()
Clear the incoming list.
Definition: G4INCLStore.hh:130

◆ extractDynamicalSpectators()

ParticleList G4INCL::Store::extractDynamicalSpectators ( )
inline

Returns a list of dynamical spectators.

Looks in the outgoing list for particles without collisions and decays, removes them from outgoing and returns them in a list.

Returns
the (possibly empty) list of dynamical spectators

Definition at line 213 of file G4INCLStore.hh.

213 {
214 ParticleList spectators;
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()) {
218// assert((*p)->isNucleon());
219 spectators.push_back(*p); // add them to the list we will return
220 toBeErased.push_back(p); // we will remove them from outgoing later
221 }
222 }
223
224 // Now erase them from outgoing
225 for(std::list<std::list<Particle*>::iterator>::iterator i=toBeErased.begin();
226 i!=toBeErased.end(); ++i) {
227 outgoing.erase(*i);
228 }
229
230 return spectators;
231 }

◆ findSmallestTime()

IAvatar * G4INCL::Store::findSmallestTime ( )

Find the avatar that has the smallest time.

Definition at line 212 of file G4INCLStore.cc.

212 {
213 if(avatarList.empty()) return NULL;
214
215#ifdef INCL_AVATAR_SEARCH_FullSort
216
217 /* Full sort algorithm.
218 *
219 * Simple, but guaranteed to work.
220 */
221 avatarList.sort(Store::avatarComparisonPredicate);
222 IAvatar *avatar = avatarList.front();
223
224#elif defined(INCL_AVATAR_SEARCH_INCLSort)
225
226 /* Partial sort algorithm used by INCL4.6.
227 *
228 * It nevers sorts the whole avatar list, but rather starts from the last
229 * best avatar. It requires the avatarList to be updated by appending new
230 * avatars at the end.
231 */
232
233 IAvatarIter best;
234 if(avatarIterList.empty())
235 best = avatarList.begin();
236 else
237 best = avatarIterList.back();
238 G4double bestTime = (*best)->getTime();
239 IAvatarIter a = best;
240
241 for(++a; a!=avatarList.end(); ++a)
242 if((*a)->getTime() < bestTime) {
243 best = a;
244 bestTime = (*best)->getTime();
245 avatarIterList.push_back(best);
246 }
247 IAvatar *avatar = *best;
248
249#elif defined(INCL_AVATAR_SEARCH_MinElement)
250
251 /* Algorithm provided by the C++ stdlib. */
252 IAvatar *avatar = *(std::min_element(avatarList.begin(), avatarList.end(),
254
255#else
256#error Unrecognized INCL_AVATAR_SEARCH. Allowed values are: FullSort, INCLSort, MinElement.
257#endif
258
259 removeAvatarByID(avatar->getID());
260 return avatar;
261 }
double G4double
Definition: G4Types.hh:64
static G4bool avatarComparisonPredicate(IAvatar *lhs, IAvatar *rhs)
Comparison predicate for avatars.
Definition: G4INCLStore.hh:350

Referenced by G4INCL::StandardPropagationModel::propagate().

◆ getAvatars()

IAvatarList const & G4INCL::Store::getAvatars ( ) const
inline

Return the list of avatars

Definition at line 111 of file G4INCLStore.hh.

111 {
112 return avatarList;
113 }

◆ getBook()

◆ getConfig()

Config const * G4INCL::Store::getConfig ( )
inline

◆ getIncomingParticles()

ParticleList const & G4INCL::Store::getIncomingParticles ( ) const
inline

Return the list of incoming particles (i.e. particles that have yet to enter the cascade).

Definition at line 198 of file G4INCLStore.hh.

198{ return incoming; }

◆ getLoadedA()

G4int G4INCL::Store::getLoadedA ( )
inline

Get the value of the nucleus mass number that we read from file with loadParticles.

Definition at line 309 of file G4INCLStore.hh.

309{ return loadedA; };

◆ getLoadedStoppingTime()

G4double G4INCL::Store::getLoadedStoppingTime ( )
inline

Get the value of the stopping time that we read from file with loadParticles.

Definition at line 321 of file G4INCLStore.hh.

321{ return loadedStoppingTime; };

◆ getLoadedZ()

G4int G4INCL::Store::getLoadedZ ( )
inline

Get the value of the nucleus charge number that we read from file with loadParticles.

Definition at line 315 of file G4INCLStore.hh.

315{ return loadedZ; };

◆ getOutgoingParticles()

ParticleList const & G4INCL::Store::getOutgoingParticles ( ) const
inline

◆ getParticipants()

ParticleList G4INCL::Store::getParticipants ( )

Get list of participants (active nucleons).

Warning: This (slow) method may be deprecated in the near future...

Definition at line 294 of file G4INCLStore.cc.

294 {
295 WARN("Store::getParticipants is probably slow..." << std::endl);
296 ParticleList result;
297 for(std::map<long, Particle*>::iterator iter = particles.begin();
298 iter != particles.end(); ++iter) {
299 if((*iter).second->isParticipant()) {
300 result.push_back((*iter).second);
301 }
302 }
303 return result;
304 }

Referenced by G4INCL::Nucleus::dump(), and G4INCL::Nucleus::print().

◆ getParticles()

◆ getSpectators()

ParticleList G4INCL::Store::getSpectators ( )

Get list of spectators (active nucleons).

Warning: This (slow) method may be deprecated in the near future...

Definition at line 306 of file G4INCLStore.cc.

306 {
307 WARN("Store::getSpectators is probably slow..." << std::endl);
308 ParticleList result;
309 for(std::map<long, Particle*>::iterator iter = particles.begin();
310 iter != particles.end(); ++iter) {
311 if(!(*iter).second->isParticipant()) {
312 result.push_back((*iter).second);
313 }
314 }
315 return result;
316 }

Referenced by G4INCL::Nucleus::print().

◆ initialiseParticleAvatarConnections()

void G4INCL::Store::initialiseParticleAvatarConnections ( )

Initialise the particleAvatarConnections map.

Generate an empty avatar-ID vector for each particle in the inside list and fill in the relevant particle-avatar map entry.

Definition at line 335 of file G4INCLStore.cc.

335 {
336 for(ParticleIter ip=inside.begin(); ip!=inside.end(); ++ip) {
337 std::vector<long> *aIDs = new std::vector<long>;
338 particleAvatarConnections[(*ip)->getID()] = aIDs;
339 }
340 }

Referenced by G4INCL::StandardPropagationModel::propagate().

◆ loadParticles()

void G4INCL::Store::loadParticles ( std::string  filename)

Load particle configuration from ASCII file (see avatarPredictionTest).

Definition at line 381 of file G4INCLStore.cc.

381 {
382 clear();
383 G4int projectileA, projectileZ, A, Z;
384 G4double stoppingTime, cutNN;
385 G4int ID, type, isParticipant;
386 G4double x, y, z;
387 G4double px, py, pz, E, v;
388
389 std::ifstream in(filename.c_str());
390 in >> projectileA >> projectileZ >> A >> Z >> stoppingTime >> cutNN;
391 loadedA = A;
392 loadedZ = Z;
393 loadedStoppingTime = stoppingTime;
394
395 G4int readA = 0;
396 G4int readZ = 0;
397 while(1) {
398 in >> ID >> type >> isParticipant >> x >> y >> z >> px >> py >> pz >> E >> v;
399 if(!in.good()) break;
400 ParticleType t;
401 if(type == 1) {
402 t = Proton;
403 readZ++;
404 readA++;
405 }
406 else if(type == -1) {
407 t = Neutron;
408 readA++;
409 }
410 else {
411 FATAL("Unrecognized particle type while loading particles; type=" << type << std::endl);
412 abort();
413 }
414
415 Particle *p = new Particle(t, E, ThreeVector(px, py, pz),
416 ThreeVector(x, y, z));
417 p->setPotentialEnergy(v);
418 if(isParticipant == 1) {
419 p->makeParticipant();
420 theBook->incrementCascading();
421 }
422 add(p);
423 }
424
425 in.close();
426 }
#define FATAL(x)
void incrementCascading()
Definition: G4INCLBook.hh:73

◆ particleHasBeenDestroyed()

void G4INCL::Store::particleHasBeenDestroyed ( long  ID)

Remove the particle from the system. This also removes all avatars related to this particle.

Definition at line 280 of file G4INCLStore.cc.

280 {
282 // Have to destroy the particle here, the Store will forget about it
283 Particle * const toDelete = particles.find(ID)->second;
284 inside.remove(toDelete);
285 delete toDelete;
286 particles.erase(ID);
287 }
void particleHasBeenUpdated(long)
Definition: G4INCLStore.cc:164

Referenced by G4INCL::Nucleus::applyFinalState().

◆ particleHasBeenEjected()

void G4INCL::Store::particleHasBeenEjected ( long  ID)

Mark the particle as ejected. This removes it from the list of inside particles and removes all avatars related to this particle.

Definition at line 271 of file G4INCLStore.cc.

271 {
273 // The particle will be destroyed when destroying the Store
274 inside.remove(particles.find(ID)->second);
275 particles.erase(ID);
276 delete particleAvatarConnections.find(ID)->second;
277 particleAvatarConnections.erase(ID);
278 }

Referenced by G4INCL::Nucleus::applyFinalState(), and G4INCL::Nucleus::emitInsidePions().

◆ particleHasBeenUpdated()

void G4INCL::Store::particleHasBeenUpdated ( long  particleID)

Notify the Store that a particle has been updated. This triggers the removal of obsolete avatars and their disconnection from the particle.

Definition at line 164 of file G4INCLStore.cc.

164 {
165 std::vector<long> temp_aIDs;
166 std::vector<long> *aIDs = particleAvatarConnections.find(particleID)->second;
167 for(std::vector<long>::iterator i = aIDs->begin();
168 i != aIDs->end(); ++i) {
169 temp_aIDs.push_back((*i));
170 }
171
172 for(std::vector<long>::iterator i = temp_aIDs.begin();
173 i != temp_aIDs.end(); ++i) {
174 IAvatar *tmpAvatar = avatars.find(*i)->second;
175 removeAvatarByID((*i));
176 delete tmpAvatar;
177 }
178 }

Referenced by G4INCL::Nucleus::applyFinalState(), particleHasBeenDestroyed(), and particleHasBeenEjected().

◆ particleHasEntered()

void G4INCL::Store::particleHasEntered ( Particle *const  particle)

Move a particle from incoming to inside.

Parameters
particlepointer to a particle

Definition at line 289 of file G4INCLStore.cc.

289 {
290 removeFromIncoming(particle);
291 add(particle);
292 }
void removeFromIncoming(Particle *const p)
Definition: G4INCLStore.hh:127

Referenced by G4INCL::Nucleus::insertParticle().

◆ printAvatars()

std::string G4INCL::Store::printAvatars ( )

Print the list of avatars

Definition at line 485 of file G4INCLStore.cc.

485 {
486 std::stringstream ss;
487 IAvatarIter i;
488 for(i = avatarList.begin(); i != avatarList.end(); ++i) {
489 ss << (*i)->toString() << std::endl;
490 }
491 return ss.str();
492 }

◆ printParticleConfiguration()

std::string G4INCL::Store::printParticleConfiguration ( )

Print the nucleon configuration of the nucleus.

Definition at line 428 of file G4INCLStore.cc.

428 {
429 std::stringstream ss;
430 G4int A = 0, Z = 0;
431 for(ParticleIter i = inside.begin(); i != inside.end(); ++i) {
432 if((*i)->getType() == Proton) {
433 A++;
434 Z++;
435 }
436 if((*i)->getType() == Neutron) {
437 A++;
438 }
439 }
440 // Note: Projectile A and Z are set to 0 (we don't really know
441 // anything about them at this point).
442 ss << "0 0 " << A << " " << Z << " "
443 << "100.0" << " "
444 << "0.0" << std::endl;
445
446 for(ParticleIter i = inside.begin(); i != inside.end(); ++i) {
447 G4int ID = (*i)->getID();
448 G4int type = 0;
449 if((*i)->getType() == Proton) {
450 type = 1;
451 }
452 if((*i)->getType() == Neutron) {
453 type = -1;
454 }
455
456 G4int isParticipant = 0;
457 if((*i)->isParticipant()) {
458 isParticipant = 1;
459 }
460
461 G4double x = (*i)->getPosition().getX();
462 G4double y = (*i)->getPosition().getY();
463 G4double z = (*i)->getPosition().getZ();
464 G4double E = (*i)->getEnergy();
465 G4double px = (*i)->getMomentum().getX();
466 G4double py = (*i)->getMomentum().getY();
467 G4double pz = (*i)->getMomentum().getZ();
468 G4double V = (*i)->getPotentialEnergy();
469
470 ss << ID << " " << type << " " << isParticipant << " "
471 << x << " " << y << " " << z << " "
472 << px << " " << py << " " << pz << " "
473 << E << " " << V << std::endl;
474 }
475
476 return ss.str();
477 }

Referenced by writeParticles().

◆ removeFromIncoming()

void G4INCL::Store::removeFromIncoming ( Particle *const  p)
inline

Add a particle to the incoming list.

Parameters
pparticle to add

Definition at line 127 of file G4INCLStore.hh.

127{ incoming.remove(p); }

Referenced by particleHasEntered().

◆ timeStep()

void G4INCL::Store::timeStep ( G4double  step)

Make one time step: propagate particles and subtract the length of the step from the avatar times.

Definition at line 263 of file G4INCLStore.cc.

263 {
264 for(std::map<long, Particle*>::iterator particleIter
265 = particles.begin();
266 particleIter != particles.end(); ++particleIter) {
267 (*particleIter).second->propagate(step);
268 }
269 }

Referenced by G4INCL::StandardPropagationModel::propagate().

◆ writeParticles()

void G4INCL::Store::writeParticles ( std::string  filename)

Print the nucleon configuration of the nucleus.

Definition at line 479 of file G4INCLStore.cc.

479 {
480 std::ofstream out(filename.c_str());
482 out.close();
483 }
std::string printParticleConfiguration()
Definition: G4INCLStore.cc:428

The documentation for this class was generated from the following files: