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 (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)
 

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)) {}

◆ RootIntegrator() [2/2]

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

Definition at line 139 of file NumericalIntegration.h.

139  {
140  type_ = o.type_;
141  absTol_ = o.absTol_;
142  relTol_ = o.relTol_;
143  size_ = o.size_;
144  rule_ = o.rule_;
145  integrator_.reset(new ROOT::Math::Integrator(type_, absTol_, relTol_, size_, rule_));
146  }

References absTol_, integrator_, EcalTangentSkim_cfg::o, relTol_, rule_, size_, and 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.

157  {
158  ROOT::Math::Functor1D wrapper(&f, &F::operator());
159  integrator_->SetFunction(wrapper);
160  return integrator_->Integral(a, b);
161  }

References a, b, f, integrator_, Utilities::operator, and wrapper.

◆ operator=()

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

Definition at line 147 of file NumericalIntegration.h.

147  {
148  type_ = o.type_;
149  absTol_ = o.absTol_;
150  relTol_ = o.relTol_;
151  size_ = o.size_;
152  rule_ = o.rule_;
153  integrator_.reset(new ROOT::Math::Integrator(type_, absTol_, relTol_, size_, rule_));
154  return *this;
155  }

References absTol_, integrator_, EcalTangentSkim_cfg::o, relTol_, rule_, size_, and 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
funct::RootIntegrator::type_
ROOT::Math::IntegrationOneDim::Type type_
Definition: NumericalIntegration.h:164
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
funct::RootIntegrator::size_
unsigned int size_
Definition: NumericalIntegration.h:166
wrapper
static HepMC::HEPEVT_Wrapper wrapper
Definition: BeamHaloProducer.cc:47
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
Utilities.operator
operator
Definition: Utilities.py:24
b
double b
Definition: hdecay.h:118
a
double a
Definition: hdecay.h:119
funct::RootIntegrator::relTol_
double relTol_
Definition: NumericalIntegration.h:165
type
type
Definition: HCALResponse.h:21
funct::RootIntegrator::rule_
unsigned int rule_
Definition: NumericalIntegration.h:166
funct::RootIntegrator::integrator_
std::unique_ptr< ROOT::Math::Integrator > integrator_
Definition: NumericalIntegration.h:167
funct::RootIntegrator::absTol_
double absTol_
Definition: NumericalIntegration.h:165
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443