29 #include <Math/IFunction.h>
30 #include <Math/IntegratorMultiDim.h>
31 #include "Math/AdaptiveIntegratorMultiDim.h"
33 using namespace genie;
34 using namespace genie::constants;
62 LOG(
"DISXSec",
pDEBUG) <<
"*** Below energy threshold";
87 LOG(
"HEDISXSec",
pINFO) <<
"From XSecSplineList: XSec[HEDIS,free nucleon] (E = " << Ev <<
" GeV) = " << xsec;
90 LOG(
"HEDISXSec",
pINFO) <<
"XSec[HEDIS] (E = " << Ev <<
" GeV) = " << xsec;
102 LOG(
"HEDISXSec",
pDEBUG) <<
"X only kinematic range = [" << xl.
min <<
", " << xl.
max <<
"]";
103 LOG(
"HEDISXSec",
pDEBUG) <<
"Q2 only kinematic range = [" << Q2l.
min <<
", " << Q2l.
max <<
"]";
109 LOG(
"HEDISXSec",
pDEBUG) <<
"X kinematic+PDF range = [" << xl.
min <<
", " << xl.
max <<
"]";
110 LOG(
"HEDISXSec",
pDEBUG) <<
"Q2 kinematic+PDF range = [" << Q2l.
min <<
", " << Q2l.
max <<
"]";
114 (Q2l.
min >= 0. && Q2l.
max >= 0. && Q2l.
max >= Q2l.
min &&
117 if (!phsp_ok)
return 0.;
132 ROOT::Math::IntegratorMultiDim ig(*func, ig_type, abstol, reltol,
fGSLMaxEval);
133 double kine_min[2] = { TMath::Log10(xl.
min), TMath::Log10(Q2l.
min) };
134 double kine_max[2] = {TMath::Log10(xl.
max), TMath::Log10(Q2l.
max) };
135 xsec = ig.Integral(kine_min, kine_max) * (1E-38 *
units::cm2);
140 LOG(
"HEDISXSec",
pINFO) <<
"XSec[HEDIS] (E = " << Ev <<
" GeV) = " << xsec * (1E+38/
units::cm2) <<
" x 1E-38 cm^2";
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)
int HitNucPdg(void) const
A simple [min,max] interval for doubles.
bool SplineExists(const XSecAlgorithmI *alg, const Interaction *i) const
A numeric analysis tool class for interpolating 1-D functions.
bool IsNucleus(void) const
double fSFQ2max
maximum value of Q2 for which SF tables are computed
static XSecSplineList * Instance()
Range1D_t Q2Lim(void) const
Q2 limits.
double Evaluate(double x) const
string AsString(void) const
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
double Integrate(const XSecAlgorithmI *model, const Interaction *i) const
XSecIntegratorI interface implementation.
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
virtual void Configure(const Registry &config)
double fSFQ2min
minimum value of Q2 for which SF tables are computed
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.
const UInt_t kIAssumeFreeNucleon
Target * TgtPtr(void) const
bool IsAboveThreshold(void) const
Checks whether the interaction is above the energy threshold.
double fSFXmin
minimum value of x for which SF tables are computed
InitialState * InitStatePtr(void) const
Range1D_t XLim(void) const
x limits
const InitialState & InitState(void) const
bool GetParamDef(const RgKey &name, T &p, const T &def) const
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
const Target & Tgt(void) const
const Spline * GetSpline(const XSecAlgorithmI *alg, const Interaction *i) const
List of cross section vs energy splines.
double ProbeE(RefFrame_t rf) const
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
Initial State information.