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

#include <G4INCLDecayAvatar.hh>

Inheritance diagram for G4INCL::DecayAvatar:
G4INCL::InteractionAvatar G4INCL::IAvatar

Public Member Functions

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

Static Public Member Functions

static void deleteBackupParticles ()
 Release the memory allocated for the backup particles. More...
 

Static Public Attributes

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

G4bool bringParticleInside (Particle *const p)
 
G4bool enforceEnergyConservation (FinalState *const fs)
 Enforce energy conservation. More...
 
void preInteractionBlocking ()
 Store the state of the particles before the interaction. More...
 
void preInteractionLocalEnergy (Particle *const p)
 Apply local-energy transformation, if appropriate. More...
 
void restoreParticles () const
 Restore the state of both particles. More...
 
G4bool shouldUseLocalEnergy () const
 true if the given avatar should use local energy More...
 

Protected Attributes

ThreeVector boostVector
 
ParticleList created
 
ParticleList Destroyed
 
G4bool isPiN
 
ParticleList modified
 
ParticleList modifiedAndCreated
 
ParticleList ModifiedAndDestroyed
 
G4double oldTotalEnergy
 
G4double oldXSec
 
Particleparticle1
 
Particleparticle2
 
NucleustheNucleus
 
G4double theTime
 
G4double weight
 

Static Protected Attributes

static G4ThreadLocal ParticlebackupParticle1 = NULL
 
static G4ThreadLocal ParticlebackupParticle2 = NULL
 

Private Attributes

G4bool forced
 
long ID
 
ThreeVector const incidentDirection
 
AvatarType type
 
RootFunctorviolationEFunctor
 

Static Private Attributes

static G4ThreadLocal long nextID = 1
 

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() [1/2]

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

Definition at line 52 of file G4INCLDecayAvatar.cc.

53 : InteractionAvatar(time, n, aParticle), forced(force),
54 incidentDirection(aParticle->getMomentum())
55 {
57 }
ThreeVector const incidentDirection
void setType(AvatarType t)
InteractionAvatar(G4double, G4INCL::Nucleus *, G4INCL::Particle *)
const G4INCL::ThreeVector & getMomentum() const
@ DecayAvatarType

References G4INCL::DecayAvatarType, and G4INCL::IAvatar::setType().

◆ DecayAvatar() [2/2]

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

Definition at line 59 of file G4INCLDecayAvatar.cc.

60 : InteractionAvatar(time, n, aParticle, bParticle), forced(force),
61 incidentDirection(aParticle->getMomentum())
62 {
64 }

References G4INCL::DecayAvatarType, and G4INCL::IAvatar::setType().

◆ ~DecayAvatar()

G4INCL::DecayAvatar::~DecayAvatar ( )
virtual

Definition at line 66 of file G4INCLDecayAvatar.cc.

66 {
67
68 }

Member Function Documentation

◆ bringParticleInside()

G4bool G4INCL::InteractionAvatar::bringParticleInside ( Particle *const  p)
protectedinherited

Definition at line 137 of file G4INCLInteractionAvatar.cc.

137 {
138 if(!theNucleus)
139 return false;
140
141 ThreeVector pos = p->getPosition();
142 p->rpCorrelate();
143 G4double pos2 = pos.mag2();
145 short iterations=0;
146 const short maxIterations=50;
147
148 if(pos2 < r*r) return true;
149
150 while( pos2 >= r*r && iterations<maxIterations ) /* Loop checking, 10.07.2015, D.Mancusi */
151 {
152 pos *= std::sqrt(r*r*0.9801/pos2); // 0.9801 == 0.99*0.99
153 pos2 = pos.mag2();
154 iterations++;
155 }
156 if( iterations < maxIterations)
157 {
158 INCL_DEBUG("Particle position vector length was : " << p->getPosition().mag() << ", rescaled to: " << pos.mag() << '\n');
159 p->setPosition(pos);
160 return true;
161 }
162 else
163 return false;
164 }
static const G4double pos
#define INCL_DEBUG(x)
double G4double
Definition: G4Types.hh:83
G4double getSurfaceRadius(Particle const *const particle) const
Get the maximum allowed radius for a given particle.
const G4int maxIterations
Maximum number of iterations for convergence.

References G4INCL::Particle::getPosition(), G4INCL::Nucleus::getSurfaceRadius(), INCL_DEBUG, G4INCL::ThreeVector::mag(), G4INCL::RootFinder::anonymous_namespace{G4INCLRootFinder.cc}::maxIterations, pos, G4INCL::Particle::rpCorrelate(), G4INCL::Particle::setPosition(), and G4INCL::InteractionAvatar::theNucleus.

Referenced by G4INCL::InteractionAvatar::postInteraction().

◆ deleteBackupParticles()

void G4INCL::InteractionAvatar::deleteBackupParticles ( )
staticinherited

Release the memory allocated for the backup particles.

Definition at line 87 of file G4INCLInteractionAvatar.cc.

87 {
88 delete backupParticle1;
90 delete backupParticle2;
91 backupParticle1 = NULL;
92 backupParticle2 = NULL;
93 }
static G4ThreadLocal Particle * backupParticle2
static G4ThreadLocal Particle * backupParticle1

References G4INCL::InteractionAvatar::backupParticle1, and G4INCL::InteractionAvatar::backupParticle2.

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

◆ dump()

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

Implements G4INCL::IAvatar.

Definition at line 207 of file G4INCLDecayAvatar.cc.

207 {
208 std::stringstream ss;
209 ss << "(avatar " << theTime << " 'decay" << '\n'
210 << "(list " << '\n'
211 << particle1->dump()
212 << "))" << '\n';
213 return ss.str();
214 }
std::string dump() const

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

◆ enforceEnergyConservation()

G4bool G4INCL::InteractionAvatar::enforceEnergyConservation ( FinalState *const  fs)
protectedinherited

Enforce energy conservation.

Final states generated by the channels might violate energy conservation because of different reasons (energy-dependent potentials, local energy...). This conservation law must therefore be enforced by hand. We do so by rescaling the momenta of the final-state particles in the CM frame. If this turns out to be impossible, this method returns false.

Returns
true if the algorithm succeeded

Definition at line 359 of file G4INCLInteractionAvatar.cc.

359 {
360 // Set up the violationE calculation
361 const G4bool manyBodyFinalState = (modifiedAndCreated.size() > 1);
362
363 if(manyBodyFinalState)
364 violationEFunctor = new ViolationEMomentumFunctor(theNucleus, modifiedAndCreated, fs->getTotalEnergyBeforeInteraction(), boostVector, shouldUseLocalEnergy());
365 else {
366 Particle * const p = modified.front();
367 // The following condition is necessary for the functor to work
368 // correctly. A similar condition exists in INCL4.6.
369 if(p->getMass() < ParticleTable::minDeltaMass)
370 return false;
371 violationEFunctor = new ViolationEEnergyFunctor(theNucleus, p, fs->getTotalEnergyBeforeInteraction(), shouldUseLocalEnergy());
372 }
373
374 // Apply the root-finding algorithm
375 const RootFinder::Solution theSolution = RootFinder::solve(violationEFunctor, 1.0);
376 if(theSolution.success) { // Apply the solution
377 (*violationEFunctor)(theSolution.x);
378 } else if(theNucleus){
379 INCL_DEBUG("Couldn't enforce energy conservation after an interaction, root-finding algorithm failed." << '\n');
381 }
382 delete violationEFunctor;
383 violationEFunctor = NULL;
384 return theSolution.success;
385 }
bool G4bool
Definition: G4Types.hh:86
void incrementEnergyViolationInteraction()
Definition: G4INCLBook.hh:80
G4bool shouldUseLocalEnergy() const
true if the given avatar should use local energy
Store * getStore() const
Book & getBook()
Definition: G4INCLStore.hh:259
G4ThreadLocal G4double minDeltaMass
Solution solve(RootFunctor const *const f, const G4double x0)
Numerically solve a one-dimensional equation.

References G4INCL::InteractionAvatar::boostVector, G4INCL::Store::getBook(), G4INCL::Particle::getMass(), G4INCL::Nucleus::getStore(), G4INCL::FinalState::getTotalEnergyBeforeInteraction(), INCL_DEBUG, G4INCL::Book::incrementEnergyViolationInteraction(), G4INCL::ParticleTable::minDeltaMass, G4INCL::InteractionAvatar::modified, G4INCL::InteractionAvatar::modifiedAndCreated, G4INCL::InteractionAvatar::shouldUseLocalEnergy(), G4INCL::RootFinder::solve(), G4INCL::RootFinder::Solution::success, G4INCL::InteractionAvatar::theNucleus, G4INCL::InteractionAvatar::violationEFunctor, and G4INCL::RootFinder::Solution::x.

Referenced by G4INCL::InteractionAvatar::postInteraction(), and postInteraction().

◆ fillFinalState()

void G4INCL::DecayAvatar::fillFinalState ( FinalState fs)

◆ getChannel()

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

Implements G4INCL::InteractionAvatar.

Definition at line 70 of file G4INCLDecayAvatar.cc.

70 {
71 if(!particle2){
72 if(particle1->isDelta()) {
73 INCL_DEBUG("DeltaDecayChannel chosen." << '\n');
74 return new DeltaDecayChannel(particle1, incidentDirection);
75 }
76 else if(particle1->isEta() || particle1->isOmega()) {
77 INCL_DEBUG("PionResonanceDecayChannel chosen." << '\n');
78 return new PionResonanceDecayChannel(particle1, incidentDirection);
79 }
80 else if(particle1->getType() == SigmaZero) {
81 INCL_DEBUG("SigmaZeroDecayChannel chosen." << '\n');
82 return new SigmaZeroDecayChannel(particle1, incidentDirection);
83 }
84 else if(particle1->getType() == KZero || particle1->getType() == KZeroBar) {
85 INCL_DEBUG("NeutralKaonDecayChannel chosen." << '\n');
86 return new NeutralKaonDecayChannel(particle1);
87 }
88 }
90 INCL_DEBUG("StrangeAbsorbtion." << '\n');
91 return new StrangeAbsorbtionChannel(particle1, particle2);
92 }
93 return NULL;
94 }
G4bool isOmega() const
Is this an omega?
G4bool isSigma() const
Is this a Sigma?
G4bool isEta() const
Is this an eta?
G4bool isAntiKaon() const
Is this an antiKaon?
G4INCL::ParticleType getType() const
G4bool isDelta() const
Is it a Delta?
G4bool isNucleon() const

References G4INCL::Particle::getType(), incidentDirection, INCL_DEBUG, G4INCL::Particle::isAntiKaon(), G4INCL::Particle::isDelta(), G4INCL::Particle::isEta(), G4INCL::Particle::isNucleon(), G4INCL::Particle::isOmega(), G4INCL::Particle::isSigma(), G4INCL::KZero, G4INCL::KZeroBar, G4INCL::InteractionAvatar::particle1, G4INCL::InteractionAvatar::particle2, and G4INCL::SigmaZero.

◆ 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::DecayAvatar::getParticles ( ) const
inlinevirtual

Implements G4INCL::IAvatar.

Definition at line 67 of file G4INCLDecayAvatar.hh.

67 {
68 ParticleList theParticleList;
69 theParticleList.push_back(particle1);
70 return theParticleList;
71 }

References G4INCL::InteractionAvatar::particle1.

◆ 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); };

References G4INCL::DecayAvatarType.

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

◆ postInteraction()

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

Implements G4INCL::IAvatar.

Definition at line 100 of file G4INCLDecayAvatar.cc.

100 {
101 // Make sure we have at least two particles in the final state
102 // Removed because of neutral kaon decay
103
104// assert((fs->getModifiedParticles().size() + fs->getCreatedParticles().size() - fs->getDestroyedParticles().size() >= 2) || ((*fs->getModifiedParticles().begin())->getType() == KShort || (*fs->getModifiedParticles().begin())->getType() == KLong ));
105 //assert((fs->getModifiedParticles().size() + fs->getCreatedParticles().size() - fs->getDestroyedParticles().size() >= 1));
106 if(!forced) { // Normal decay
107 // Call the postInteraction method of the parent class
108 // (provides Pauli blocking and enforces energy conservation)
110
111 if(fs->getValidity() == PauliBlockedFS)
112 /* If the decay was Pauli-blocked, make sure the propagation model
113 * generates a new decay avatar on the next call to propagate().
114 *
115 * \bug{Note that we don't generate new decay avatars for deltas that
116 * could not satisfy energy conservation. This is in keeping with
117 * INCL4.6, but doesn't seem to make much sense to me (DM), as energy
118 * conservation can be impossible to satisfy due to weird local-energy
119 * conditions, for example, that evolve with time.}
120 */
121 fs->addModifiedParticle(particle1);
122 } else { // Forced decay
123 modified = fs->getModifiedParticles();
124 created = fs->getCreatedParticles();
125 Destroyed = fs->getDestroyedParticles();
127 modifiedAndCreated.insert(modifiedAndCreated.end(), created.begin(), created.end());
129 ModifiedAndDestroyed.insert(ModifiedAndDestroyed.end(), Destroyed.begin(), Destroyed.end());
130
131 std::vector<G4int> newBiasCollisionVector;
132 newBiasCollisionVector = ModifiedAndDestroyed.getParticleListBiasVector();
133 for(ParticleIter i=modifiedAndCreated.begin(), e=modifiedAndCreated.end(); i!=e; ++i ) {
134 (*i)->setBiasCollisionVector(newBiasCollisionVector);
135 }
136 // Try to enforce energy conservation
137 fs->setTotalEnergyBeforeInteraction(oldTotalEnergy);
138 const G4bool success = enforceEnergyConservation(fs);
139 if(!success) {
140 INCL_DEBUG("Enforcing energy conservation: failed!" << '\n');
141
142 if(theNucleus) {
143 // Restore the state of the initial particles
145
146 // Delete newly created particles
147 for(ParticleIter i=created.begin(), e=created.end(); i!=e; ++i )
148 delete *i;
149
150 fs->reset();
151 fs->makeNoEnergyConservation();
152 fs->setTotalEnergyBeforeInteraction(0.0);
153
154 return; // Interaction is blocked. Return an empty final state.
155 } else {
156 // If there is no nucleus we have to continue anyway, even if energy
157 // conservation failed. We cannot afford producing unphysical
158 // remnants.
159 INCL_DEBUG("No nucleus, continuing anyway." << '\n');
160 }
161 } else {
162 INCL_DEBUG("Enforcing energy conservation: success!" << '\n');
163 }
164
165 if(theNucleus) {
166 // Test CDPP blocking
168
169 if(isCDPPBlocked) {
170 INCL_DEBUG("CDPP: Blocked!" << '\n');
171
172 // Restore the state of both particles
174
175 // Delete newly created particles
176 for(ParticleIter i=created.begin(), e=created.end(); i!=e; ++i )
177 delete *i;
178
179 fs->reset();
180 fs->makePauliBlocked();
181 fs->setTotalEnergyBeforeInteraction(0.0);
182
183 return; // Interaction is blocked. Return an empty final state.
184 }
185 INCL_DEBUG("CDPP: Allowed!" << '\n');
186
187 }
188 }
189 // If there is a nucleus, increment the counters
190 if(theNucleus) {
191 switch(fs->getValidity()) {
192 case PauliBlockedFS:
194 break;
198 break;
199 case ValidFS:
201 }
202 }
203
204 return;
205 }
void incrementAcceptedDecays()
Definition: G4INCLBook.hh:74
void incrementBlockedDecays()
Definition: G4INCLBook.hh:75
void restoreParticles() const
Restore the state of both particles.
G4bool enforceEnergyConservation(FinalState *const fs)
Enforce energy conservation.
std::vector< G4int > getParticleListBiasVector() const
G4bool isCDPPBlocked(ParticleList const &p, Nucleus const *const n)
Check CDPP blocking.
ParticleList::const_iterator ParticleIter
@ ParticleBelowZeroFS
@ NoEnergyConservationFS
@ ParticleBelowFermiFS

References G4INCL::FinalState::addModifiedParticle(), G4INCL::InteractionAvatar::created, G4INCL::InteractionAvatar::Destroyed, G4INCL::InteractionAvatar::enforceEnergyConservation(), forced, G4INCL::Store::getBook(), G4INCL::FinalState::getCreatedParticles(), G4INCL::FinalState::getDestroyedParticles(), G4INCL::FinalState::getModifiedParticles(), G4INCL::ParticleList::getParticleListBiasVector(), G4INCL::Nucleus::getStore(), G4INCL::FinalState::getValidity(), INCL_DEBUG, G4INCL::Book::incrementAcceptedDecays(), G4INCL::Book::incrementBlockedDecays(), G4INCL::Pauli::isCDPPBlocked(), G4INCL::FinalState::makeNoEnergyConservation(), G4INCL::FinalState::makePauliBlocked(), G4INCL::InteractionAvatar::modified, G4INCL::InteractionAvatar::modifiedAndCreated, G4INCL::InteractionAvatar::ModifiedAndDestroyed, G4INCL::NoEnergyConservationFS, G4INCL::InteractionAvatar::oldTotalEnergy, G4INCL::InteractionAvatar::particle1, G4INCL::ParticleBelowFermiFS, G4INCL::ParticleBelowZeroFS, G4INCL::PauliBlockedFS, G4INCL::InteractionAvatar::postInteraction(), G4INCL::FinalState::reset(), G4INCL::InteractionAvatar::restoreParticles(), G4INCL::FinalState::setTotalEnergyBeforeInteraction(), G4INCL::InteractionAvatar::theNucleus, and G4INCL::ValidFS.

◆ preInteraction()

void G4INCL::DecayAvatar::preInteraction ( )
virtual

◆ preInteractionBlocking()

void G4INCL::InteractionAvatar::preInteractionBlocking ( )
protectedinherited

Store the state of the particles before the interaction.

If the interaction cannot be realised for any reason, we will need to restore the particle state as it was before. This is done by calling the restoreParticles() method.

Definition at line 95 of file G4INCLInteractionAvatar.cc.

95 {
97 (*backupParticle1) = (*particle1);
98 else
99 backupParticle1 = new Particle(*particle1);
100
101 if(particle2) {
103 (*backupParticle2) = (*particle2);
104 else
105 backupParticle2 = new Particle(*particle2);
106
110 } else {
112 }
113 }
G4double getEnergy() const
G4double getPotentialEnergy() const
Get the particle potential energy.
G4double total(Particle const *const p1, Particle const *const p2)

References G4INCL::InteractionAvatar::backupParticle1, G4INCL::InteractionAvatar::backupParticle2, G4INCL::Particle::getEnergy(), G4INCL::Particle::getPotentialEnergy(), G4INCL::InteractionAvatar::oldTotalEnergy, G4INCL::InteractionAvatar::oldXSec, G4INCL::InteractionAvatar::particle1, G4INCL::InteractionAvatar::particle2, and G4INCL::CrossSections::total().

Referenced by G4INCL::InteractionAvatar::preInteraction().

◆ preInteractionLocalEnergy()

void G4INCL::InteractionAvatar::preInteractionLocalEnergy ( Particle *const  p)
protectedinherited

Apply local-energy transformation, if appropriate.

Parameters
pparticle to apply the transformation to

Definition at line 115 of file G4INCLInteractionAvatar.cc.

115 {
116 if(!theNucleus || p->isMeson()) return; // Local energy does not make any sense without a nucleus
117
120 }
G4bool isMeson() const
Is this a Meson?
void transformToLocalEnergyFrame(Nucleus const *const n, Particle *const p)

References G4INCL::Particle::isMeson(), G4INCL::InteractionAvatar::shouldUseLocalEnergy(), G4INCL::InteractionAvatar::theNucleus, and G4INCL::KinematicsUtils::transformToLocalEnergyFrame().

Referenced by G4INCL::InteractionAvatar::preInteraction().

◆ restoreParticles()

void G4INCL::InteractionAvatar::restoreParticles ( ) const
protectedinherited

Restore the state of both particles.

The state must first be stored by calling preInteractionBlocking().

Definition at line 340 of file G4INCLInteractionAvatar.cc.

340 {
341 (*particle1) = (*backupParticle1);
342 if(particle2)
343 (*particle2) = (*backupParticle2);
344 }

References G4INCL::InteractionAvatar::particle2.

Referenced by G4INCL::BinaryCollisionAvatar::getChannel(), G4INCL::InteractionAvatar::postInteraction(), and postInteraction().

◆ setType()

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

◆ shouldUseLocalEnergy()

G4bool G4INCL::InteractionAvatar::shouldUseLocalEnergy ( ) const
protectedinherited

true if the given avatar should use local energy

Definition at line 346 of file G4INCLInteractionAvatar.cc.

346 {
347 if(!theNucleus) return false;
348 LocalEnergyType theLocalEnergyType;
350 theLocalEnergyType = theNucleus->getStore()->getConfig()->getLocalEnergyPiType();
351 else
352 theLocalEnergyType = theNucleus->getStore()->getConfig()->getLocalEnergyBBType();
353
354 const G4bool firstAvatar = (theNucleus->getStore()->getBook().getAcceptedCollisions() == 0);
355 return ((theLocalEnergyType == FirstCollisionLocalEnergy && firstAvatar) ||
356 theLocalEnergyType == AlwaysLocalEnergy);
357 }
G4int getAcceptedCollisions() const
Definition: G4INCLBook.hh:100
LocalEnergyType getLocalEnergyPiType() const
Get the type of local energy for pi-N and decay avatars.
LocalEnergyType getLocalEnergyBBType() const
Get the type of local energy for N-N avatars.
AvatarType getType() const
Config const * getConfig()
Definition: G4INCLStore.hh:273
@ FirstCollisionLocalEnergy

References G4INCL::AlwaysLocalEnergy, G4INCL::DecayAvatarType, G4INCL::FirstCollisionLocalEnergy, G4INCL::Book::getAcceptedCollisions(), G4INCL::Store::getBook(), G4INCL::Store::getConfig(), G4INCL::Config::getLocalEnergyBBType(), G4INCL::Config::getLocalEnergyPiType(), G4INCL::Nucleus::getStore(), G4INCL::IAvatar::getType(), G4INCL::InteractionAvatar::isPiN, and G4INCL::InteractionAvatar::theNucleus.

Referenced by G4INCL::InteractionAvatar::enforceEnergyConservation(), G4INCL::InteractionAvatar::preInteractionLocalEnergy(), G4INCL::InteractionAvatar::ViolationEMomentumFunctor::scaleParticleMomenta(), and G4INCL::InteractionAvatar::ViolationEEnergyFunctor::setParticleEnergy().

◆ 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

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

Field Documentation

◆ backupParticle1

G4ThreadLocal Particle * G4INCL::InteractionAvatar::backupParticle1 = NULL
staticprotectedinherited

◆ backupParticle2

G4ThreadLocal Particle * G4INCL::InteractionAvatar::backupParticle2 = NULL
staticprotectedinherited

◆ boostVector

ThreeVector G4INCL::InteractionAvatar::boostVector
protectedinherited

◆ created

ParticleList G4INCL::InteractionAvatar::created
protectedinherited

◆ Destroyed

ParticleList G4INCL::InteractionAvatar::Destroyed
protectedinherited

◆ forced

G4bool G4INCL::DecayAvatar::forced
private

Definition at line 75 of file G4INCLDecayAvatar.hh.

Referenced by postInteraction().

◆ ID

long G4INCL::IAvatar::ID
privateinherited

Definition at line 98 of file G4INCLIAvatar.hh.

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

◆ incidentDirection

ThreeVector const G4INCL::DecayAvatar::incidentDirection
private

Definition at line 76 of file G4INCLDecayAvatar.hh.

Referenced by getChannel().

◆ isPiN

G4bool G4INCL::InteractionAvatar::isPiN
protectedinherited

◆ locEAccuracy

const G4double G4INCL::InteractionAvatar::locEAccuracy = 1.E-4
staticinherited

Target accuracy in the determination of the local-energy Q-value.

Definition at line 68 of file G4INCLInteractionAvatar.hh.

Referenced by G4INCL::InteractionAvatar::ViolationEMomentumFunctor::scaleParticleMomenta(), and G4INCL::InteractionAvatar::ViolationEEnergyFunctor::setParticleEnergy().

◆ maxIterLocE

const G4int G4INCL::InteractionAvatar::maxIterLocE = 50
staticinherited

Max number of iterations for the determination of the local-energy Q-value.

Definition at line 70 of file G4INCLInteractionAvatar.hh.

Referenced by G4INCL::InteractionAvatar::ViolationEMomentumFunctor::scaleParticleMomenta(), and G4INCL::InteractionAvatar::ViolationEEnergyFunctor::setParticleEnergy().

◆ modified

ParticleList G4INCL::InteractionAvatar::modified
protectedinherited

◆ modifiedAndCreated

ParticleList G4INCL::InteractionAvatar::modifiedAndCreated
protectedinherited

◆ ModifiedAndDestroyed

ParticleList G4INCL::InteractionAvatar::ModifiedAndDestroyed
protectedinherited

◆ nextID

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

Definition at line 100 of file G4INCLIAvatar.hh.

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

◆ oldTotalEnergy

G4double G4INCL::InteractionAvatar::oldTotalEnergy
protectedinherited

◆ oldXSec

G4double G4INCL::InteractionAvatar::oldXSec
protectedinherited

◆ particle1

Particle* G4INCL::InteractionAvatar::particle1
protectedinherited

◆ particle2

Particle * G4INCL::InteractionAvatar::particle2
protectedinherited

◆ theNucleus

Nucleus* G4INCL::InteractionAvatar::theNucleus
protectedinherited

◆ theTime

G4double G4INCL::IAvatar::theTime
protectedinherited

◆ type

AvatarType G4INCL::IAvatar::type
privateinherited

Definition at line 99 of file G4INCLIAvatar.hh.

◆ violationEFunctor

RootFunctor* G4INCL::InteractionAvatar::violationEFunctor
privateinherited

◆ weight

G4double G4INCL::InteractionAvatar::weight
protectedinherited

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