CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
backgroundFunctionBase::FunctionForIntegral Class Reference

#include <Functions.h>

Public Member Functions

 FunctionForIntegral (const backgroundFunctionBase *function, const std::vector< double >::const_iterator &parBgrIt)
 
double operator() (const double *mass, const double *) const
 
 ~FunctionForIntegral ()
 

Protected Attributes

const backgroundFunctionBasefunction_
 
double * parval_
 

Detailed Description

Definition at line 1422 of file Functions.h.

Constructor & Destructor Documentation

◆ FunctionForIntegral()

backgroundFunctionBase::FunctionForIntegral::FunctionForIntegral ( const backgroundFunctionBase function,
const std::vector< double >::const_iterator &  parBgrIt 
)
inline

Definition at line 1424 of file Functions.h.

References function_, mps_fire::i, backgroundFunctionBase::parNum(), and parval_.

1425  : function_(function) {
1426  parval_ = new double[function_->parNum()];
1427  for (int i = 0; i < function_->parNum(); ++i) {
1428  parval_[i] = *(parBgrIt + i);
1429  }
1430  }
virtual int parNum() const
Definition: Functions.h:1377
const backgroundFunctionBase * function_
Definition: Functions.h:1438

◆ ~FunctionForIntegral()

backgroundFunctionBase::FunctionForIntegral::~FunctionForIntegral ( )
inline

Definition at line 1431 of file Functions.h.

References parval_.

Member Function Documentation

◆ operator()()

double backgroundFunctionBase::FunctionForIntegral::operator() ( const double *  mass,
const double *   
) const
inline

Definition at line 1432 of file Functions.h.

References function_, EgHLTOffHistBins_cfi::mass, and parval_.

1432  {
1433  // FIXME: this is a gross approximation. The function should be integrated in eta over the sample.
1434  return ((*function_)(parval_, *mass, 0.));
1435  }
const backgroundFunctionBase * function_
Definition: Functions.h:1438

Member Data Documentation

◆ function_

const backgroundFunctionBase* backgroundFunctionBase::FunctionForIntegral::function_
protected

Definition at line 1438 of file Functions.h.

Referenced by FunctionForIntegral(), and operator()().

◆ parval_

double* backgroundFunctionBase::FunctionForIntegral::parval_
protected

Definition at line 1439 of file Functions.h.

Referenced by FunctionForIntegral(), operator()(), and ~FunctionForIntegral().