Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes
G4INCL::IAvatar Class Referenceabstract

#include <G4INCLIAvatar.hh>

Inheritance diagram for G4INCL::IAvatar:
G4INCL::InteractionAvatar G4INCL::ParticleEntryAvatar G4INCL::SurfaceAvatar G4INCL::BinaryCollisionAvatar G4INCL::DecayAvatar

Public Member Functions

 IAvatar ()
 
 IAvatar (G4double time)
 
virtual ~IAvatar ()
 
virtual G4INCL::IChannelgetChannel ()=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 60 of file G4INCLIAvatar.hh.

Constructor & Destructor Documentation

G4INCL::IAvatar::IAvatar ( )

Definition at line 52 of file G4INCLIAvatar.cc.

52  :
53  type(UnknownAvatarType),
54  theTime(0.)
55  {
56  ID = nextID;
57  nextID++;
58  }
G4INCL::IAvatar::IAvatar ( G4double  time)

Definition at line 60 of file G4INCLIAvatar.cc.

60  :
61  type(UnknownAvatarType),
62  theTime(time)
63  {
64  ID = nextID;
65  nextID++;
66  }
G4INCL::IAvatar::~IAvatar ( )
virtual

Definition at line 68 of file G4INCLIAvatar.cc.

68  {
69  }

Member Function Documentation

virtual std::string G4INCL::IAvatar::dump ( ) const
pure virtual
virtual G4INCL::IChannel* G4INCL::IAvatar::getChannel ( )
pure virtual
G4INCL::FinalState * G4INCL::IAvatar::getFinalState ( )

Definition at line 88 of file G4INCLIAvatar.cc.

References test::c, getChannel(), G4INCL::IChannel::getFinalState(), G4INCL::Random::getSeeds(), INCL_DEBUG, postInteraction(), and preInteraction().

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

89  {
90  INCL_DEBUG("Random seeds before preInteraction: " << Random::getSeeds() << std::endl);
92  INCL_DEBUG("Random seeds before getChannel: " << Random::getSeeds() << std::endl);
93  IChannel *c = getChannel();
94  if( !c ) {
95  return NULL;
96  }
97  INCL_DEBUG("Random seeds before getFinalState: " << Random::getSeeds() << std::endl);
98  FinalState *fs = c->getFinalState();
99  INCL_DEBUG("Random seeds before postInteraction: " << Random::getSeeds() << std::endl);
100  fs = postInteraction(fs);
101  delete c;
102  return fs;
103  }
virtual G4INCL::IChannel * getChannel()=0
virtual void preInteraction()=0
virtual FinalState * postInteraction(FinalState *)=0
SeedVector getSeeds()
Definition: G4INCLRandom.cc:70
#define INCL_DEBUG(x)
long G4INCL::IAvatar::getID ( ) const
inline

Definition at line 81 of file G4INCLIAvatar.hh.

Referenced by toString().

81 { return ID; };
virtual ParticleList G4INCL::IAvatar::getParticles ( ) const
pure virtual
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().

71 { return theTime; };
AvatarType G4INCL::IAvatar::getType ( ) const
inline

Definition at line 77 of file G4INCLIAvatar.hh.

Referenced by G4INCL::InteractionAvatar::shouldUseLocalEnergy(), and toString().

77 { return type; };
G4bool G4INCL::IAvatar::isACollision ( ) const
inline

Definition at line 78 of file G4INCLIAvatar.hh.

References G4INCL::CollisionAvatarType.

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

Definition at line 79 of file G4INCLIAvatar.hh.

References G4INCL::DecayAvatarType.

79 { return (type==DecayAvatarType); };
virtual FinalState* G4INCL::IAvatar::postInteraction ( FinalState )
pure virtual
virtual void G4INCL::IAvatar::preInteraction ( )
pure virtual
void G4INCL::IAvatar::setType ( AvatarType  t)
inline
std::string G4INCL::IAvatar::toString ( )

Definition at line 71 of file G4INCLIAvatar.cc.

References getID(), getParticles(), getTime(), getType(), and readPY::pl.

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

Field Documentation

G4double G4INCL::IAvatar::theTime
protected

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