CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Protected Member Functions | Protected Attributes
backgroundFunctionBase Class Referenceabstract

#include <Functions.h>

Inheritance diagram for backgroundFunctionBase:
backgroundFunctionType1 backgroundFunctionType10 backgroundFunctionType11 backgroundFunctionType2 backgroundFunctionType4 backgroundFunctionType5 backgroundFunctionType6 backgroundFunctionType7 backgroundFunctionType8 backgroundFunctionType9

Classes

class  FunctionForIntegral
 

Public Member Functions

 backgroundFunctionBase (const double &lowerLimit, const double &upperLimit)
 
virtual double fracVsEta (const double *parval, const double &eta1, const double &eta2) const
 
virtual TF1 * functionForIntegral (const std::vector< double >::const_iterator &parBgrIt) const
 
virtual double operator() (const double *parval, const double &mass, const double &eta) const =0
 
virtual double operator() (const double *parval, const double &mass, const double &eta1, const double &eta2) const
 
virtual int parNum () const
 
virtual void setParameters (double *Start, double *Step, double *Mini, double *Maxi, int *ind, TString *parname, const std::vector< double >::const_iterator &parBgrIt, const std::vector< int >::const_iterator &parBgrOrderIt, const int muonType)=0
 This method is used to differentiate parameters among the different functions. More...
 
virtual ~backgroundFunctionBase ()
 

Protected Member Functions

virtual void setPar (double *Start, double *Step, double *Mini, double *Maxi, int *ind, TString *parname, const std::vector< double >::const_iterator &parBgrIt, const std::vector< int >::const_iterator &parBgrOrderIt, double *thisStep, double *thisMini, double *thisMaxi, TString *thisParName)
 This method sets the parameters. More...
 

Protected Attributes

FunctionForIntegralfunctionForIntegral_
 
double lowerLimit_
 
int parNum_
 
double upperLimit_
 

Detailed Description

Background functors.
MuScleFit uses different background functions for each resonance. This is done because the background shape can change from a region to another so that it is not well described just one of the following functions. Since we are only interested in getting the correct shape and fraction in the resonance region we can split it in several parts and fit them separately.

When fitting the background function:

Definition at line 1368 of file Functions.h.

Constructor & Destructor Documentation

◆ backgroundFunctionBase()

backgroundFunctionBase::backgroundFunctionBase ( const double &  lowerLimit,
const double &  upperLimit 
)
inline

Definition at line 1370 of file Functions.h.

1371  : lowerLimit_(lowerLimit), upperLimit_(upperLimit) {}

◆ ~backgroundFunctionBase()

virtual backgroundFunctionBase::~backgroundFunctionBase ( )
inlinevirtual

Definition at line 1372 of file Functions.h.

1372 { delete functionForIntegral_; };

References functionForIntegral_.

Member Function Documentation

◆ fracVsEta()

virtual double backgroundFunctionBase::fracVsEta ( const double *  parval,
const double &  eta1,
const double &  eta2 
) const
inlinevirtual

◆ functionForIntegral()

virtual TF1* backgroundFunctionBase::functionForIntegral ( const std::vector< double >::const_iterator &  parBgrIt) const
inlinevirtual

Definition at line 1388 of file Functions.h.

1388  {
1389  functionForIntegral_ = new FunctionForIntegral(this, parBgrIt);
1390  TF1* backgroundFunctionForIntegral =
1391  new TF1("backgroundFunctionForIntegral", functionForIntegral_, lowerLimit_, upperLimit_, this->parNum_);
1392  return (backgroundFunctionForIntegral);
1393  }

References functionForIntegral_, lowerLimit_, parNum_, tools::TF1, and upperLimit_.

◆ operator()() [1/2]

virtual double backgroundFunctionBase::operator() ( const double *  parval,
const double &  mass,
const double &  eta 
) const
pure virtual

◆ operator()() [2/2]

virtual double backgroundFunctionBase::operator() ( const double *  parval,
const double &  mass,
const double &  eta1,
const double &  eta2 
) const
inlinevirtual

◆ parNum()

virtual int backgroundFunctionBase::parNum ( ) const
inlinevirtual

Definition at line 1377 of file Functions.h.

1377 { return parNum_; }

References parNum_.

Referenced by backgroundFunctionBase::FunctionForIntegral::FunctionForIntegral().

◆ setPar()

virtual void backgroundFunctionBase::setPar ( double *  Start,
double *  Step,
double *  Mini,
double *  Maxi,
int *  ind,
TString *  parname,
const std::vector< double >::const_iterator &  parBgrIt,
const std::vector< int >::const_iterator &  parBgrOrderIt,
double *  thisStep,
double *  thisMini,
double *  thisMaxi,
TString *  thisParName 
)
inlineprotectedvirtual

This method sets the parameters.

Definition at line 1401 of file Functions.h.

1412  {
1413  for (int iPar = 0; iPar < this->parNum_; ++iPar) {
1414  Start[iPar] = *(parBgrIt + iPar);
1415  Step[iPar] = thisStep[iPar];
1416  Mini[iPar] = thisMini[iPar];
1417  Maxi[iPar] = thisMaxi[iPar];
1418  ind[iPar] = *(parBgrOrderIt + iPar);
1419  // EM 2012.05.22 this line is crashing cmsRun (need to be fixed) parname[iPar] = thisParName[iPar];
1420  }
1421  }

References parNum_.

Referenced by backgroundFunctionType1::setParameters(), backgroundFunctionType2::setParameters(), backgroundFunctionType4::setParameters(), backgroundFunctionType5::setParameters(), backgroundFunctionType6::setParameters(), backgroundFunctionType7::setParameters(), backgroundFunctionType8::setParameters(), backgroundFunctionType9::setParameters(), backgroundFunctionType10::setParameters(), and backgroundFunctionType11::setParameters().

◆ setParameters()

virtual void backgroundFunctionBase::setParameters ( double *  Start,
double *  Step,
double *  Mini,
double *  Maxi,
int *  ind,
TString *  parname,
const std::vector< double >::const_iterator &  parBgrIt,
const std::vector< int >::const_iterator &  parBgrOrderIt,
const int  muonType 
)
pure virtual

Member Data Documentation

◆ functionForIntegral_

FunctionForIntegral* backgroundFunctionBase::functionForIntegral_
mutableprotected

Definition at line 1441 of file Functions.h.

Referenced by functionForIntegral(), and ~backgroundFunctionBase().

◆ lowerLimit_

double backgroundFunctionBase::lowerLimit_
protected

◆ parNum_

int backgroundFunctionBase::parNum_
protected

◆ upperLimit_

double backgroundFunctionBase::upperLimit_
protected
backgroundFunctionBase::operator()
virtual double operator()(const double *parval, const double &mass, const double &eta) const =0
HLT_2018_cff.eta1
eta1
Definition: HLT_2018_cff.py:8220
tools.TF1
TF1
Definition: tools.py:23
backgroundFunctionBase::functionForIntegral_
FunctionForIntegral * functionForIntegral_
Definition: Functions.h:1441
backgroundFunctionBase::upperLimit_
double upperLimit_
Definition: Functions.h:1399
backgroundFunctionBase::lowerLimit_
double lowerLimit_
Definition: Functions.h:1398
backgroundFunctionBase::parNum_
int parNum_
Definition: Functions.h:1397
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34