12 #include <Math/IFunction.h>
13 #include <Math/IntegratorMultiDim.h>
15 #include "Framework/Conventions/GBuild.h"
27 using namespace genie;
28 using namespace genie::constants;
55 LOG(
"COHXSec",
pDEBUG) <<
"*** Below energy threshold";
65 ROOT::Math::IBaseFunctionMultiDim *
func =
68 ROOT::Math::IntegrationMultiDim::Type ig_type =
70 double abstol = 1E-16;
74 double kine_min[2] = { Wl.
min, Q2l.
min };
75 double kine_max[2] = { Wl.
max, Q2l.
max };
76 double xsec = ig.Integral(kine_min, kine_max) * (1E-38 *
units::cm2);
78 LOG(
"RESXSec",
pERROR) <<
"Integrator opt / Integrator = " << ig.Options().Integrator();
81 LOG(
"RESXSec",
pERROR) <<
"Algorithm " << *model <<
" returns a negative cross-section (xsec = " << xsec <<
" 1E-38 * cm2)";
82 LOG(
"RESXSec",
pERROR) <<
"for process" << *interaction;
83 LOG(
"RESXSec",
pERROR) <<
"Integrator status code = " << ig.Status();
84 LOG(
"RESXSec",
pERROR) <<
"Integrator error code = " << ig.Error();
Cross Section Calculation Interface.
const KPhaseSpace & PhaseSpace(void) const
string fGSLIntgType
name of GSL numerical integrator
Cross Section Integrator Interface.
ROOT::Math::IntegrationMultiDim::Type IntegrationNDimTypeFromString(string type)
A simple [min,max] interval for doubles.
Range1D_t Limits(KineVar_t kvar) const
Return the kinematical variable limits.
Summary information for an interaction.
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
static constexpr double cm2
virtual void Configure(const Registry &config)
double func(double x, double y)
virtual bool ValidProcess(const Interaction *i) const =0
Can this cross section algorithm handle the input process?
void Configure(const Registry &config)
int fGSLMaxEval
GSL max evaluations.
A registry. Provides the container for algorithm configuration parameters.
bool IsAboveThreshold(void) const
Checks whether the interaction is above the energy threshold.
double Integrate(const XSecAlgorithmI *model, const Interaction *i) const
XSecIntegratorI interface implementation.
bool GetParamDef(const RgKey &name, T &p, const T &def) const
int fGSLMinEval
GSL min evaluations. Ignored by some integrators.
const UInt_t kISkipProcessChk
if set, skip process validity checks
double fGSLRelTol
required relative tolerance (error)