34#define INCLXX_IN_GEANT4_MODE 1
54 ss <<
"avatar-dump-" << eventCounter <<
".dat";
55 oFile =
new std::ofstream(ss.str().c_str());
63 highlight.insert(highlight.end(), modified.begin(), modified.end());
65 highlight.insert(highlight.end(), outgoing.begin(), outgoing.end());
67 highlight.insert(highlight.end(), destroyed.begin(), destroyed.end());
69 highlight.insert(highlight.end(), created.begin(), created.end());
71 highlight.insert(highlight.end(), entering.begin(), entering.end());
72 particles.insert(particles.end(), created.begin(), created.end());
73 particles.insert(particles.end(), entering.begin(), entering.end());
76 (*oFile) << avatar->
getTime() <<
'\t' << avatar->
getType() <<
'\t' << particles.size() <<
'\n';
77 for(
ParticleIter p=particles.begin(), e=particles.end(); p!=e; ++p) {
79 ThreeVector const &vel = (*p)->getPropagationVelocity();
82 << (*p)->getID() <<
'\t'
83 << (*p)->getParticipantType() <<
'\t'
84 << (*p)->getType() <<
'\t'
91 << (*p)->getKineticEnergy() <<
'\t'
92 << (*p)->getPotentialEnergy() <<
'\t'
93 << highlightIt <<
'\n';
Alternative CascadeAction for dumping avatars.
virtual void beforeCascadeUserAction(IPropagationModel *)
virtual void afterAvatarUserAction(IAvatar *avatar, Nucleus *nucleus, FinalState *)
virtual void afterCascadeUserAction(Nucleus *)
virtual ~AvatarDumpAction()
ParticleList const & getOutgoingParticles() const
ParticleList const & getEnteringParticles() const
ParticleList const & getModifiedParticles() const
ParticleList const & getDestroyedParticles() const
ParticleList const & getCreatedParticles() const
AvatarType getType() const
ParticleList const & getParticles() const
G4bool contains(const T &t) const
ParticleList::const_iterator ParticleIter