CMS 3D CMS Logo

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

Linear. More...

#include <Functions.h>

Inheritance diagram for backgroundFunctionType1:
backgroundFunctionBase

Public Member Functions

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

Definition at line 1204 of file Functions.h.

Constructor & Destructor Documentation

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

Returns the value of the linear function f(M) = 1 + b*M for M < -1/b, 0 otherwise.
b is chosen to be negative (background decreasing when M increases).
Note that this form describes only cases with a != 0 (keep in mind that the relative height with respect to the signal is controlled by the fraction parameter).

Definition at line 1213 of file Functions.h.

References backgroundFunctionBase::parNum_.

1213  :
1214  backgroundFunctionBase(lowerLimit, upperLimit)
1215  { this->parNum_ = 2; }
backgroundFunctionBase(const double &lowerLimit, const double &upperLimit)
Definition: Functions.h:1134

Member Function Documentation

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

Implements backgroundFunctionBase.

Definition at line 1216 of file Functions.h.

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

1217  {
1218  double a = 1.;
1219  double b = parval[1];
1220 
1221  double norm = -(a*lowerLimit_ + b*lowerLimit_*lowerLimit_/2.);
1222 
1223  if( -a/b > upperLimit_ ) norm += a*upperLimit_ + b*upperLimit_*upperLimit_/2.;
1224  else norm += -a*a/(2*b);
1225 
1226  if( mass < -a/b && norm != 0 ) return (a + b*mass)/norm;
1227  else return 0;
1228  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
virtual void backgroundFunctionType1::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 1229 of file Functions.h.

References backgroundFunctionBase::setPar().

1229  {
1230  double thisStep[] = {0.01, 0.01};
1231  TString thisParName[] = {"Constant", "Linear"};
1232  if( muonType == 1 ) {
1233  double thisMini[] = {0.0, -300.};
1234  double thisMaxi[] = {1.0, 0.};
1235  this->setPar( Start, Step, Mini, Maxi, ind, parname, parBgrIt, parBgrOrderIt, thisStep, thisMini, thisMaxi, thisParName );
1236  } else {
1237  double thisMini[] = {0.0, -300.};
1238  double thisMaxi[] = {1.0, 0.};
1239  this->setPar( Start, Step, Mini, Maxi, ind, parname, parBgrIt, parBgrOrderIt, thisStep, thisMini, thisMaxi, thisParName );
1240  }
1241  }
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