Public Member Functions | Private Attributes | List of all members
genie::utils::gsl::dXSec_Log_Wrapper Class Reference

#include <GSLXSecFunc.h>

Inheritance diagram for genie::utils::gsl::dXSec_Log_Wrapper:

Public Member Functions

 dXSec_Log_Wrapper (const ROOT::Math::IBaseFunctionMultiDim *fn, bool *ifLog, double *min, double *maxes)
 
 ~dXSec_Log_Wrapper ()
 
unsigned int NDim (void) const
 
double DoEval (const double *xin) const
 
ROOT::Math::IBaseFunctionMultiDim * Clone (void) const
 

Private Attributes

const ROOT::Math::IBaseFunctionMultiDim * fFn
 
boolfIfLog
 
double * fMins
 
double * fMaxes
 

Detailed Description

.....................................................................................

dXSec_Log_Wrapper Redistributes variables over a range to a e^-x distribution. Allows the integrator to use a logarithmic series of points while calling uniformly.

Definition at line 456 of file GSLXSecFunc.h.

Constructor & Destructor Documentation

genie::utils::gsl::dXSec_Log_Wrapper::dXSec_Log_Wrapper ( const ROOT::Math::IBaseFunctionMultiDim *  fn,
bool ifLog,
double *  min,
double *  maxes 
)

Definition at line 1042 of file GSLXSecFunc.cxx.

1044  :
1045  fFn(fn),
1046  fIfLog(ifLog),
1047  fMins(mins),
1048  fMaxes(maxes)
1049 {
1050 }
QAsciiDict< Entry > fn
const ROOT::Math::IBaseFunctionMultiDim * fFn
Definition: GSLXSecFunc.h:469
genie::utils::gsl::dXSec_Log_Wrapper::~dXSec_Log_Wrapper ( )

Definition at line 1051 of file GSLXSecFunc.cxx.

1052 {
1053 }

Member Function Documentation

ROOT::Math::IBaseFunctionMultiDim * genie::utils::gsl::dXSec_Log_Wrapper::Clone ( void  ) const

Definition at line 1082 of file GSLXSecFunc.cxx.

1083 {
1084  return new dXSec_Log_Wrapper(fFn,fIfLog,fMins,fMaxes);
1085 }
dXSec_Log_Wrapper(const ROOT::Math::IBaseFunctionMultiDim *fn, bool *ifLog, double *min, double *maxes)
const ROOT::Math::IBaseFunctionMultiDim * fFn
Definition: GSLXSecFunc.h:469
double genie::utils::gsl::dXSec_Log_Wrapper::DoEval ( const double *  xin) const

Definition at line 1062 of file GSLXSecFunc.cxx.

1063 {
1064  double * toEval = new double[this->NDim()];
1065  double a,b,x;
1066  for (unsigned int i = 0 ; i < this->NDim() ; i++ )
1067  {
1068  if (fIfLog[i]) {
1069  a = fMins[i];
1070  b = fMaxes[i];
1071  x = xin[i];
1072  toEval[i] = a + (b-a)/(constants::kNapierConst-1.) * (exp(x/(b-a)) - 1.);
1073  }
1074  else {
1075  toEval[i] = xin[i];
1076  }
1077  }
1078  double val = (*fFn)(toEval);
1079  delete[] toEval;
1080  return val;
1081 }
static const double kNapierConst
Definition: Constants.h:43
const double a
unsigned int NDim(void) const
static bool * b
Definition: config.cpp:1043
list x
Definition: train.py:276
unsigned int genie::utils::gsl::dXSec_Log_Wrapper::NDim ( void  ) const

Definition at line 1057 of file GSLXSecFunc.cxx.

1058 {
1059  return fFn->NDim();
1060 }
const ROOT::Math::IBaseFunctionMultiDim * fFn
Definition: GSLXSecFunc.h:469

Member Data Documentation

const ROOT::Math::IBaseFunctionMultiDim* genie::utils::gsl::dXSec_Log_Wrapper::fFn
private

Definition at line 469 of file GSLXSecFunc.h.

bool* genie::utils::gsl::dXSec_Log_Wrapper::fIfLog
private

Definition at line 470 of file GSLXSecFunc.h.

double* genie::utils::gsl::dXSec_Log_Wrapper::fMaxes
private

Definition at line 472 of file GSLXSecFunc.h.

double* genie::utils::gsl::dXSec_Log_Wrapper::fMins
private

Definition at line 471 of file GSLXSecFunc.h.


The documentation for this class was generated from the following files: