Geant4-11
Public Member Functions | Protected Attributes | Private Attributes | Static Private Attributes
G4INCL::ParticleEntryAvatar Class Reference

#include <G4INCLParticleEntryAvatar.hh>

Inheritance diagram for G4INCL::ParticleEntryAvatar:
G4INCL::IAvatar

Public Member Functions

std::string dump () const
 
void fillFinalState (FinalState *fs)
 
virtual G4INCL::IChannelgetChannel ()
 
FinalStategetFinalState ()
 
long getID () const
 
ParticleList getParticles () const
 
G4double getTime () const
 
AvatarType getType () const
 
G4bool isACollision () const
 
G4bool isADecay () const
 
 ParticleEntryAvatar (G4double, G4INCL::Nucleus *, G4INCL::Particle *)
 
virtual void postInteraction (FinalState *)
 
virtual void preInteraction ()
 
void setType (AvatarType t)
 
std::string toString ()
 
virtual ~ParticleEntryAvatar ()
 

Protected Attributes

G4double theTime
 

Private Attributes

long ID
 
NucleustheNucleus
 
ParticletheParticle
 
AvatarType type
 

Static Private Attributes

static G4ThreadLocal long nextID = 1
 

Detailed Description

Definition at line 47 of file G4INCLParticleEntryAvatar.hh.

Constructor & Destructor Documentation

◆ ParticleEntryAvatar()

G4INCL::ParticleEntryAvatar::ParticleEntryAvatar ( G4double  time,
G4INCL::Nucleus nucleus,
G4INCL::Particle particle 
)

◆ ~ParticleEntryAvatar()

G4INCL::ParticleEntryAvatar::~ParticleEntryAvatar ( )
virtual

Definition at line 55 of file G4INCLParticleEntryAvatar.cc.

56 {}

Member Function Documentation

◆ dump()

std::string G4INCL::ParticleEntryAvatar::dump ( ) const
virtual

Implements G4INCL::IAvatar.

Definition at line 58 of file G4INCLParticleEntryAvatar.cc.

58 {
59 std::stringstream ss;
60 ss << "(avatar " << theTime <<" 'particle-entry" << '\n'
61 << "(list " << '\n'
62 << theParticle->dump()
63 << "))" << '\n';
64 return ss.str();
65 }
std::string dump() const

References G4INCL::Particle::dump(), theParticle, and G4INCL::IAvatar::theTime.

◆ fillFinalState()

void G4INCL::IAvatar::fillFinalState ( FinalState fs)
inherited

Definition at line 96 of file G4INCLIAvatar.cc.

96 {
97 INCL_DEBUG("Random seeds before preInteraction: " << Random::getSeeds() << '\n');
99 INCL_DEBUG("Random seeds before getChannel: " << Random::getSeeds() << '\n');
100 IChannel *c = getChannel();
101 if( !c )
102 return;
103 INCL_DEBUG("Random seeds before getFinalState: " << Random::getSeeds() << '\n');
104 c->fillFinalState(fs);
105 INCL_DEBUG("Random seeds before postInteraction: " << Random::getSeeds() << '\n');
106 postInteraction(fs);
107 delete c;
108 }
#define INCL_DEBUG(x)
virtual void postInteraction(FinalState *)=0
virtual void preInteraction()=0
virtual G4INCL::IChannel * getChannel()=0
SeedVector getSeeds()
Definition: G4INCLRandom.cc:89

References G4INCL::IChannel::fillFinalState(), G4INCL::IAvatar::getChannel(), G4INCL::Random::getSeeds(), INCL_DEBUG, G4INCL::IAvatar::postInteraction(), and G4INCL::IAvatar::preInteraction().

Referenced by G4INCL::INCL::cascade(), and G4INCL::IAvatar::getFinalState().

◆ getChannel()

IChannel * G4INCL::ParticleEntryAvatar::getChannel ( )
virtual

Implements G4INCL::IAvatar.

Definition at line 71 of file G4INCLParticleEntryAvatar.cc.

71 {
72 return new ParticleEntryChannel(theNucleus, theParticle);
73 }

References theNucleus, and theParticle.

◆ getFinalState()

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

Definition at line 90 of file G4INCLIAvatar.cc.

90 {
91 FinalState *fs = new FinalState;
93 return fs;
94 }
void fillFinalState(FinalState *fs)

References G4INCL::IAvatar::fillFinalState().

Referenced by G4INCL::INCL::makeCompoundNucleus().

◆ getID()

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

◆ getParticles()

ParticleList G4INCL::ParticleEntryAvatar::getParticles ( ) const
inlinevirtual

Implements G4INCL::IAvatar.

Definition at line 52 of file G4INCLParticleEntryAvatar.hh.

52 {
53 ParticleList theParticleList;
54 theParticleList.push_back(theParticle);
55 return theParticleList;
56 };

References theParticle.

◆ getTime()

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

◆ getType()

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

◆ isACollision()

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

Definition at line 91 of file G4INCLIAvatar.hh.

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

References G4INCL::CollisionAvatarType.

Referenced by G4INCL::CascadeAction::afterAvatarDefaultAction().

◆ isADecay()

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

Definition at line 92 of file G4INCLIAvatar.hh.

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

References G4INCL::DecayAvatarType.

Referenced by G4INCL::CascadeAction::afterAvatarDefaultAction().

◆ postInteraction()

void G4INCL::ParticleEntryAvatar::postInteraction ( FinalState )
virtual

Implements G4INCL::IAvatar.

Definition at line 67 of file G4INCLParticleEntryAvatar.cc.

67 {
69 }
void rpCorrelate()
Make the particle follow a strict r-p correlation.

References G4INCL::Particle::rpCorrelate(), and theParticle.

◆ preInteraction()

virtual void G4INCL::ParticleEntryAvatar::preInteraction ( )
inlinevirtual

Implements G4INCL::IAvatar.

Definition at line 58 of file G4INCLParticleEntryAvatar.hh.

58{};

◆ setType()

void G4INCL::IAvatar::setType ( AvatarType  t)
inlineinherited

◆ toString()

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

Definition at line 73 of file G4INCLIAvatar.cc.

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

References G4INCL::IAvatar::getID(), G4INCL::IAvatar::getParticles(), G4INCL::IAvatar::getTime(), G4INCL::IAvatar::getType(), and numberOfParticles.

Field Documentation

◆ ID

long G4INCL::IAvatar::ID
privateinherited

Definition at line 98 of file G4INCLIAvatar.hh.

Referenced by G4INCL::IAvatar::IAvatar().

◆ nextID

G4ThreadLocal long G4INCL::IAvatar::nextID = 1
staticprivateinherited

Definition at line 100 of file G4INCLIAvatar.hh.

Referenced by G4INCL::IAvatar::IAvatar().

◆ theNucleus

Nucleus* G4INCL::ParticleEntryAvatar::theNucleus
private

Definition at line 63 of file G4INCLParticleEntryAvatar.hh.

Referenced by getChannel().

◆ theParticle

Particle* G4INCL::ParticleEntryAvatar::theParticle
private

Definition at line 64 of file G4INCLParticleEntryAvatar.hh.

Referenced by dump(), getChannel(), getParticles(), and postInteraction().

◆ theTime

G4double G4INCL::IAvatar::theTime
protectedinherited

◆ type

AvatarType G4INCL::IAvatar::type
privateinherited

Definition at line 99 of file G4INCLIAvatar.hh.


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