CMS 3D CMS Logo

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

◆ RootIntegrator() [1/2]

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)) {}
size
Write out results.
std::unique_ptr< ROOT::Math::Integrator > integrator_
ROOT::Math::IntegrationOneDim::Type type_

◆ RootIntegrator() [2/2]

funct::RootIntegrator::RootIntegrator ( const RootIntegrator o)
inline

Definition at line 139 of file NumericalIntegration.h.

References absTol_, integrator_, EcalTangentSkim_cfg::o, 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

◆ operator()()

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 a, b, f, 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 f[11][100]
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
static HepMC::HEPEVT_Wrapper wrapper

◆ operator=()

RootIntegrator& funct::RootIntegrator::operator= ( const RootIntegrator o)
inline

Definition at line 147 of file NumericalIntegration.h.

References absTol_, integrator_, EcalTangentSkim_cfg::o, 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

◆ absTol_

double funct::RootIntegrator::absTol_
private

Definition at line 165 of file NumericalIntegration.h.

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

◆ integrator_

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

Definition at line 167 of file NumericalIntegration.h.

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

◆ relTol_

double funct::RootIntegrator::relTol_
private

Definition at line 165 of file NumericalIntegration.h.

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

◆ rule_

unsigned int funct::RootIntegrator::rule_
private

Definition at line 166 of file NumericalIntegration.h.

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

◆ size_

unsigned int funct::RootIntegrator::size_
private

Definition at line 166 of file NumericalIntegration.h.

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

◆ type_

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