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

#include <G4INCLDecayAvatar.hh>

+ Inheritance diagram for G4INCL::DecayAvatar:

Public Member Functions

 DecayAvatar (G4INCL::Particle *aParticle, G4double time, G4INCL::Nucleus *aNucleus, G4bool force=false)
 
virtual ~DecayAvatar ()
 
G4INCL::IChannelgetChannel () const
 
G4INCL::FinalStategetFinalState () const
 
virtual void preInteraction ()
 
virtual FinalStatepostInteraction (FinalState *)
 
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 ()
 
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 ()
 

Additional Inherited Members

- 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.
 
static const G4int maxIterLocE = 50
 Max number of iterations for the determination of the local-energy Q-value.
 
- Protected Member Functions inherited from G4INCL::InteractionAvatar
virtual G4INCL::IChannelgetChannel () const =0
 
G4bool bringParticleInside (Particle *const p)
 
void preInteractionLocalEnergy (Particle *const p)
 Apply local-energy transformation, if appropriate.
 
void preInteractionBlocking ()
 Store the state of the particles before the interaction.
 
void preInteraction ()
 
FinalStatepostInteraction (FinalState *)
 
void restoreParticles () const
 Restore the state of both particles.
 
G4bool shouldUseLocalEnergy () const
 true if the given avatar should use local energy
 
G4bool enforceEnergyConservation (FinalState *const fs)
 Enforce energy conservation.
 
- Protected Attributes inherited from G4INCL::InteractionAvatar
G4INCL::NucleustheNucleus
 
G4INCL::Particleparticle1
 
G4INCL::Particleparticle2
 
ThreeVector boostVector
 
ParticleType oldParticle1Type
 
ParticleType oldParticle2Type
 
G4double oldParticle1Energy
 
G4double oldParticle2Energy
 
G4double oldTotalEnergy
 
G4double oldXSec
 
G4double oldParticle1Potential
 
G4double oldParticle2Potential
 
G4double oldParticle1Mass
 
G4double oldParticle2Mass
 
G4double oldParticle1Helicity
 
G4double oldParticle2Helicity
 
ThreeVector oldParticle1Momentum
 
ThreeVector oldParticle2Momentum
 
ThreeVector oldParticle1Position
 
ThreeVector oldParticle2Position
 
G4bool isPiN
 
- Protected Attributes inherited from G4INCL::IAvatar
G4double theTime
 

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

◆ DecayAvatar()

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 }
void setType(AvatarType t)
InteractionAvatar(G4double, G4INCL::Nucleus *, G4INCL::Particle *)
const G4INCL::ThreeVector & getMomentum() const
@ DecayAvatarType

◆ ~DecayAvatar()

G4INCL::DecayAvatar::~DecayAvatar ( )
virtual

Definition at line 56 of file G4INCLDecayAvatar.cc.

56 {
57
58 }

Member Function Documentation

◆ dump()

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

Implements G4INCL::IAvatar.

Definition at line 186 of file G4INCLDecayAvatar.cc.

186 {
187 std::stringstream ss;
188 ss << "(avatar " << theTime << " 'decay" << std::endl
189 << "(list " << std::endl
190 << particle1->dump()
191 << "))" << std::endl;
192 return ss.str();
193 }
std::string dump() const

◆ getChannel()

G4INCL::IChannel * G4INCL::DecayAvatar::getChannel ( ) const
virtual

Implements G4INCL::InteractionAvatar.

Definition at line 60 of file G4INCLDecayAvatar.cc.

61 {
62 if(particle1->isDelta()) {
63 DEBUG("DeltaDecayChannel chosen." << std::endl);
64 return new DeltaDecayChannel(theNucleus, particle1, incidentDirection);
65 }
66 else
67 return NULL;
68 }
#define DEBUG(x)
G4bool isDelta() const
Is it a Delta?

◆ getFinalState()

G4INCL::FinalState * G4INCL::DecayAvatar::getFinalState ( ) const

◆ getParticles()

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 }
std::list< G4INCL::Particle * > ParticleList

◆ postInteraction()

FinalState * G4INCL::DecayAvatar::postInteraction ( FinalState fs)
virtual

Implements G4INCL::IAvatar.

Definition at line 74 of file G4INCLDecayAvatar.cc.

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

◆ preInteraction()

void G4INCL::DecayAvatar::preInteraction ( )
virtual

Implements G4INCL::IAvatar.

Definition at line 70 of file G4INCLDecayAvatar.cc.


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