GENIEGenerator
Loading...
Searching...
No Matches
genie::utils::gsl Namespace Reference

Simple utilities for integrating GSL in the GENIE framework. More...

Namespaces

namespace  wrap

Classes

class  d1XSecSM_dQ2_E
class  d2XSec_dlog10xdlog10Q2_E
class  d2Xsec_dn1dn2_E
class  d2Xsec_dn1dn2dn3_E
class  d2Xsec_dQ2dv
class  d2XSec_dQ2dy_E
class  d2XSec_dQ2dydt_E
class  d2XSec_dWdQ2_E
class  d2XSec_dWdQ2_EQ2
class  d2XSec_dWdQ2_EW
class  d2XSec_dxdy_E
class  d2XSec_dxdy_Ex
class  d2XSec_dxdy_Ey
class  d2XSecRESFast_dWQ2_E
class  d3Xsec_dOmegaldThetapi
class  d3Xsec_dTldTkdCosThetal
class  d3XSec_dxdydt_E
class  d3XSecMK_dWQ2CosTheta_E
class  d3XSecSM_dQ2dvdkF_E
class  d4Xsec_dEldThetaldOmegapi
class  d4XSecMK_dWQ2CosThetaPhi_E
class  d5Xsec_dEldOmegaldOmegapi
class  d5XSecAR
class  dv_dQ2_E
class  dXSec_dEDNu_E
class  dXSec_dElep_AR
class  dXSec_dQ2_E
class  dXSec_dy_E
class  dXSec_Log_Wrapper
class  FullQELdXSec

Functions

ROOT::Math::IntegrationOneDim::Type Integration1DimTypeFromString (string type)
ROOT::Math::IntegrationMultiDim::Type IntegrationNDimTypeFromString (string type)

Detailed Description

Simple utilities for integrating GSL in the GENIE framework.

GENIE differential cross section function wrappers for GSL integrators.

Author
Costas Andreopoulos <c.andreopoulos \at cern.ch> University of Liverpool
Created:\n May 06, 2004
License:\n Copyright (c) 2003-2025, The GENIE Collaboration
For the full text of the license visit http://copyright.genie-mc.org
Author
Costas Andreopoulos <c.andreopoulos \at cern.ch> University of Liverpool
Created:\n Sep 01, 2009
License:\n Copyright (c) 2003-2025, The GENIE Collaboration
For the full text of the license visit http://copyright.genie-mc.org

Function Documentation

◆ Integration1DimTypeFromString()

ROOT::Math::IntegrationOneDim::Type genie::utils::gsl::Integration1DimTypeFromString ( string type)

Definition at line 23 of file GSLUtils.cxx.

24{
25// Returns the appropriate IntegrationOneDim type based on the input string
26
27 string t = genie::utils::str::ToLower(type);
28
29
30#ifdef _OLD_GSL_INTEGRATION_ENUM_TYPES_
31
32 if (t=="adaptive") return ROOT::Math::IntegrationOneDim::ADAPTIVE;
33 else if (t=="adaptive_singular") return ROOT::Math::IntegrationOneDim::ADAPTIVESINGULAR;
34 else if (t=="non_adaptive") return ROOT::Math::IntegrationOneDim::NONADAPTIVE;
35
36 LOG("GSL", pWARN)
37 << "Unknown 1-dim GSL integration type = " << type
38 << ". Setting it to default [adaptive].";
39
40 return ROOT::Math::IntegrationOneDim::ADAPTIVE;
41
42#else
43
44 if (t=="gauss") return ROOT::Math::IntegrationOneDim::kGAUSS;
45 else if (t=="adaptive") return ROOT::Math::IntegrationOneDim::kADAPTIVE;
46 else if (t=="adaptive_singular") return ROOT::Math::IntegrationOneDim::kADAPTIVESINGULAR;
47 else if (t=="non_adaptive") return ROOT::Math::IntegrationOneDim::kNONADAPTIVE;
48
49 LOG("GSL", pWARN)
50 << "Unknown 1-dim GSL integration type = " << type
51 << ". Setting it to default [adaptive].";
52
53 return ROOT::Math::IntegrationOneDim::kADAPTIVE;
54
55#endif
56}
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
#define pWARN
Definition Messenger.h:60
string ToLower(string input)

References LOG, pWARN, and genie::utils::str::ToLower().

Referenced by genie::mueloss::BezrukovBugaevModel::dE_dx(), genie::mueloss::PetrukhinShestakovModel::dE_dx(), genie::KovalenkoQELCharmPXSec::DR(), genie::CEvNSXSec::Integrate(), genie::COHDNuXSec::Integrate(), genie::DMElectronXSec::Integrate(), genie::DMELXSec::Integrate(), genie::IMDXSec::Integrate(), genie::NuElectronXSec::Integrate(), genie::QELXSec::Integrate(), genie::SmithMonizQELCCXSec::Integrate(), genie::BardinIMDRadCorPXSec::Li2(), genie::PattonCEvNSPXSec::NuclearDensityMoment(), and genie::NievesQELCCPXSec::vcr().

◆ IntegrationNDimTypeFromString()

ROOT::Math::IntegrationMultiDim::Type genie::utils::gsl::IntegrationNDimTypeFromString ( string type)

Definition at line 59 of file GSLUtils.cxx.

60{
61// Returns the appropriate IntegrationMultiDim type based on the input string
62
63 string t = genie::utils::str::ToLower(type);
64
65#ifdef _OLD_GSL_INTEGRATION_ENUM_TYPES_
66
67 if (t=="adaptive") return ROOT::Math::IntegrationMultiDim::ADAPTIVE;
68 else if (t=="plain") return ROOT::Math::IntegrationMultiDim::PLAIN;
69 else if (t=="vegas") return ROOT::Math::IntegrationMultiDim::VEGAS;
70 else if (t=="miser") return ROOT::Math::IntegrationMultiDim::MISER;
71
72 LOG("GSL", pWARN)
73 << "Unknown N-dim GSL integration type = " << type
74 << ". Setting it to default [adaptive].";
75
76 return ROOT::Math::IntegrationMultiDim::ADAPTIVE;
77
78#else
79
80 if (t=="adaptive") return ROOT::Math::IntegrationMultiDim::kADAPTIVE;
81 else if (t=="plain") return ROOT::Math::IntegrationMultiDim::kPLAIN;
82 else if (t=="vegas") return ROOT::Math::IntegrationMultiDim::kVEGAS;
83 else if (t=="miser") return ROOT::Math::IntegrationMultiDim::kMISER;
84
85 LOG("GSL", pWARN)
86 << "Unknown N-dim GSL integration type = " << type
87 << ". Setting it to default [adaptive].";
88
89 return ROOT::Math::IntegrationMultiDim::kADAPTIVE;
90
91#endif
92
93}

References LOG, pWARN, and genie::utils::str::ToLower().

Referenced by genie::DISXSec::CacheFreeNucleonXSec(), genie::DMDISXSec::CacheFreeNucleonXSec(), genie::ReinSehgalRESXSecWithCache::CacheResExcitationXSec(), genie::ReinSehgalRESXSecWithCacheFast::CacheResExcitationXSec(), genie::SPPXSecWithCache::CacheResExcitationXSec(), genie::mueloss::KokoulinPetrukhinModel::dE_dx(), genie::utils::gsl::dXSec_dElep_AR::dXSec_dElep_AR(), genie::AlamSimoAtharVacasSKXSec::Integrate(), genie::COHXSec::Integrate(), genie::COHXSecAR::Integrate(), genie::DFRXSec::Integrate(), genie::DISXSec::Integrate(), genie::DMDISXSec::Integrate(), genie::HEDISXSec::Integrate(), genie::HELeptonXSec::Integrate(), genie::MECXSec::Integrate(), genie::NewQELXSec::Integrate(), genie::ReinSehgalRESXSec::Integrate(), genie::ReinSehgalRESXSecFast::Integrate(), genie::RESXSec::Integrate(), genie::SmithMonizQELCCXSec::Integrate(), and genie::SPPXSec::Integrate().