Geant4-11
|
RootFunctor-derived object for enforcing energy conservation in N-N. More...
Public Types | |
typedef G4double(*const | ManipulatorFunc) (const G4double) |
Typedef to simplify the syntax of inverseCDFTable. More... | |
Public Member Functions | |
void | cleanUp (const G4bool success) const |
Clean up after root finding. More... | |
virtual G4double | getXMaximum () const |
Return the maximum allowed value of the independent variable. More... | |
virtual G4double | getXMinimum () const |
Return the minimum 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... | |
InterpolationTable * | inverseCDFTable (ManipulatorFunc fWrap=0, const G4int nNodes=60) const |
Return a pointer to the inverse of the CDF of this function. More... | |
G4double | operator() (const G4double x) const |
Compute the energy-conservation violation. More... | |
IFunction1D * | primitive () const |
Return a pointer to the (numerical) primitive to this function. More... | |
ViolationEMomentumFunctor (Nucleus *const nucleus, ParticleList const &modAndCre, const G4double totalEnergyBeforeInteraction, ThreeVector const &boost, const G4bool localE) | |
Prepare for calling the () operator and scaleParticleMomenta. More... | |
virtual | ~ViolationEMomentumFunctor () |
Protected Attributes | |
G4double | xMax |
Maximum value of the independent variable. More... | |
G4double | xMin |
Minimum value of the independent variable. More... | |
Private Member Functions | |
void | scaleParticleMomenta (const G4double alpha) const |
Scale the momenta of the modified and created particles. More... | |
Private Attributes | |
ThreeVector const & | boostVector |
Pointer to the boost vector. More... | |
ParticleList | finalParticles |
List of final-state particles. More... | |
G4double | initialEnergy |
Total energy before the interaction. More... | |
std::vector< ThreeVector > | particleMomenta |
CM particle momenta, as determined by the channel. More... | |
const G4bool | shouldUseLocalEnergy |
True if we should use local energy. More... | |
Nucleus * | theNucleus |
Pointer to the nucleus. More... | |
Static Private Attributes | |
static const G4double | integrationCoefficients [] |
Coefficients for numerical integration. More... | |
RootFunctor-derived object for enforcing energy conservation in N-N.
Definition at line 116 of file G4INCLInteractionAvatar.hh.
Typedef to simplify the syntax of inverseCDFTable.
Definition at line 93 of file G4INCLIFunction1D.hh.
G4INCL::InteractionAvatar::ViolationEMomentumFunctor::ViolationEMomentumFunctor | ( | Nucleus *const | nucleus, |
ParticleList const & | modAndCre, | ||
const G4double | totalEnergyBeforeInteraction, | ||
ThreeVector const & | boost, | ||
const G4bool | localE | ||
) |
Prepare for calling the () operator and scaleParticleMomenta.
The constructor sets the private class members.
Definition at line 391 of file G4INCLInteractionAvatar.cc.
References boostVector, finalParticles, and particleMomenta.
|
virtual |
Definition at line 407 of file G4INCLInteractionAvatar.cc.
|
virtual |
Clean up after root finding.
Implements G4INCL::RootFunctor.
Definition at line 475 of file G4INCLInteractionAvatar.cc.
|
inlinevirtualinherited |
Return the maximum allowed value of the independent variable.
Definition at line 75 of file G4INCLIFunction1D.hh.
References G4INCL::IFunction1D::xMax.
Referenced by G4INCL::IFunction1D::inverseCDFTable(), G4INCL::InvFInterpolationTable::InvFInterpolationTable(), and G4INCL::IFunction1D::primitive().
|
inlinevirtualinherited |
Return the minimum allowed value of the independent variable.
Definition at line 72 of file G4INCLIFunction1D.hh.
References G4INCL::IFunction1D::xMin.
Referenced by G4INCL::IFunction1D::inverseCDFTable(), G4INCL::InvFInterpolationTable::InvFInterpolationTable(), and G4INCL::IFunction1D::primitive().
|
virtualinherited |
Integrate the function between two values.
x0 | lower integration bound |
x1 | upper integration bound |
step | largest integration step size; if <0, 45 steps will be used |
Definition at line 66 of file G4INCLIFunction1D.cc.
References G4INCL::IFunction1D::integrationCoefficients, G4INCL::Math::max(), G4INCL::Math::min(), G4INCL::IFunction1D::operator()(), G4INCL::Math::sign(), G4INCL::IFunction1D::xMax, and G4INCL::IFunction1D::xMin.
|
inherited |
Return a pointer to the inverse of the CDF of this function.
The function parameter fWrap is wrapped around the return value of operator(). If fWrap=NULL (default), fWrap=identity.
Definition at line 123 of file G4INCLIFunction1D.cc.
References G4INCL::IFunction1D::getXMaximum(), G4INCL::IFunction1D::getXMinimum(), G4INCL::IFunction1D::IFunction1D(), G4INCL::Math::min(), G4INCL::IFunction1D::operator()(), G4INCL::IFunction1D::xMax, and G4INCL::IFunction1D::xMin.
Referenced by G4INCL::NuclearDensityFactory::createPCDFTable(), G4INCL::NuclearDensityFactory::createRCDFTable(), and G4INCL::NuclearDensityFactory::createRPCorrelationTable().
|
virtual |
Compute the energy-conservation violation.
x | scale factor for the particle momenta |
Implements G4INCL::IFunction1D.
Definition at line 411 of file G4INCLInteractionAvatar.cc.
References alpha.
|
inherited |
Return a pointer to the (numerical) primitive to this function.
Definition at line 105 of file G4INCLIFunction1D.cc.
References G4INCL::IFunction1D::getXMaximum(), G4INCL::IFunction1D::getXMinimum(), G4INCL::IFunction1D::IFunction1D(), G4INCL::IFunction1D::operator()(), Primitive, and G4INCL::IFunction1D::xMin.
|
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.
alpha | scale factor |
Definition at line 421 of file G4INCLInteractionAvatar.cc.
References alpha, G4INCL::InteractionAvatar::boostVector, G4INCL::KinematicsUtils::energy(), G4INCL::Particle::getA(), G4INCL::KinematicsUtils::getLocalEnergy(), G4INCL::InteractionAvatar::locEAccuracy, G4INCL::InteractionAvatar::maxIterLocE, G4INCL::InteractionAvatar::shouldUseLocalEnergy(), G4INCL::InteractionAvatar::theNucleus, and G4INCL::Nucleus::updatePotentialEnergy().
|
private |
Pointer to the boost vector.
Definition at line 145 of file G4INCLInteractionAvatar.hh.
Referenced by ViolationEMomentumFunctor().
|
private |
List of final-state particles.
Definition at line 137 of file G4INCLInteractionAvatar.hh.
Referenced by ViolationEMomentumFunctor().
|
private |
Total energy before the interaction.
Definition at line 141 of file G4INCLInteractionAvatar.hh.
|
staticprivateinherited |
Coefficients for numerical integration.
Definition at line 110 of file G4INCLIFunction1D.hh.
Referenced by G4INCL::IFunction1D::integrate().
|
private |
CM particle momenta, as determined by the channel.
Definition at line 139 of file G4INCLInteractionAvatar.hh.
Referenced by ViolationEMomentumFunctor().
|
private |
True if we should use local energy.
Definition at line 148 of file G4INCLInteractionAvatar.hh.
|
private |
Pointer to the nucleus.
Definition at line 143 of file G4INCLInteractionAvatar.hh.
|
protectedinherited |
Maximum value of the independent variable.
Definition at line 106 of file G4INCLIFunction1D.hh.
Referenced by G4INCL::IFunction1D::getXMaximum(), G4INCL::IFunction1D::integrate(), and G4INCL::IFunction1D::inverseCDFTable().
|
protectedinherited |
Minimum value of the independent variable.
Definition at line 104 of file G4INCLIFunction1D.hh.
Referenced by G4INCL::IFunction1D::getXMinimum(), G4INCL::IFunction1D::integrate(), G4INCL::IFunction1D::inverseCDFTable(), and G4INCL::IFunction1D::primitive().