CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
funct::RootIntegrator Struct Reference

#include <NumericalIntegration.h>

Public Member Functions

template<typename F >
double operator() (const F &f, double a, double b) const
 
RootIntegratoroperator= (const RootIntegrator &o)
 
 RootIntegrator (ROOT::Math::IntegrationOneDim::Type type=ROOT::Math::IntegrationOneDim::kADAPTIVE, double absTol=1e-9, double relTol=1e-6, unsigned int size=1000, unsigned int rule=3)
 
 RootIntegrator (const RootIntegrator &o)
 

Private Attributes

double absTol_
 
std::auto_ptr
< ROOT::Math::Integrator > 
integrator_
 
double relTol_
 
unsigned int rule_
 
unsigned int size_
 
ROOT::Math::IntegrationOneDim::Type type_
 

Detailed Description

Definition at line 121 of file NumericalIntegration.h.

Constructor & Destructor Documentation

funct::RootIntegrator::RootIntegrator ( ROOT::Math::IntegrationOneDim::Type  type = ROOT::Math::IntegrationOneDim::kADAPTIVE,
double  absTol = 1e-9,
double  relTol = 1e-6,
unsigned int  size = 1000,
unsigned int  rule = 3 
)
inline

Definition at line 122 of file NumericalIntegration.h.

123  :
124  type_(type), absTol_(absTol), relTol_(relTol), size_(size), rule_(rule),
125  integrator_(new ROOT::Math::Integrator(type, absTol, relTol, size, rule)) { }
type
Definition: HCALResponse.h:22
ROOT::Math::IntegrationOneDim::Type type_
tuple size
Write out results.
std::auto_ptr< ROOT::Math::Integrator > integrator_
funct::RootIntegrator::RootIntegrator ( const RootIntegrator o)
inline

Definition at line 126 of file NumericalIntegration.h.

References absTol_, integrator_, relTol_, rule_, size_, and type_.

126  {
127  type_ = o.type_;
128  absTol_ = o.absTol_; relTol_ = o.relTol_;
129  size_ = o.size_; rule_ = o.rule_;
130  integrator_.reset(new ROOT::Math::Integrator(type_, absTol_, relTol_, size_, rule_));
131  }
ROOT::Math::IntegrationOneDim::Type type_
std::auto_ptr< ROOT::Math::Integrator > integrator_

Member Function Documentation

template<typename F >
double funct::RootIntegrator::operator() ( const F f,
double  a,
double  b 
) const
inline

Definition at line 140 of file NumericalIntegration.h.

References integrator_, cppFunctionSkipper::operator, and wrapper.

140  {
141  ROOT::Math::Functor1D wrapper(&f, &F::operator());
142  integrator_->SetFunction(wrapper);
143  return integrator_->Integral(a, b);
144  }
double f[11][100]
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
std::auto_ptr< ROOT::Math::Integrator > integrator_
static HepMC::HEPEVT_Wrapper wrapper
RootIntegrator& funct::RootIntegrator::operator= ( const RootIntegrator o)
inline

Definition at line 132 of file NumericalIntegration.h.

References absTol_, integrator_, relTol_, rule_, size_, and type_.

132  {
133  type_ = o.type_;
134  absTol_ = o.absTol_; relTol_ = o.relTol_;
135  size_ = o.size_; rule_ = o.rule_;
136  integrator_.reset(new ROOT::Math::Integrator(type_, absTol_, relTol_, size_, rule_));
137  return * this;
138  }
ROOT::Math::IntegrationOneDim::Type type_
std::auto_ptr< ROOT::Math::Integrator > integrator_

Member Data Documentation

double funct::RootIntegrator::absTol_
private

Definition at line 147 of file NumericalIntegration.h.

Referenced by operator=(), and RootIntegrator().

std::auto_ptr<ROOT::Math::Integrator> funct::RootIntegrator::integrator_
mutableprivate

Definition at line 149 of file NumericalIntegration.h.

Referenced by operator()(), operator=(), and RootIntegrator().

double funct::RootIntegrator::relTol_
private

Definition at line 147 of file NumericalIntegration.h.

Referenced by operator=(), and RootIntegrator().

unsigned int funct::RootIntegrator::rule_
private

Definition at line 148 of file NumericalIntegration.h.

Referenced by operator=(), and RootIntegrator().

unsigned int funct::RootIntegrator::size_
private

Definition at line 148 of file NumericalIntegration.h.

Referenced by operator=(), and RootIntegrator().

ROOT::Math::IntegrationOneDim::Type funct::RootIntegrator::type_
private