CMS 3D CMS Logo

Public Member Functions | Protected Attributes

backgroundFunctionBase::FunctionForIntegral Class Reference

#include <Functions.h>

List of all members.

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 5681 of file Functions.h.


Constructor & Destructor Documentation

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

Definition at line 5684 of file Functions.h.

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

                                                                            :
      function_(function)
    {
      parval_ = new double[function_->parNum()];
      for( int i=0; i < function_->parNum(); ++i ) {
        parval_[i] = *(parBgrIt+i);
      }
    }
backgroundFunctionBase::FunctionForIntegral::~FunctionForIntegral ( ) [inline]

Definition at line 5693 of file Functions.h.

References parval_.

    {
      delete parval_;
    }

Member Function Documentation

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

Definition at line 5697 of file Functions.h.

References function_, and parval_.

    {
      // FIXME: this is a gross approximation. The function should be integrated in eta over the sample.
      return( (*function_)(parval_, *mass, 0.) );
    }

Member Data Documentation

Definition at line 5703 of file Functions.h.

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

Definition at line 5704 of file Functions.h.

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