GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Classes | Functions
genie::utils::gsl Namespace Reference

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

Namespaces

 wrap
 

Classes

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

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

Function Documentation

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

Definition at line 23 of file GSLUtils.cxx.

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

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

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
string ToLower(string input)
Definition: StringUtils.cxx:98
#define pWARN
Definition: Messenger.h:60
ROOT::Math::IntegrationMultiDim::Type genie::utils::gsl::IntegrationNDimTypeFromString ( string  type)

Definition at line 59 of file GSLUtils.cxx.

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::COHXSecAR::Integrate(), genie::DISXSec::Integrate(), genie::RESXSec::Integrate(), genie::COHXSec::Integrate(), genie::HEDISXSec::Integrate(), genie::DMDISXSec::Integrate(), genie::HELeptonXSec::Integrate(), genie::AlamSimoAtharVacasSKXSec::Integrate(), genie::MECXSec::Integrate(), genie::DFRXSec::Integrate(), genie::SPPXSec::Integrate(), genie::ReinSehgalRESXSec::Integrate(), genie::SmithMonizQELCCXSec::Integrate(), genie::ReinSehgalRESXSecFast::Integrate(), and genie::NewQELXSec::Integrate().

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 }
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
string ToLower(string input)
Definition: StringUtils.cxx:98
#define pWARN
Definition: Messenger.h:60