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

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

+ Inheritance diagram for G4INCL::IFunction1D:

Public Types

typedef G4double(*const ManipulatorFunc )(const G4double)
 Typedef to simplify the syntax of inverseCDFTable.
 

Public Member Functions

 IFunction1D ()
 
 IFunction1D (const G4double x0, const G4double x1)
 
virtual ~IFunction1D ()
 
virtual G4double getXMinimum () const
 Return the minimum allowed value of the independent variable.
 
virtual G4double getXMaximum () const
 Return the maximum allowed value of the independent variable.
 
virtual G4double operator() (const G4double x) const =0
 Compute the value of the function.
 
virtual G4double integrate (const G4double x0, const G4double x1, const G4double step=-1.) const
 Integrate the function between two values.
 
IFunction1Dprimitive () const
 Return a pointer to the (numerical) primitive to this function.
 
InterpolationTableinverseCDFTable (ManipulatorFunc fWrap=0, const G4int nNodes=60) const
 Return a pointer to the inverse of the CDF of this function.
 

Protected Attributes

G4double xMin
 Minimum value of the independent variable.
 
G4double xMax
 Maximum value of the independent variable.
 

Static Private Attributes

static const G4double integrationCoefficients []
 Coefficients for numerical integration.
 

Detailed Description

1D function interface

Definition at line 58 of file G4INCLIFunction1D.hh.

View newest version in sPHENIX GitHub at line 58 of file G4INCLIFunction1D.hh

Member Typedef Documentation

typedef G4double(* const G4INCL::IFunction1D::ManipulatorFunc)(const G4double)

Typedef to simplify the syntax of inverseCDFTable.

Definition at line 93 of file G4INCLIFunction1D.hh.

View newest version in sPHENIX GitHub at line 93 of file G4INCLIFunction1D.hh

Constructor & Destructor Documentation

G4INCL::IFunction1D::IFunction1D ( )
inline

Definition at line 60 of file G4INCLIFunction1D.hh.

View newest version in sPHENIX GitHub at line 60 of file G4INCLIFunction1D.hh

Referenced by inverseCDFTable(), and primitive().

+ Here is the caller graph for this function:

G4INCL::IFunction1D::IFunction1D ( const G4double  x0,
const G4double  x1 
)
inline

Definition at line 64 of file G4INCLIFunction1D.hh.

View newest version in sPHENIX GitHub at line 64 of file G4INCLIFunction1D.hh

virtual G4INCL::IFunction1D::~IFunction1D ( )
inlinevirtual

Definition at line 69 of file G4INCLIFunction1D.hh.

View newest version in sPHENIX GitHub at line 69 of file G4INCLIFunction1D.hh

Member Function Documentation

virtual G4double G4INCL::IFunction1D::getXMaximum ( ) const
inlinevirtual

Return the maximum allowed value of the independent variable.

Definition at line 75 of file G4INCLIFunction1D.hh.

View newest version in sPHENIX GitHub at line 75 of file G4INCLIFunction1D.hh

References xMax.

Referenced by inverseCDFTable(), G4INCL::InvFInterpolationTable::InvFInterpolationTable(), and primitive().

+ Here is the caller graph for this function:

virtual G4double G4INCL::IFunction1D::getXMinimum ( ) const
inlinevirtual

Return the minimum allowed value of the independent variable.

Definition at line 72 of file G4INCLIFunction1D.hh.

View newest version in sPHENIX GitHub at line 72 of file G4INCLIFunction1D.hh

References xMin.

Referenced by inverseCDFTable(), G4INCL::InvFInterpolationTable::InvFInterpolationTable(), and primitive().

+ Here is the caller graph for this function:

G4double G4INCL::IFunction1D::integrate ( const G4double  x0,
const G4double  x1,
const G4double  step = -1. 
) const
virtual

Integrate the function between two values.

Parameters
x0lower integration bound
x1upper integration bound
steplargest integration step size; if <0, 45 steps will be used
Returns
$\int_{x_0}^{x_1} f(x) dx$

Definition at line 66 of file G4INCLIFunction1D.cc.

View newest version in sPHENIX GitHub at line 66 of file G4INCLIFunction1D.cc

References dx, integrationCoefficients, max, min, operator()(), sign(), boost::swap(), x, xMax, and xMin.

+ Here is the call graph for this function:

InterpolationTable * G4INCL::IFunction1D::inverseCDFTable ( IFunction1D::ManipulatorFunc  fWrap = 0,
const G4int  nNodes = 60 
) const

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.

View newest version in sPHENIX GitHub at line 123 of file G4INCLIFunction1D.cc

References f, getXMaximum(), getXMinimum(), IFunction1D(), min, operator()(), x, xMax, and xMin.

Referenced by G4INCL::NuclearDensityFactory::createPCDFTable(), G4INCL::NuclearDensityFactory::createRCDFTable(), and G4INCL::NuclearDensityFactory::createRPCorrelationTable().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

IFunction1D * G4INCL::IFunction1D::primitive ( ) const

Return a pointer to the (numerical) primitive to this function.

Definition at line 105 of file G4INCLIFunction1D.cc.

View newest version in sPHENIX GitHub at line 105 of file G4INCLIFunction1D.cc

References f, getXMaximum(), getXMinimum(), IFunction1D(), operator()(), Primitive, x, and xMin.

+ Here is the call graph for this function:

Member Data Documentation

const G4double G4INCL::IFunction1D::integrationCoefficients
staticprivate
Initial value:
= {
2.*95.0/288.0,
317.0/240.0,
23.0/30.0,
793.0/720.0,
157.0/160.0,
157.0/160.0,
793.0/720.0,
23.0/30.0,
317.0/240.0,
}

Coefficients for numerical integration.

Definition at line 110 of file G4INCLIFunction1D.hh.

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

Referenced by integrate().

G4double G4INCL::IFunction1D::xMax
protected

Maximum value of the independent variable.

Definition at line 106 of file G4INCLIFunction1D.hh.

View newest version in sPHENIX GitHub at line 106 of file G4INCLIFunction1D.hh

Referenced by getXMaximum(), integrate(), and inverseCDFTable().

G4double G4INCL::IFunction1D::xMin
protected

Minimum value of the independent variable.

Definition at line 104 of file G4INCLIFunction1D.hh.

View newest version in sPHENIX GitHub at line 104 of file G4INCLIFunction1D.hh

Referenced by getXMinimum(), integrate(), inverseCDFTable(), and primitive().


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