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

#include <G4INCLIAvatar.hh>

+ Inheritance diagram for G4INCL::IAvatar:

Public Member Functions

 IAvatar ()
 
 IAvatar (G4double time)
 
virtual ~IAvatar ()
 
virtual G4INCL::IChannelgetChannel () const =0
 
G4INCL::FinalStategetFinalState ()
 
virtual void preInteraction ()=0
 
virtual FinalStatepostInteraction (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
 

Detailed Description

Definition at line 62 of file G4INCLIAvatar.hh.

Constructor & Destructor Documentation

◆ IAvatar() [1/2]

G4INCL::IAvatar::IAvatar ( )

Definition at line 53 of file G4INCLIAvatar.cc.

53 :
55 theTime(0.)
56 {
57 ID = nextID;
58 nextID++;
59 }
@ UnknownAvatarType

◆ IAvatar() [2/2]

G4INCL::IAvatar::IAvatar ( G4double  time)

Definition at line 61 of file G4INCLIAvatar.cc.

61 :
63 theTime(time)
64 {
65 ID = nextID;
66 nextID++;
67 }

◆ ~IAvatar()

G4INCL::IAvatar::~IAvatar ( )
virtual

Definition at line 69 of file G4INCLIAvatar.cc.

69 {
70 }

Member Function Documentation

◆ dump()

virtual std::string G4INCL::IAvatar::dump ( ) const
pure virtual

◆ getChannel()

virtual G4INCL::IChannel * G4INCL::IAvatar::getChannel ( ) const
pure virtual

◆ getFinalState()

G4INCL::FinalState * G4INCL::IAvatar::getFinalState ( )

Definition at line 89 of file G4INCLIAvatar.cc.

90 {
92 IChannel *c = getChannel();
93 if( !c ) {
94 return new FinalState;
95 }
96 FinalState *fs = c->getFinalState();
97 fs = postInteraction(fs);
98 delete c;
99 return fs;
100 }
virtual G4INCL::IChannel * getChannel() const =0
virtual void preInteraction()=0
virtual FinalState * postInteraction(FinalState *)=0

Referenced by G4INCL::Nucleus::decayInsideDeltas(), and G4INCL::Nucleus::decayOutgoingDeltas().

◆ getID()

long G4INCL::IAvatar::getID ( ) const
inline

◆ getParticles()

◆ getTime()

G4double G4INCL::IAvatar::getTime ( ) const
inline

◆ getType()

AvatarType G4INCL::IAvatar::getType ( ) const
inline

◆ isACollision()

G4bool G4INCL::IAvatar::isACollision ( ) const
inline

Definition at line 80 of file G4INCLIAvatar.hh.

80{ return (type==CollisionAvatarType); };
@ CollisionAvatarType

Referenced by G4INCL::AvatarAction::afterAvatarAction().

◆ isADecay()

G4bool G4INCL::IAvatar::isADecay ( ) const
inline

Definition at line 81 of file G4INCLIAvatar.hh.

81{ return (type==DecayAvatarType); };
@ DecayAvatarType

Referenced by G4INCL::AvatarAction::afterAvatarAction().

◆ postInteraction()

virtual FinalState * G4INCL::IAvatar::postInteraction ( FinalState )
pure virtual

◆ preInteraction()

virtual void G4INCL::IAvatar::preInteraction ( )
pure virtual

◆ setType()

◆ toString()

std::string G4INCL::IAvatar::toString ( )

Definition at line 72 of file G4INCLIAvatar.cc.

72 {
73 std::stringstream entry;
74 std::stringstream particleString;
76 G4int numberOfParticles = 0;
77 for(ParticleIter i = pl.begin(); i != pl.end(); ++i) {
78 numberOfParticles++;
79 particleString << (*i)->getID() << " ";
80 }
81 if(numberOfParticles == 1) particleString << "-1";
82 entry << getID() << " "
83 << getType() << " "
84 << getTime() << " "
85 << particleString.str();
86 return entry.str();
87 }
int G4int
Definition: G4Types.hh:66
long getID() const
virtual ParticleList getParticles() const =0
G4double getTime() const
AvatarType getType() const
std::list< G4INCL::Particle * > ParticleList
std::list< G4INCL::Particle * >::const_iterator ParticleIter

Member Data Documentation

◆ theTime


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