Geant4  10.00.p02
G4INCL::InteractionAvatar::ViolationEMomentumFunctor Class Reference

RootFunctor-derived object for enforcing energy conservation in N-N. More...

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

Public Member Functions

 ViolationEMomentumFunctor (Nucleus *const nucleus, FinalState const *const finalState, ThreeVector const *const boost, const G4bool localE)
 Prepare for calling the () operator and scaleParticleMomenta. More...
 
virtual ~ViolationEMomentumFunctor ()
 
G4double operator() (const G4double x) const
 Compute the energy-conservation violation. More...
 
void cleanUp (const G4bool success) const
 Clean up after root finding. More...
 
- Public Member Functions inherited from G4INCL::RootFunctor
virtual ~RootFunctor ()
 
- Public Member Functions inherited from G4INCL::IFunction1D
 IFunction1D ()
 
 IFunction1D (const G4double x0, const G4double x1)
 
virtual ~IFunction1D ()
 
virtual G4double getXMinimum () const
 Return the minimum allowed value of the independent variable. More...
 
virtual G4double getXMaximum () const
 Return the maximum allowed value of the independent variable. More...
 
virtual G4double integrate (const G4double x0, const G4double x1, const G4double step=-1.) const
 Integrate the function between two values. More...
 
IFunction1Dprimitive () const
 Return a pointer to the (numerical) primitive to this function. More...
 
InverseInterpolationTableinverseCDFTable (const G4int nNodes=60) const
 Return a pointer to the inverse of the CDF of this function. More...
 

Private Member Functions

void scaleParticleMomenta (const G4double alpha) const
 Scale the momenta of the modified and created particles. More...
 

Private Attributes

ParticleList finalParticles
 List of final-state particles. More...
 
std::list< ThreeVectorparticleMomenta
 CM particle momenta, as determined by the channel. More...
 
G4double initialEnergy
 Total energy before the interaction. More...
 
NucleustheNucleus
 Pointer to the nucleus. More...
 
ThreeVector const * boostVector
 Pointer to the boost vector. More...
 
const G4bool shouldUseLocalEnergy
 True if we should use local energy. More...
 

Additional Inherited Members

- Protected Member Functions inherited from G4INCL::RootFunctor
 RootFunctor (const G4double x0, const G4double x1)
 
- Protected Attributes inherited from G4INCL::IFunction1D
G4double xMin
 Minimum value of the independent variable. More...
 
G4double xMax
 Maximum value of the independent variable. More...
 

Detailed Description

RootFunctor-derived object for enforcing energy conservation in N-N.

Definition at line 124 of file G4INCLInteractionAvatar.hh.

Constructor & Destructor Documentation

G4INCL::InteractionAvatar::ViolationEMomentumFunctor::ViolationEMomentumFunctor ( Nucleus *const  nucleus,
FinalState const *const  finalState,
ThreeVector const *const  boost,
const G4bool  localE 
)

Prepare for calling the () operator and scaleParticleMomenta.

The constructor sets the private class members.

Definition at line 377 of file G4INCLInteractionAvatar.cc.

References boostVector, finalParticles, G4INCL::FinalState::getCreatedParticles(), G4INCL::FinalState::getModifiedParticles(), and particleMomenta.

+ Here is the call graph for this function:

virtual G4INCL::InteractionAvatar::ViolationEMomentumFunctor::~ViolationEMomentumFunctor ( )
inlinevirtual

Definition at line 131 of file G4INCLInteractionAvatar.hh.

References particleMomenta.

Member Function Documentation

void G4INCL::InteractionAvatar::ViolationEMomentumFunctor::cleanUp ( const G4bool  success) const
virtual

Clean up after root finding.

Implements G4INCL::RootFunctor.

Definition at line 441 of file G4INCLInteractionAvatar.cc.

G4double G4INCL::InteractionAvatar::ViolationEMomentumFunctor::operator() ( const G4double  x) const
virtual

Compute the energy-conservation violation.

Parameters
xscale factor for the particle momenta
Returns
the energy-conservation violation

Implements G4INCL::IFunction1D.

Definition at line 398 of file G4INCLInteractionAvatar.cc.

void G4INCL::InteractionAvatar::ViolationEMomentumFunctor::scaleParticleMomenta ( const G4double  alpha) const
private

Scale the momenta of the modified and created particles.

Set the momenta of the modified and created particles to alpha times their original momenta (stored in particleMomenta). You must call init() before using this method.

Parameters
alphascale factor

Definition at line 408 of file G4INCLInteractionAvatar.cc.

References G4INCL::InteractionAvatar::boostVector, G4INCL::KinematicsUtils::energy(), G4INCL::KinematicsUtils::getLocalEnergy(), G4INCL::InteractionAvatar::maxIterLocE, G4INCL::InteractionAvatar::shouldUseLocalEnergy(), G4INCL::InteractionAvatar::theNucleus, and G4INCL::Nucleus::updatePotentialEnergy().

+ Here is the call graph for this function:

Member Data Documentation

ThreeVector const* G4INCL::InteractionAvatar::ViolationEMomentumFunctor::boostVector
private

Pointer to the boost vector.

Definition at line 153 of file G4INCLInteractionAvatar.hh.

Referenced by ViolationEMomentumFunctor().

ParticleList G4INCL::InteractionAvatar::ViolationEMomentumFunctor::finalParticles
private

List of final-state particles.

Definition at line 145 of file G4INCLInteractionAvatar.hh.

Referenced by ViolationEMomentumFunctor().

G4double G4INCL::InteractionAvatar::ViolationEMomentumFunctor::initialEnergy
private

Total energy before the interaction.

Definition at line 149 of file G4INCLInteractionAvatar.hh.

std::list<ThreeVector> G4INCL::InteractionAvatar::ViolationEMomentumFunctor::particleMomenta
private

CM particle momenta, as determined by the channel.

Definition at line 147 of file G4INCLInteractionAvatar.hh.

Referenced by ViolationEMomentumFunctor(), and ~ViolationEMomentumFunctor().

const G4bool G4INCL::InteractionAvatar::ViolationEMomentumFunctor::shouldUseLocalEnergy
private

True if we should use local energy.

Definition at line 156 of file G4INCLInteractionAvatar.hh.

Nucleus* G4INCL::InteractionAvatar::ViolationEMomentumFunctor::theNucleus
private

Pointer to the nucleus.

Definition at line 151 of file G4INCLInteractionAvatar.hh.


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