#include <G4INCLIAvatar.hh>
Inheritance diagram for G4INCL::IAvatar:
Public Member Functions | |
IAvatar () | |
IAvatar (G4double time) | |
virtual | ~IAvatar () |
virtual G4INCL::IChannel * | getChannel () const =0 |
G4INCL::FinalState * | getFinalState () |
virtual void | preInteraction ()=0 |
virtual FinalState * | postInteraction (FinalState *)=0 |
G4double | getTime () const |
virtual ParticleList | getParticles () const =0 |
virtual std::string | dump () const =0 |
AvatarType | getType () const |
G4bool | isACollision () const |
G4bool | isADecay () const |
void | setType (AvatarType t) |
long | getID () const |
std::string | toString () |
Protected Attributes | |
G4double | theTime |
Definition at line 60 of file G4INCLIAvatar.hh.
G4INCL::IAvatar::IAvatar | ( | ) |
Definition at line 51 of file G4INCLIAvatar.cc.
00051 : 00052 type(UnknownAvatarType), 00053 theTime(0.) 00054 { 00055 ID = nextID; 00056 nextID++; 00057 }
G4INCL::IAvatar::IAvatar | ( | G4double | time | ) |
Definition at line 59 of file G4INCLIAvatar.cc.
00059 : 00060 type(UnknownAvatarType), 00061 theTime(time) 00062 { 00063 ID = nextID; 00064 nextID++; 00065 }
G4INCL::IAvatar::~IAvatar | ( | ) | [virtual] |
virtual std::string G4INCL::IAvatar::dump | ( | ) | const [pure virtual] |
Implemented in G4INCL::BinaryCollisionAvatar, G4INCL::DecayAvatar, G4INCL::ParticleEntryAvatar, and G4INCL::SurfaceAvatar.
Referenced by G4INCL::AvatarAction::beforeAvatarAction().
virtual G4INCL::IChannel* G4INCL::IAvatar::getChannel | ( | ) | const [pure virtual] |
Implemented in G4INCL::BinaryCollisionAvatar, G4INCL::DecayAvatar, G4INCL::InteractionAvatar, G4INCL::ParticleEntryAvatar, and G4INCL::SurfaceAvatar.
Referenced by getFinalState().
G4INCL::FinalState * G4INCL::IAvatar::getFinalState | ( | ) |
Definition at line 87 of file G4INCLIAvatar.cc.
References getChannel(), G4INCL::IChannel::getFinalState(), postInteraction(), and preInteraction().
Referenced by G4INCL::Nucleus::decayInsideDeltas(), and G4INCL::Nucleus::decayOutgoingDeltas().
00088 { 00089 preInteraction(); 00090 IChannel *c = getChannel(); 00091 if( !c ) { 00092 return new FinalState; 00093 } 00094 FinalState *fs = c->getFinalState(); 00095 fs = postInteraction(fs); 00096 delete c; 00097 return fs; 00098 }
long G4INCL::IAvatar::getID | ( | ) | const [inline] |
Definition at line 81 of file G4INCLIAvatar.hh.
Referenced by G4INCL::Store::add(), G4INCL::Store::addParticleEntryAvatar(), G4INCL::Store::findSmallestTime(), and toString().
virtual ParticleList G4INCL::IAvatar::getParticles | ( | ) | const [pure virtual] |
Implemented in G4INCL::BinaryCollisionAvatar, G4INCL::DecayAvatar, G4INCL::ParticleEntryAvatar, and G4INCL::SurfaceAvatar.
Referenced by G4INCL::Store::add(), G4INCL::Store::addParticleEntryAvatar(), and toString().
G4double G4INCL::IAvatar::getTime | ( | ) | const [inline] |
Definition at line 71 of file G4INCLIAvatar.hh.
References theTime.
Referenced by G4INCL::Store::avatarComparisonPredicate(), G4INCL::StandardPropagationModel::propagate(), and toString().
00071 { return theTime; };
AvatarType G4INCL::IAvatar::getType | ( | ) | const [inline] |
Definition at line 77 of file G4INCLIAvatar.hh.
Referenced by G4INCL::AvatarAction::beforeAvatarAction(), G4INCL::InteractionAvatar::shouldUseLocalEnergy(), and toString().
G4bool G4INCL::IAvatar::isACollision | ( | ) | const [inline] |
Definition at line 78 of file G4INCLIAvatar.hh.
References G4INCL::CollisionAvatarType.
Referenced by G4INCL::AvatarAction::afterAvatarAction().
00078 { return (type==CollisionAvatarType); };
G4bool G4INCL::IAvatar::isADecay | ( | ) | const [inline] |
Definition at line 79 of file G4INCLIAvatar.hh.
References G4INCL::DecayAvatarType.
Referenced by G4INCL::AvatarAction::afterAvatarAction().
00079 { return (type==DecayAvatarType); };
virtual FinalState* G4INCL::IAvatar::postInteraction | ( | FinalState * | ) | [pure virtual] |
Implemented in G4INCL::BinaryCollisionAvatar, G4INCL::DecayAvatar, G4INCL::InteractionAvatar, G4INCL::ParticleEntryAvatar, and G4INCL::SurfaceAvatar.
Referenced by getFinalState().
virtual void G4INCL::IAvatar::preInteraction | ( | ) | [pure virtual] |
Implemented in G4INCL::BinaryCollisionAvatar, G4INCL::DecayAvatar, G4INCL::InteractionAvatar, G4INCL::ParticleEntryAvatar, and G4INCL::SurfaceAvatar.
Referenced by getFinalState().
void G4INCL::IAvatar::setType | ( | AvatarType | t | ) | [inline] |
Definition at line 80 of file G4INCLIAvatar.hh.
Referenced by G4INCL::BinaryCollisionAvatar::BinaryCollisionAvatar(), G4INCL::DecayAvatar::DecayAvatar(), G4INCL::ParticleEntryAvatar::ParticleEntryAvatar(), and G4INCL::SurfaceAvatar::SurfaceAvatar().
std::string G4INCL::IAvatar::toString | ( | ) |
Definition at line 70 of file G4INCLIAvatar.cc.
References getID(), getParticles(), getTime(), and getType().
00070 { 00071 std::stringstream entry; 00072 std::stringstream particleString; 00073 ParticleList pl = getParticles(); 00074 G4int numberOfParticles = 0; 00075 for(ParticleIter i = pl.begin(); i != pl.end(); ++i) { 00076 numberOfParticles++; 00077 particleString << (*i)->getID() << " "; 00078 } 00079 if(numberOfParticles == 1) particleString << "-1"; 00080 entry << getID() << " " 00081 << getType() << " " 00082 << getTime() << " " 00083 << particleString.str(); 00084 return entry.str(); 00085 }
G4double G4INCL::IAvatar::theTime [protected] |
Definition at line 89 of file G4INCLIAvatar.hh.
Referenced by G4INCL::SurfaceAvatar::dump(), G4INCL::ParticleEntryAvatar::dump(), G4INCL::DecayAvatar::dump(), G4INCL::BinaryCollisionAvatar::dump(), and getTime().