Geant4-11
|
#include <G4INCLInteractionAvatar.hh>
Data Structures | |
class | ViolationEEnergyFunctor |
RootFunctor-derived object for enforcing energy conservation in delta production. More... | |
class | ViolationEMomentumFunctor |
RootFunctor-derived object for enforcing energy conservation in N-N. More... | |
Public Member Functions | |
virtual std::string | dump () const =0 |
void | fillFinalState (FinalState *fs) |
FinalState * | getFinalState () |
long | getID () const |
virtual ParticleList | getParticles () const =0 |
G4double | getTime () const |
AvatarType | getType () const |
InteractionAvatar (G4double, G4INCL::Nucleus *, G4INCL::Particle *) | |
InteractionAvatar (G4double, G4INCL::Nucleus *, G4INCL::Particle *, G4INCL::Particle *) | |
G4bool | isACollision () const |
G4bool | isADecay () const |
void | setType (AvatarType t) |
std::string | toString () |
virtual | ~InteractionAvatar () |
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... | |
virtual G4INCL::IChannel * | getChannel ()=0 |
void | postInteraction (FinalState *) |
void | preInteraction () |
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... | |
Static Protected Attributes | |
static G4ThreadLocal Particle * | backupParticle1 = NULL |
static G4ThreadLocal Particle * | backupParticle2 = NULL |
Private Attributes | |
long | ID |
AvatarType | type |
RootFunctor * | violationEFunctor |
Static Private Attributes | |
static G4ThreadLocal long | nextID = 1 |
Definition at line 61 of file G4INCLInteractionAvatar.hh.
G4INCL::InteractionAvatar::InteractionAvatar | ( | G4double | time, |
G4INCL::Nucleus * | n, | ||
G4INCL::Particle * | p1 | ||
) |
Definition at line 65 of file G4INCLInteractionAvatar.cc.
G4INCL::InteractionAvatar::InteractionAvatar | ( | G4double | time, |
G4INCL::Nucleus * | n, | ||
G4INCL::Particle * | p1, | ||
G4INCL::Particle * | p2 | ||
) |
Definition at line 74 of file G4INCLInteractionAvatar.cc.
|
virtual |
Definition at line 84 of file G4INCLInteractionAvatar.cc.
Definition at line 137 of file G4INCLInteractionAvatar.cc.
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 theNucleus.
Referenced by postInteraction().
|
static |
Release the memory allocated for the backup particles.
Definition at line 87 of file G4INCLInteractionAvatar.cc.
References backupParticle1, and backupParticle2.
Referenced by G4INCL::INCL::~INCL().
|
pure virtualinherited |
Implemented in G4INCL::BinaryCollisionAvatar, G4INCL::DecayAvatar, G4INCL::ParticleEntryAvatar, and G4INCL::SurfaceAvatar.
Referenced by G4INCL::CascadeAction::beforeAvatarDefaultAction().
|
protected |
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.
Definition at line 359 of file G4INCLInteractionAvatar.cc.
References boostVector, G4INCL::Store::getBook(), G4INCL::Particle::getMass(), G4INCL::Nucleus::getStore(), G4INCL::FinalState::getTotalEnergyBeforeInteraction(), INCL_DEBUG, G4INCL::Book::incrementEnergyViolationInteraction(), G4INCL::ParticleTable::minDeltaMass, modified, modifiedAndCreated, shouldUseLocalEnergy(), G4INCL::RootFinder::solve(), G4INCL::RootFinder::Solution::success, theNucleus, violationEFunctor, and G4INCL::RootFinder::Solution::x.
Referenced by postInteraction(), and G4INCL::DecayAvatar::postInteraction().
|
inherited |
Definition at line 96 of file G4INCLIAvatar.cc.
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().
|
protectedpure virtual |
Implements G4INCL::IAvatar.
Implemented in G4INCL::BinaryCollisionAvatar, and G4INCL::DecayAvatar.
|
inherited |
Definition at line 90 of file G4INCLIAvatar.cc.
References G4INCL::IAvatar::fillFinalState().
Referenced by G4INCL::INCL::makeCompoundNucleus().
|
inlineinherited |
Definition at line 94 of file G4INCLIAvatar.hh.
Referenced by G4INCL::CascadeAction::afterAvatarDefaultAction(), G4INCL::CascadeAction::beforeAvatarDefaultAction(), and G4INCL::IAvatar::toString().
|
pure virtualinherited |
|
inlineinherited |
Definition at line 84 of file G4INCLIAvatar.hh.
Referenced by G4INCL::AvatarDumpAction::afterAvatarUserAction(), G4INCL::Store::avatarComparisonPredicate(), G4INCL::StandardPropagationModel::propagate(), and G4INCL::IAvatar::toString().
|
inlineinherited |
Definition at line 90 of file G4INCLIAvatar.hh.
Referenced by G4INCL::AvatarDumpAction::afterAvatarUserAction(), G4INCL::CascadeAction::beforeAvatarDefaultAction(), shouldUseLocalEnergy(), and G4INCL::IAvatar::toString().
|
inlineinherited |
Definition at line 91 of file G4INCLIAvatar.hh.
References G4INCL::CollisionAvatarType.
Referenced by G4INCL::CascadeAction::afterAvatarDefaultAction().
|
inlineinherited |
Definition at line 92 of file G4INCLIAvatar.hh.
References G4INCL::DecayAvatarType.
Referenced by G4INCL::CascadeAction::afterAvatarDefaultAction().
|
protectedvirtual |
Implements G4INCL::IAvatar.
Definition at line 166 of file G4INCLInteractionAvatar.cc.
References G4INCL::FinalState::addOutgoingParticle(), G4INCL::ParticleList::boost(), boostVector, bringParticleInside(), created, G4INCL::Book::decrementCascading(), Destroyed, enforceEnergyConservation(), G4INCL::Particle::FillINCLBiasVector(), G4INCL::Config::getBackToSpectator(), G4INCL::Store::getBook(), G4INCL::Store::getConfig(), G4INCL::FinalState::getCreatedParticles(), G4INCL::FinalState::getDestroyedParticles(), G4INCL::FinalState::getModifiedParticles(), G4INCL::ParticleList::getParticleListBiasVector(), G4INCL::Random::getSeeds(), G4INCL::Nucleus::getStore(), G4INCL::Nucleus::getSurfaceRadius(), G4INCL::Nucleus::getTransmissionBarrier(), INCL_DEBUG, INCL_ERROR, G4INCL::Book::incrementCascading(), G4INCL::Pauli::isBlocked(), G4INCL::Pauli::isCDPPBlocked(), G4INCL::FinalState::makeNoEnergyConservation(), G4INCL::FinalState::makePauliBlocked(), G4INCL::ParticleTable::minDeltaMass, modified, modifiedAndCreated, ModifiedAndDestroyed, G4INCL::Particle::nextBiasedCollisionID, oldTotalEnergy, G4INCL::FinalState::print(), G4INCL::Proton, G4INCL::FinalState::reset(), restoreParticles(), G4INCL::FinalState::setTotalEnergyBeforeInteraction(), theNucleus, G4INCL::Math::twoThirds, and weight.
Referenced by G4INCL::BinaryCollisionAvatar::postInteraction(), and G4INCL::DecayAvatar::postInteraction().
|
protectedvirtual |
Implements G4INCL::IAvatar.
Definition at line 122 of file G4INCLInteractionAvatar.cc.
References G4INCL::Particle::boost(), boostVector, G4INCL::Particle::getEnergy(), G4INCL::Particle::getMomentum(), G4INCL::KinematicsUtils::makeBoostVector(), particle1, particle2, preInteractionBlocking(), and preInteractionLocalEnergy().
Referenced by G4INCL::BinaryCollisionAvatar::preInteraction(), and G4INCL::DecayAvatar::preInteraction().
|
protected |
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.
References backupParticle1, backupParticle2, G4INCL::Particle::getEnergy(), G4INCL::Particle::getPotentialEnergy(), oldTotalEnergy, oldXSec, particle1, particle2, and G4INCL::CrossSections::total().
Referenced by preInteraction().
|
protected |
Apply local-energy transformation, if appropriate.
p | particle to apply the transformation to |
Definition at line 115 of file G4INCLInteractionAvatar.cc.
References G4INCL::Particle::isMeson(), shouldUseLocalEnergy(), theNucleus, and G4INCL::KinematicsUtils::transformToLocalEnergyFrame().
Referenced by preInteraction().
|
protected |
Restore the state of both particles.
The state must first be stored by calling preInteractionBlocking().
Definition at line 340 of file G4INCLInteractionAvatar.cc.
References particle2.
Referenced by G4INCL::BinaryCollisionAvatar::getChannel(), postInteraction(), and G4INCL::DecayAvatar::postInteraction().
|
inlineinherited |
Definition at line 93 of file G4INCLIAvatar.hh.
Referenced by G4INCL::BinaryCollisionAvatar::BinaryCollisionAvatar(), G4INCL::DecayAvatar::DecayAvatar(), G4INCL::ParticleEntryAvatar::ParticleEntryAvatar(), and G4INCL::SurfaceAvatar::SurfaceAvatar().
|
protected |
true if the given avatar should use local energy
Definition at line 346 of file G4INCLInteractionAvatar.cc.
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(), isPiN, and theNucleus.
Referenced by enforceEnergyConservation(), preInteractionLocalEnergy(), G4INCL::InteractionAvatar::ViolationEMomentumFunctor::scaleParticleMomenta(), and G4INCL::InteractionAvatar::ViolationEEnergyFunctor::setParticleEnergy().
|
inherited |
Definition at line 73 of file G4INCLIAvatar.cc.
References G4INCL::IAvatar::getID(), G4INCL::IAvatar::getParticles(), G4INCL::IAvatar::getTime(), G4INCL::IAvatar::getType(), and numberOfParticles.
|
staticprotected |
Definition at line 108 of file G4INCLInteractionAvatar.hh.
Referenced by deleteBackupParticles(), G4INCL::BinaryCollisionAvatar::postInteraction(), and preInteractionBlocking().
|
staticprotected |
Definition at line 108 of file G4INCLInteractionAvatar.hh.
Referenced by deleteBackupParticles(), G4INCL::BinaryCollisionAvatar::postInteraction(), and preInteractionBlocking().
|
protected |
Definition at line 109 of file G4INCLInteractionAvatar.hh.
Referenced by enforceEnergyConservation(), G4INCL::BinaryCollisionAvatar::getChannel(), postInteraction(), preInteraction(), and G4INCL::InteractionAvatar::ViolationEMomentumFunctor::scaleParticleMomenta().
|
protected |
Definition at line 223 of file G4INCLInteractionAvatar.hh.
Referenced by postInteraction(), and G4INCL::DecayAvatar::postInteraction().
|
protected |
Definition at line 223 of file G4INCLInteractionAvatar.hh.
Referenced by postInteraction(), and G4INCL::DecayAvatar::postInteraction().
|
privateinherited |
Definition at line 98 of file G4INCLIAvatar.hh.
Referenced by G4INCL::IAvatar::IAvatar().
|
protected |
Definition at line 111 of file G4INCLInteractionAvatar.hh.
Referenced by G4INCL::BinaryCollisionAvatar::getChannel(), and shouldUseLocalEnergy().
|
static |
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().
|
static |
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().
|
protected |
Definition at line 223 of file G4INCLInteractionAvatar.hh.
Referenced by enforceEnergyConservation(), postInteraction(), and G4INCL::DecayAvatar::postInteraction().
|
protected |
Definition at line 223 of file G4INCLInteractionAvatar.hh.
Referenced by enforceEnergyConservation(), postInteraction(), and G4INCL::DecayAvatar::postInteraction().
|
protected |
Definition at line 223 of file G4INCLInteractionAvatar.hh.
Referenced by postInteraction(), and G4INCL::DecayAvatar::postInteraction().
|
staticprivateinherited |
Definition at line 100 of file G4INCLIAvatar.hh.
Referenced by G4INCL::IAvatar::IAvatar().
|
protected |
Definition at line 110 of file G4INCLInteractionAvatar.hh.
Referenced by postInteraction(), G4INCL::DecayAvatar::postInteraction(), and preInteractionBlocking().
|
protected |
Definition at line 110 of file G4INCLInteractionAvatar.hh.
Referenced by G4INCL::BinaryCollisionAvatar::postInteraction(), and preInteractionBlocking().
|
protected |
Definition at line 107 of file G4INCLInteractionAvatar.hh.
Referenced by G4INCL::BinaryCollisionAvatar::dump(), G4INCL::DecayAvatar::dump(), G4INCL::BinaryCollisionAvatar::getChannel(), G4INCL::DecayAvatar::getChannel(), G4INCL::BinaryCollisionAvatar::getParticles(), G4INCL::DecayAvatar::getParticles(), G4INCL::DecayAvatar::postInteraction(), G4INCL::BinaryCollisionAvatar::preInteraction(), preInteraction(), and preInteractionBlocking().
|
protected |
Definition at line 107 of file G4INCLInteractionAvatar.hh.
Referenced by G4INCL::BinaryCollisionAvatar::dump(), G4INCL::BinaryCollisionAvatar::getChannel(), G4INCL::DecayAvatar::getChannel(), G4INCL::BinaryCollisionAvatar::getParticles(), G4INCL::BinaryCollisionAvatar::preInteraction(), preInteraction(), preInteractionBlocking(), and restoreParticles().
|
protected |
Definition at line 106 of file G4INCLInteractionAvatar.hh.
Referenced by bringParticleInside(), enforceEnergyConservation(), G4INCL::BinaryCollisionAvatar::getChannel(), G4INCL::BinaryCollisionAvatar::postInteraction(), postInteraction(), G4INCL::DecayAvatar::postInteraction(), preInteractionLocalEnergy(), G4INCL::InteractionAvatar::ViolationEMomentumFunctor::scaleParticleMomenta(), G4INCL::InteractionAvatar::ViolationEEnergyFunctor::setParticleEnergy(), and shouldUseLocalEnergy().
|
protectedinherited |
Definition at line 102 of file G4INCLIAvatar.hh.
Referenced by G4INCL::BinaryCollisionAvatar::dump(), G4INCL::DecayAvatar::dump(), G4INCL::ParticleEntryAvatar::dump(), and G4INCL::SurfaceAvatar::dump().
|
privateinherited |
Definition at line 99 of file G4INCLIAvatar.hh.
|
private |
Definition at line 208 of file G4INCLInteractionAvatar.hh.
Referenced by enforceEnergyConservation().
|
protected |
Definition at line 112 of file G4INCLInteractionAvatar.hh.
Referenced by G4INCL::BinaryCollisionAvatar::getChannel(), and postInteraction().