CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
backgroundFunctionType5 Class Reference

Linear with eta dependence. More...

#include <Functions.h>

Inheritance diagram for backgroundFunctionType5:
backgroundFunctionBase

Public Member Functions

 backgroundFunctionType5 (const double &lowerLimit, const double &upperLimit)
 
virtual double operator() (const double *parval, const double &mass, const double &eta) 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)
 This method is used to differentiate parameters among the different functions. More...
 
- Public Member Functions inherited from backgroundFunctionBase
 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 &eta1, const double &eta2) const
 
virtual int parNum () const
 
virtual ~backgroundFunctionBase ()
 

Additional Inherited Members

- Protected Member Functions inherited from backgroundFunctionBase
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 inherited from backgroundFunctionBase
FunctionForIntegralfunctionForIntegral_
 
double lowerLimit_
 
int parNum_
 
double upperLimit_
 

Detailed Description

Linear with eta dependence.

Definition at line 1389 of file Functions.h.

Constructor & Destructor Documentation

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

Returns the value of the linear function f(M) = a + b*M for M < -a/b, 0 otherwise.
Where a = 1 + c*eta*eta and b is chosen to be negative (background decreasing when M increases).

Definition at line 1396 of file Functions.h.

References backgroundFunctionBase::parNum_.

1396  :
1397  backgroundFunctionBase(lowerLimit, upperLimit)
1398  { this->parNum_ = 3; }
backgroundFunctionBase(const double &lowerLimit, const double &upperLimit)
Definition: Functions.h:1134

Member Function Documentation

virtual double backgroundFunctionType5::operator() ( const double *  parval,
const double &  mass,
const double &  eta 
) const
inlinevirtual

Implements backgroundFunctionBase.

Definition at line 1399 of file Functions.h.

References a, b, eta, backgroundFunctionBase::lowerLimit_, and backgroundFunctionBase::upperLimit_.

1400  {
1401  double b = parval[1];
1402  // double c = parval[2];
1403  double a = 1 + parval[2]*eta*eta;
1404 
1405  double norm = -(a*lowerLimit_ + b*lowerLimit_*lowerLimit_/2.);
1406 
1407  if( -a/b > upperLimit_ ) norm += a*upperLimit_ + b*upperLimit_*upperLimit_/2.;
1408  else norm += -a*a/(2*b);
1409 
1410  if( mass < -a/b && norm != 0 ) return (a + b*mass)/norm;
1411  else return 0;
1412  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
virtual void backgroundFunctionType5::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 
)
inlinevirtual

This method is used to differentiate parameters among the different functions.

Implements backgroundFunctionBase.

Definition at line 1413 of file Functions.h.

References backgroundFunctionBase::setPar().

1413  {
1414  double thisStep[] = {0.01, 0.01, 0.01};
1415  TString thisParName[] = {"Bgr fraction", "Constant", "Linear"};
1416  if( muonType == 1 ) {
1417  double thisMini[] = {0.0, 0., -300.};
1418  double thisMaxi[] = {1.0, 300., 0.};
1419  this->setPar( Start, Step, Mini, Maxi, ind, parname, parBgrIt, parBgrOrderIt, thisStep, thisMini, thisMaxi, thisParName );
1420  } else {
1421  double thisMini[] = {0.0, 0., -300.};
1422  double thisMaxi[] = {1.0, 300., 0.};
1423  this->setPar( Start, Step, Mini, Maxi, ind, parname, parBgrIt, parBgrOrderIt, thisStep, thisMini, thisMaxi, thisParName );
1424  }
1425  }
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.
Definition: Functions.h:1162