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.

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  }

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

◆ ~FunctionForIntegral()

backgroundFunctionBase::FunctionForIntegral::~FunctionForIntegral ( )
inline

Definition at line 1431 of file Functions.h.

1431 { delete parval_; }

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.

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  }

References function_, EgHLTOffHistBins_cfi::mass, and parval_.

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

mps_fire.i
i
Definition: mps_fire.py:355
backgroundFunctionBase::parNum
virtual int parNum() const
Definition: Functions.h:1377
backgroundFunctionBase::FunctionForIntegral::function_
const backgroundFunctionBase * function_
Definition: Functions.h:1438
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
backgroundFunctionBase::FunctionForIntegral::parval_
double * parval_
Definition: Functions.h:1439