Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4INCL::DecayAvatar Class Reference

#include <G4INCLDecayAvatar.hh>

Inheritance diagram for G4INCL::DecayAvatar:
Collaboration diagram for G4INCL::DecayAvatar:

Public Member Functions

 DecayAvatar (G4INCL::Particle *aParticle, G4double time, G4INCL::Nucleus *aNucleus, G4bool force=false)
 
virtual ~DecayAvatar ()
 
IChannelgetChannel ()
 
void fillFinalState (FinalState *fs)
 
virtual void preInteraction ()
 
virtual void postInteraction (FinalState *fs)
 
ParticleList getParticles () const
 
std::string dump () const
 
- Public Member Functions inherited from G4INCL::InteractionAvatar
 InteractionAvatar (G4double, G4INCL::Nucleus *, G4INCL::Particle *)
 
 InteractionAvatar (G4double, G4INCL::Nucleus *, G4INCL::Particle *, G4INCL::Particle *)
 
virtual ~InteractionAvatar ()
 
- Public Member Functions inherited from G4INCL::IAvatar
 IAvatar ()
 
 IAvatar (G4double time)
 
virtual ~IAvatar ()
 
FinalStategetFinalState ()
 
void fillFinalState (FinalState *fs)
 
G4double getTime () const
 
AvatarType getType () const
 
G4bool isACollision () const
 
G4bool isADecay () const
 
void setType (AvatarType t)
 
long getID () const
 
std::string toString ()
 

Additional Inherited Members

- Static Public Member Functions inherited from G4INCL::InteractionAvatar
static void deleteBackupParticles ()
 Release the memory allocated for the backup particles. More...
 
- Static Public Attributes inherited from G4INCL::InteractionAvatar
static const G4double locEAccuracy = 1.E-4
 Target accuracy in the determination of the local-energy Q-value. More...
 
static const G4int maxIterLocE = 50
 Max number of iterations for the determination of the local-energy Q-value. More...
 
- Protected Member Functions inherited from G4INCL::InteractionAvatar
G4bool bringParticleInside (Particle *const p)
 
void preInteractionLocalEnergy (Particle *const p)
 Apply local-energy transformation, if appropriate. More...
 
void preInteractionBlocking ()
 Store the state of the particles before the interaction. More...
 
void preInteraction ()
 
void postInteraction (FinalState *)
 
void restoreParticles () const
 Restore the state of both particles. More...
 
G4bool shouldUseLocalEnergy () const
 true if the given avatar should use local energy More...
 
G4bool enforceEnergyConservation (FinalState *const fs)
 Enforce energy conservation. More...
 
- Protected Attributes inherited from G4INCL::InteractionAvatar
NucleustheNucleus
 
Particleparticle1
 
Particleparticle2
 
ThreeVector boostVector
 
G4double oldTotalEnergy
 
G4double oldXSec
 
G4bool isPiN
 
ParticleList modified
 
ParticleList created
 
ParticleList modifiedAndCreated
 
- Protected Attributes inherited from G4INCL::IAvatar
G4double theTime
 
- Static Protected Attributes inherited from G4INCL::InteractionAvatar
static G4ThreadLocal ParticlebackupParticle1 = NULL
 
static G4ThreadLocal ParticlebackupParticle2 = NULL
 

Detailed Description

Decay avatar

The reflection avatar is created when a particle reaches the boundary of the nucleus. At this point it can either be reflected from the boundary or exit the nucleus.

Definition at line 55 of file G4INCLDecayAvatar.hh.

Constructor & Destructor Documentation

G4INCL::DecayAvatar::DecayAvatar ( G4INCL::Particle aParticle,
G4double  time,
G4INCL::Nucleus aNucleus,
G4bool  force = false 
)

Definition at line 49 of file G4INCLDecayAvatar.cc.

50  : InteractionAvatar(time, n, aParticle), forced(force),
51  incidentDirection(aParticle->getMomentum())
52  {
54  }
const G4INCL::ThreeVector & getMomentum() const
InteractionAvatar(G4double, G4INCL::Nucleus *, G4INCL::Particle *)
void setType(AvatarType t)
const G4int n

Here is the call graph for this function:

G4INCL::DecayAvatar::~DecayAvatar ( )
virtual

Definition at line 56 of file G4INCLDecayAvatar.cc.

56  {
57 
58  }

Member Function Documentation

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

Implements G4INCL::IAvatar.

Definition at line 174 of file G4INCLDecayAvatar.cc.

174  {
175  std::stringstream ss;
176  ss << "(avatar " << theTime << " 'decay" << '\n'
177  << "(list " << '\n'
178  << particle1->dump()
179  << "))" << '\n';
180  return ss.str();
181  }
std::string dump() const

Here is the call graph for this function:

void G4INCL::DecayAvatar::fillFinalState ( FinalState fs)
G4INCL::IChannel * G4INCL::DecayAvatar::getChannel ( )
virtual

Implements G4INCL::InteractionAvatar.

Definition at line 60 of file G4INCLDecayAvatar.cc.

60  {
61  if(particle1->isDelta()) {
62  INCL_DEBUG("DeltaDecayChannel chosen." << '\n');
63  return new DeltaDecayChannel(particle1, incidentDirection);
64  }
65  else if(particle1->isEta() || particle1->isOmega()) {
66  INCL_DEBUG("PionResonanceDecayChannel chosen." << '\n');
67  return new PionResonanceDecayChannel(particle1, incidentDirection);
68  }
69  else
70  return NULL;
71  }
G4bool isEta() const
Is this a eta?
G4bool isDelta() const
Is it a Delta?
G4bool isOmega() const
Is this a omega?
#define INCL_DEBUG(x)

Here is the call graph for this function:

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

Implements G4INCL::IAvatar.

Definition at line 66 of file G4INCLDecayAvatar.hh.

66  {
67  ParticleList theParticleList;
68  theParticleList.push_back(particle1);
69  return theParticleList;
70  }
void G4INCL::DecayAvatar::postInteraction ( FinalState fs)
virtual

Implements G4INCL::IAvatar.

Definition at line 77 of file G4INCLDecayAvatar.cc.

77  {
78  // Make sure we have at least two particles in the final state
79 // assert(fs->getModifiedParticles().size() + fs->getCreatedParticles().size() - fs->getDestroyedParticles().size() >= 2);
80 
81  if(!forced) { // Normal decay
82 
83  // Call the postInteraction method of the parent class
84  // (provides Pauli blocking and enforces energy conservation)
86 
87  if(fs->getValidity() == PauliBlockedFS)
88  /* If the decay was Pauli-blocked, make sure the propagation model
89  * generates a new decay avatar on the next call to propagate().
90  *
91  * \bug{Note that we don't generate new decay avatars for deltas that
92  * could not satisfy energy conservation. This is in keeping with
93  * INCL4.6, but doesn't seem to make much sense to me (DM), as energy
94  * conservation can be impossible to satisfy due to weird local-energy
95  * conditions, for example, that evolve with time.}
96  */
97  fs->addModifiedParticle(particle1);
98 
99  } else { // Forced decay
100  created = fs->getCreatedParticles();
101  modified = fs->getModifiedParticles();
102 
103  // Try to enforce energy conservation
104  fs->setTotalEnergyBeforeInteraction(oldTotalEnergy);
105  const G4bool success = enforceEnergyConservation(fs);
106  if(!success) {
107  INCL_DEBUG("Enforcing energy conservation: failed!" << '\n');
108 
109  if(theNucleus) {
110  // Restore the state of the initial particles
112 
113  // Delete newly created particles
114  for(ParticleIter i=created.begin(), e=created.end(); i!=e; ++i )
115  delete *i;
116 
117  fs->reset();
118  fs->makeNoEnergyConservation();
119  fs->setTotalEnergyBeforeInteraction(0.0);
120 
121  return; // Interaction is blocked. Return an empty final state.
122  } else {
123  // If there is no nucleus we have to continue anyway, even if energy
124  // conservation failed. We cannot afford producing unphysical
125  // remnants.
126  INCL_DEBUG("No nucleus, continuing anyway." << '\n');
127  }
128  } else {
129  INCL_DEBUG("Enforcing energy conservation: success!" << '\n');
130  }
131 
132  if(theNucleus) {
133  // Test CDPP blocking
135 
136  if(isCDPPBlocked) {
137  INCL_DEBUG("CDPP: Blocked!" << '\n');
138 
139  // Restore the state of both particles
141 
142  // Delete newly created particles
143  for(ParticleIter i=created.begin(), e=created.end(); i!=e; ++i )
144  delete *i;
145 
146  fs->reset();
147  fs->makePauliBlocked();
148  fs->setTotalEnergyBeforeInteraction(0.0);
149 
150  return; // Interaction is blocked. Return an empty final state.
151  }
152  INCL_DEBUG("CDPP: Allowed!" << '\n');
153 
154  }
155  }
156 
157  // If there is a nucleus, increment the counters
158  if(theNucleus) {
159  switch(fs->getValidity()) {
160  case PauliBlockedFS:
162  break;
165  case ParticleBelowZeroFS:
166  break;
167  case ValidFS:
169  }
170  }
171  return;
172  }
void incrementBlockedDecays()
Definition: G4INCLBook.hh:75
G4bool isCDPPBlocked(ParticleList const &p, Nucleus const *const n)
Check CDPP blocking.
Store * getStore() const
Book & getBook()
Definition: G4INCLStore.hh:259
bool G4bool
Definition: G4Types.hh:79
void incrementAcceptedDecays()
Definition: G4INCLBook.hh:74
G4bool enforceEnergyConservation(FinalState *const fs)
Enforce energy conservation.
void restoreParticles() const
Restore the state of both particles.
#define INCL_DEBUG(x)
ParticleList::const_iterator ParticleIter

Here is the call graph for this function:

void G4INCL::DecayAvatar::preInteraction ( )
virtual

Implements G4INCL::IAvatar.

Definition at line 73 of file G4INCLDecayAvatar.cc.

Here is the call graph for this function:


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