CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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::unique_ptr
< ROOT::Math::Integrator > 
integrator_
 
double relTol_
 
unsigned int rule_
 
unsigned int size_
 
ROOT::Math::IntegrationOneDim::Type type_
 

Detailed Description

Definition at line 127 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 128 of file NumericalIntegration.h.

133  : type_(type),
134  absTol_(absTol),
135  relTol_(relTol),
136  size_(size),
137  rule_(rule),
138  integrator_(new ROOT::Math::Integrator(type, absTol, relTol, size, rule)) {}
std::unique_ptr< ROOT::Math::Integrator > integrator_
ROOT::Math::IntegrationOneDim::Type type_
tuple size
Write out results.
funct::RootIntegrator::RootIntegrator ( const RootIntegrator o)
inline

Definition at line 139 of file NumericalIntegration.h.

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

139  {
140  type_ = o.type_;
141  absTol_ = o.absTol_;
142  relTol_ = o.relTol_;
143  size_ = o.size_;
144  rule_ = o.rule_;
145  integrator_ = std::make_unique<ROOT::Math::Integrator>(type_, absTol_, relTol_, size_, rule_);
146  }
std::unique_ptr< ROOT::Math::Integrator > integrator_
ROOT::Math::IntegrationOneDim::Type type_

Member Function Documentation

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

Definition at line 157 of file NumericalIntegration.h.

References integrator_, Utilities::operator, and wrapper.

157  {
158  ROOT::Math::Functor1D wrapper(&f, &F::operator());
159  integrator_->SetFunction(wrapper);
160  return integrator_->Integral(a, b);
161  }
std::unique_ptr< ROOT::Math::Integrator > integrator_
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119
static HepMC::HEPEVT_Wrapper wrapper
RootIntegrator& funct::RootIntegrator::operator= ( const RootIntegrator o)
inline

Definition at line 147 of file NumericalIntegration.h.

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

147  {
148  type_ = o.type_;
149  absTol_ = o.absTol_;
150  relTol_ = o.relTol_;
151  size_ = o.size_;
152  rule_ = o.rule_;
153  integrator_ = std::make_unique<ROOT::Math::Integrator>(type_, absTol_, relTol_, size_, rule_);
154  return *this;
155  }
std::unique_ptr< ROOT::Math::Integrator > integrator_
ROOT::Math::IntegrationOneDim::Type type_

Member Data Documentation

double funct::RootIntegrator::absTol_
private

Definition at line 165 of file NumericalIntegration.h.

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

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

Definition at line 167 of file NumericalIntegration.h.

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

double funct::RootIntegrator::relTol_
private

Definition at line 165 of file NumericalIntegration.h.

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

unsigned int funct::RootIntegrator::rule_
private

Definition at line 166 of file NumericalIntegration.h.

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

unsigned int funct::RootIntegrator::size_
private

Definition at line 166 of file NumericalIntegration.h.

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

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