12 #include <Math/IFunction.h> 13 #include <Math/IntegratorMultiDim.h> 14 #include "Math/AdaptiveIntegratorMultiDim.h" 17 #include "Framework/Conventions/GBuild.h" 29 using namespace genie;
58 LOG(
"COHXSec",
pDEBUG) <<
"*** Below energy threshold";
73 if (model->
Id().
Name() ==
"genie::ReinSehgalCOHPiPXSec") {
75 <<
"x integration range = [" << xl.
min <<
", " << xl.
max <<
"]";
77 <<
"y integration range = [" << yl.
min <<
", " << yl.
max <<
"]";
79 ROOT::Math::IBaseFunctionMultiDim *
func =
86 if (ig_type == ROOT::Math::IntegrationMultiDim::kADAPTIVE) {
87 ROOT::Math::AdaptiveIntegratorMultiDim * cast =
88 dynamic_cast<ROOT::Math::AdaptiveIntegratorMultiDim*
>( ig.GetIntegrator() );
93 double kine_min[2] = { xl.
min, yl.
min };
94 double kine_max[2] = { xl.
max, yl.
max };
95 xsec = ig.Integral(kine_min, kine_max) * (1
E-38 *
units::cm2);
98 else if (model->
Id().
Name() ==
"genie::BergerSehgalCOHPiPXSec2015")
100 ROOT::Math::IBaseFunctionMultiDim *
func =
104 ROOT::Math::IntegratorMultiDim ig(ig_type);
106 ig.SetFunction(*func);
107 if (ig_type == ROOT::Math::IntegrationMultiDim::kADAPTIVE) {
108 ROOT::Math::AdaptiveIntegratorMultiDim * cast =
109 dynamic_cast<ROOT::Math::AdaptiveIntegratorMultiDim*
>( ig.GetIntegrator() );
113 double kine_min[2] = { Q2l.
min, yl.
min };
114 double kine_max[2] = { Q2l.
max, yl.
max };
115 xsec = ig.Integral(kine_min, kine_max) * (1
E-38 *
units::cm2);
118 else if (model->
Id().
Name() ==
"genie::BergerSehgalFMCOHPiPXSec2015")
124 ROOT::Math::IBaseFunctionMultiDim *
func =
128 ROOT::Math::IntegratorMultiDim ig(ig_type);
130 ig.SetFunction(*func);
131 if (ig_type == ROOT::Math::IntegrationMultiDim::kADAPTIVE) {
132 ROOT::Math::AdaptiveIntegratorMultiDim * cast =
133 dynamic_cast<ROOT::Math::AdaptiveIntegratorMultiDim*
>( ig.GetIntegrator() );
137 double kine_min[3] = { Q2l.
min, yl.
min, tl.
min };
138 double kine_max[3] = { Q2l.
max, yl.
max, tl.
max };
139 xsec = ig.Integral(kine_min, kine_max) * (1
E-38 *
units::cm2);
145 LOG(
"COHXSec",
pINFO) <<
"XSec[COH] (E = " << Ev <<
" GeV) = " << xsec;
171 int max_eval, min_eval ;
Cross Section Calculation Interface.
const KPhaseSpace & PhaseSpace(void) const
string fGSLIntgType
name of GSL numerical integrator
THE MAIN GENIE PROJECT NAMESPACE
double fQ2Max
upper bound of integration for Q^2 in Berger-Sehgal Model
Cross Section Integrator Interface.
double fTMax
upper bound for t = (q - p_pi)^2
ROOT::Math::IntegrationMultiDim::Type IntegrationNDimTypeFromString(string type)
A simple [min,max] interval for doubles.
void Configure(const Registry &config)
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)
static const double kASmallNum
double Integrate(const XSecAlgorithmI *model, const Interaction *i) const
virtual const AlgId & Id(void) const
Get algorithm ID.
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.
virtual bool ValidProcess(const Interaction *i) const =0
Can this cross section algorithm handle the input process?
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
double fQ2Min
lower bound of integration for Q^2 in Berger-Sehgal Model
double ProbeE(RefFrame_t rf) const
int fGSLMinEval
GSL min evaluations. Ignored by some integrators.
Root of GENIE utility namespaces.
const UInt_t kISkipProcessChk
if set, skip process validity checks
Initial State information.
double fGSLRelTol
required relative tolerance (error)