CMS 3D CMS Logo

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

Exponential with eta dependence. More...

#include <Functions.h>

Inheritance diagram for backgroundFunctionType4:
backgroundFunctionBase

Public Member Functions

 backgroundFunctionType4 (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

Exponential with eta dependence.

Definition at line 1350 of file Functions.h.

Constructor & Destructor Documentation

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

In case of an exponential, we normalize it such that it has integral in any window equal to unity, and then, when adding together all the resonances, one gets a meaningful result for the overall background fraction.

Definition at line 1358 of file Functions.h.

References backgroundFunctionBase::parNum_.

1358  :
1359  backgroundFunctionBase(lowerLimit, upperLimit)
1360  { this->parNum_ = 4; }
backgroundFunctionBase(const double &lowerLimit, const double &upperLimit)
Definition: Functions.h:1134

Member Function Documentation

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

Implements backgroundFunctionBase.

Definition at line 1361 of file Functions.h.

References eta, create_public_lumi_plots::exp, backgroundFunctionBase::lowerLimit_, and backgroundFunctionBase::upperLimit_.

1362  {
1363  double Bgrp2 = parval[1] + parval[2]*eta*eta;
1364  double norm = -(exp(-Bgrp2*upperLimit_) - exp(-Bgrp2*lowerLimit_))/Bgrp2;
1365  if( norm != 0 ) return exp(-Bgrp2*mass)/norm;
1366  else return 0.;
1367  }
virtual void backgroundFunctionType4::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 1368 of file Functions.h.

References backgroundFunctionBase::setPar().

1368  {
1369  double thisStep[] = {0.01, 0.01, 0.01, 0.01};
1370  TString thisParName[] = {"Bgr fraction", "Bgr slope", "Bgr slope eta^2 dependence", "background fraction eta dependence"};
1371  if( muonType == 1 ) {
1372  double thisMini[] = {0.0, 0., 0., -1.};
1373  double thisMaxi[] = {1.0, 10., 10., 1.};
1374  this->setPar( Start, Step, Mini, Maxi, ind, parname, parBgrIt, parBgrOrderIt, thisStep, thisMini, thisMaxi, thisParName );
1375  } else {
1376  double thisMini[] = {0.0, 0., -1., -1.};
1377  double thisMaxi[] = {1.0, 10., 1., 1.};
1378  this->setPar( Start, Step, Mini, Maxi, ind, parname, parBgrIt, parBgrOrderIt, thisStep, thisMini, thisMaxi, thisParName );
1379  }
1380  }
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