ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4INCL::InteractionAvatar Class Referenceabstract

#include <geant4/tree/geant4-10.6-release/source/processes/hadronic/models/inclxx/incl_physics/include/G4INCLInteractionAvatar.hh>

+ Inheritance diagram for G4INCL::InteractionAvatar:
+ Collaboration diagram for G4INCL::InteractionAvatar:

Classes

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

 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
 
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 ()
 

Static Public Member Functions

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

Static Public Attributes

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

virtual G4INCL::IChannelgetChannel ()=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 ()
 
void postInteraction (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

NucleustheNucleus
 
Particleparticle1
 
Particleparticle2
 
ThreeVector boostVector
 
G4double oldTotalEnergy
 
G4double oldXSec
 
G4bool isPiN
 
G4double weight
 
ParticleList modified
 
ParticleList created
 
ParticleList modifiedAndCreated
 
ParticleList Destroyed
 
ParticleList ModifiedAndDestroyed
 
- Protected Attributes inherited from G4INCL::IAvatar
G4double theTime
 

Static Protected Attributes

static G4ThreadLocal ParticlebackupParticle1 = NULL
 
static G4ThreadLocal ParticlebackupParticle2 = NULL
 

Private Attributes

RootFunctorviolationEFunctor
 

Detailed Description

Definition at line 61 of file G4INCLInteractionAvatar.hh.

View newest version in sPHENIX GitHub at line 61 of file G4INCLInteractionAvatar.hh

Constructor & Destructor Documentation

G4INCL::InteractionAvatar::InteractionAvatar ( G4double  time,
G4INCL::Nucleus n,
G4INCL::Particle p1 
)

Definition at line 65 of file G4INCLInteractionAvatar.cc.

View newest version in sPHENIX GitHub 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.

View newest version in sPHENIX GitHub at line 74 of file G4INCLInteractionAvatar.cc

G4INCL::InteractionAvatar::~InteractionAvatar ( )
virtual

Definition at line 84 of file G4INCLInteractionAvatar.cc.

View newest version in sPHENIX GitHub at line 84 of file G4INCLInteractionAvatar.cc

Member Function Documentation

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

Definition at line 137 of file G4INCLInteractionAvatar.cc.

View newest version in sPHENIX GitHub at line 137 of file G4INCLInteractionAvatar.cc

References G4INCL::Particle::getPosition(), G4INCL::Nucleus::getSurfaceRadius(), INCL_DEBUG, G4INCL::ThreeVector::mag(), G4INCL::ThreeVector::mag2(), pos(), r, G4INCL::Particle::rpCorrelate(), G4INCL::Particle::setPosition(), and theNucleus.

Referenced by postInteraction().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4INCL::InteractionAvatar::deleteBackupParticles ( )
static

Release the memory allocated for the backup particles.

Definition at line 87 of file G4INCLInteractionAvatar.cc.

View newest version in sPHENIX GitHub at line 87 of file G4INCLInteractionAvatar.cc

References backupParticle1, and backupParticle2.

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

+ Here is the caller graph for this function:

G4bool G4INCL::InteractionAvatar::enforceEnergyConservation ( FinalState *const  fs)
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.

Returns
true if the algorithm succeeded

Definition at line 359 of file G4INCLInteractionAvatar.cc.

View newest version in sPHENIX GitHub 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 G4INCL::DecayAvatar::postInteraction(), and postInteraction().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual G4INCL::IChannel* G4INCL::InteractionAvatar::getChannel ( )
protectedpure virtual
void G4INCL::InteractionAvatar::postInteraction ( FinalState fs)
protectedvirtual

Implements G4INCL::IAvatar.

Definition at line 166 of file G4INCLInteractionAvatar.cc.

View newest version in sPHENIX GitHub at line 166 of file G4INCLInteractionAvatar.cc

References G4INCL::FinalState::addOutgoingParticle(), G4INCL::ParticleList::boost(), boostVector, bringParticleInside(), created, G4INCL::Book::decrementCascading(), Destroyed, E, e, 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::DecayAvatar::postInteraction(), and G4INCL::BinaryCollisionAvatar::postInteraction().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4INCL::InteractionAvatar::preInteraction ( )
protectedvirtual

Implements G4INCL::IAvatar.

Definition at line 122 of file G4INCLInteractionAvatar.cc.

View newest version in sPHENIX GitHub 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::DecayAvatar::preInteraction(), and G4INCL::BinaryCollisionAvatar::preInteraction().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4INCL::InteractionAvatar::preInteractionBlocking ( )
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.

View newest version in sPHENIX GitHub 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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Apply local-energy transformation, if appropriate.

Parameters
pparticle to apply the transformation to

Definition at line 115 of file G4INCLInteractionAvatar.cc.

View newest version in sPHENIX GitHub at line 115 of file G4INCLInteractionAvatar.cc

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

Referenced by preInteraction().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Restore the state of both particles.

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

Definition at line 340 of file G4INCLInteractionAvatar.cc.

View newest version in sPHENIX GitHub at line 340 of file G4INCLInteractionAvatar.cc

References particle2.

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

+ Here is the caller graph for this function:

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

true if the given avatar should use local energy

Definition at line 346 of file G4INCLInteractionAvatar.cc.

View newest version in sPHENIX GitHub 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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

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

Definition at line 108 of file G4INCLInteractionAvatar.hh.

View newest version in sPHENIX GitHub at line 108 of file G4INCLInteractionAvatar.hh

Referenced by deleteBackupParticles(), G4INCL::BinaryCollisionAvatar::postInteraction(), and preInteractionBlocking().

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

Definition at line 108 of file G4INCLInteractionAvatar.hh.

View newest version in sPHENIX GitHub at line 108 of file G4INCLInteractionAvatar.hh

Referenced by deleteBackupParticles(), G4INCL::BinaryCollisionAvatar::postInteraction(), and preInteractionBlocking().

ParticleList G4INCL::InteractionAvatar::created
protected

Definition at line 223 of file G4INCLInteractionAvatar.hh.

View newest version in sPHENIX GitHub at line 223 of file G4INCLInteractionAvatar.hh

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

ParticleList G4INCL::InteractionAvatar::Destroyed
protected

Definition at line 223 of file G4INCLInteractionAvatar.hh.

View newest version in sPHENIX GitHub at line 223 of file G4INCLInteractionAvatar.hh

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

G4bool G4INCL::InteractionAvatar::isPiN
protected

Definition at line 111 of file G4INCLInteractionAvatar.hh.

View newest version in sPHENIX GitHub at line 111 of file G4INCLInteractionAvatar.hh

Referenced by G4INCL::BinaryCollisionAvatar::getChannel(), and shouldUseLocalEnergy().

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

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

Definition at line 68 of file G4INCLInteractionAvatar.hh.

View newest version in sPHENIX GitHub at line 68 of file G4INCLInteractionAvatar.hh

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

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

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

Definition at line 70 of file G4INCLInteractionAvatar.hh.

View newest version in sPHENIX GitHub at line 70 of file G4INCLInteractionAvatar.hh

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

ParticleList G4INCL::InteractionAvatar::modified
protected

Definition at line 223 of file G4INCLInteractionAvatar.hh.

View newest version in sPHENIX GitHub at line 223 of file G4INCLInteractionAvatar.hh

Referenced by enforceEnergyConservation(), G4INCL::DecayAvatar::postInteraction(), and postInteraction().

ParticleList G4INCL::InteractionAvatar::modifiedAndCreated
protected

Definition at line 223 of file G4INCLInteractionAvatar.hh.

View newest version in sPHENIX GitHub at line 223 of file G4INCLInteractionAvatar.hh

Referenced by enforceEnergyConservation(), G4INCL::DecayAvatar::postInteraction(), and postInteraction().

ParticleList G4INCL::InteractionAvatar::ModifiedAndDestroyed
protected

Definition at line 223 of file G4INCLInteractionAvatar.hh.

View newest version in sPHENIX GitHub at line 223 of file G4INCLInteractionAvatar.hh

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

G4double G4INCL::InteractionAvatar::oldTotalEnergy
protected

Definition at line 110 of file G4INCLInteractionAvatar.hh.

View newest version in sPHENIX GitHub at line 110 of file G4INCLInteractionAvatar.hh

Referenced by G4INCL::DecayAvatar::postInteraction(), postInteraction(), and preInteractionBlocking().

G4double G4INCL::InteractionAvatar::oldXSec
protected

Definition at line 110 of file G4INCLInteractionAvatar.hh.

View newest version in sPHENIX GitHub at line 110 of file G4INCLInteractionAvatar.hh

Referenced by G4INCL::BinaryCollisionAvatar::postInteraction(), and preInteractionBlocking().

RootFunctor* G4INCL::InteractionAvatar::violationEFunctor
private

Definition at line 208 of file G4INCLInteractionAvatar.hh.

View newest version in sPHENIX GitHub at line 208 of file G4INCLInteractionAvatar.hh

Referenced by enforceEnergyConservation().

G4double G4INCL::InteractionAvatar::weight
protected

Definition at line 112 of file G4INCLInteractionAvatar.hh.

View newest version in sPHENIX GitHub at line 112 of file G4INCLInteractionAvatar.hh

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


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