CMS 3D CMS Logo

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

Exponential. More...

#include <Functions.h>

Inheritance diagram for backgroundFunctionType2:
backgroundFunctionBase

Public Member Functions

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

Definition at line 1245 of file Functions.h.

Constructor & Destructor Documentation

backgroundFunctionType2::backgroundFunctionType2 ( 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 1252 of file Functions.h.

References backgroundFunctionBase::parNum_.

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

Member Function Documentation

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

Implements backgroundFunctionBase.

Definition at line 1255 of file Functions.h.

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

1256  {
1257  double Bgrp2 = parval[1];
1258  double norm = -(exp(-Bgrp2*upperLimit_) - exp(-Bgrp2*lowerLimit_))/Bgrp2;
1259  if( norm != 0 ) return exp(-Bgrp2*mass)/norm;
1260  else return 0.;
1261  }
virtual void backgroundFunctionType2::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 1262 of file Functions.h.

References backgroundFunctionBase::setPar().

1262  {
1263  double thisStep[] = {0.01, 0.01};
1264  TString thisParName[] = {"Bgr fraction", "Bgr slope"};
1265  if( muonType == 1 ) {
1266  double thisMini[] = {0.0, 0.};
1267  double thisMaxi[] = {1.0, 10.};
1268  this->setPar( Start, Step, Mini, Maxi, ind, parname, parBgrIt, parBgrOrderIt, thisStep, thisMini, thisMaxi, thisParName );
1269  } else {
1270  double thisMini[] = {0.0, 0.};
1271  double thisMaxi[] = {1.0, 10.};
1272  this->setPar( Start, Step, Mini, Maxi, ind, parname, parBgrIt, parBgrOrderIt, thisStep, thisMini, thisMaxi, thisParName );
1273  }
1274  }
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