CMS 3D CMS Logo

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

Exponential binned in eta. More...

#include <Functions.h>

Inheritance diagram for backgroundFunctionType6:
backgroundFunctionBase

Public Member Functions

 backgroundFunctionType6 (const double &lowerLimit, const double &upperLimit)
 
virtual double fracVsEta (const double *parval, const double &eta1, const double &eta2) const
 
virtual double operator() (const double *parval, const double &mass, const double &eta) const
 
virtual double operator() (const double *parval, const double &mass, const double &eta1, const double &eta2) 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 TF1 * functionForIntegral (const std::vector< double >::const_iterator &parBgrIt) 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 binned in eta.

Definition at line 5938 of file Functions.h.

Constructor & Destructor Documentation

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

Definition at line 5940 of file Functions.h.

References backgroundFunctionBase::parNum_.

5940  :
5941  backgroundFunctionBase(lowerLimit, upperLimit)
5942  {
5943  this->parNum_ = 2;
5944  }
backgroundFunctionBase(const double &lowerLimit, const double &upperLimit)
Definition: Functions.h:5641

Member Function Documentation

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

Reimplemented from backgroundFunctionBase.

Definition at line 5994 of file Functions.h.

References gather_cfg::cout.

5995  {
5996  if( fabs(eta1) <= 1.3 && fabs(eta2) <= 1.3 ) {
5997  return (1.-0.910903);
5998  }
5999  else if( (fabs(eta1) <= 1.6 && fabs(eta1) > 1.3) && (fabs(eta2) <= 1.6 && fabs(eta2) > 1.3) ) {
6000  return (1.-0.801469);
6001  }
6002  else if( fabs(eta1) > 1.6 && fabs(eta2) > 1.6 ) {
6003  return (1.-0.658196);
6004  }
6005  else if( (fabs(eta1) <= 1.3 && (fabs(eta2) > 1.3 && fabs(eta2) <= 1.6)) ||
6006  (fabs(eta2) <= 1.3 && (fabs(eta1) > 1.3 && fabs(eta1) <= 1.6)) ) {
6007  return (1.-0.873411);
6008  }
6009  else if( (fabs(eta1) <= 1.3 && fabs(eta2) > 1.6) ||
6010  (fabs(eta2) <= 1.3 && fabs(eta1) > 1.6) ) {
6011  return (1.-0.784674);
6012  }
6013  else if( ((fabs(eta1) > 1.3 && fabs(eta1) <= 1.6) && fabs(eta2) > 1.6) ||
6014  ((fabs(eta2) > 1.3 && fabs(eta2) <= 1.6) && fabs(eta1) > 1.6) ) {
6015  return (1.-0.714398);
6016  }
6017  else {
6018  std::cout << "WARNING: this should not happen for eta1 = " << eta1 << " and eta2 = " << eta2 << std::endl;
6019  return (1.-0.658196);
6020  }
6021  }
tuple cout
Definition: gather_cfg.py:121
virtual double backgroundFunctionType6::operator() ( const double *  parval,
const double &  mass,
const double &  eta 
) const
inlinevirtual

Implements backgroundFunctionBase.

Definition at line 5945 of file Functions.h.

5945 {return 0.;}
virtual double backgroundFunctionType6::operator() ( const double *  parval,
const double &  mass,
const double &  eta1,
const double &  eta2 
) const
inlinevirtual

Reimplemented from backgroundFunctionBase.

Definition at line 5946 of file Functions.h.

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

5947  {
5948  double Bgrp2 = 0.;
5949  if( fabs(eta1) <= 1.3 && fabs(eta2) <= 1.3 ) {
5950  Bgrp2 = -1.20528;
5951  }
5952  else if( (fabs(eta1) <= 1.6 && fabs(eta1) > 1.3) && (fabs(eta2) <= 1.6 && fabs(eta2) > 1.3) ) {
5953  Bgrp2 = 0.234713;
5954  }
5955  else if( fabs(eta1) > 1.6 && fabs(eta2) > 1.6 ) {
5956  Bgrp2 = -0.667103;
5957  }
5958  else if( (fabs(eta1) <= 1.3 && (fabs(eta2) > 1.3 && fabs(eta2) <= 1.6)) ||
5959  (fabs(eta2) <= 1.3 && (fabs(eta1) > 1.3 && fabs(eta1) <= 1.6)) ) {
5960  Bgrp2 = -0.656904;
5961  }
5962  else if( (fabs(eta1) <= 1.3 && fabs(eta2) > 1.6) ||
5963  (fabs(eta2) <= 1.3 && fabs(eta1) > 1.6) ) {
5964  Bgrp2 = 0.155328;
5965  }
5966  else if( ((fabs(eta1) > 1.3 && fabs(eta1) <= 1.6) && fabs(eta2) > 1.6) ||
5967  ((fabs(eta2) > 1.3 && fabs(eta2) <= 1.6) && fabs(eta1) > 1.6) ) {
5968  Bgrp2 = -0.177154;
5969  }
5970  else {
5971  std::cout << "WARNING: this should not happen for eta1 = " << eta1 << " and eta2 = " << eta2 << std::endl;
5972  Bgrp2 = -0.667103;
5973  }
5974  Bgrp2*=-1.;
5975  double norm = -(exp(-Bgrp2*upperLimit_) - exp(-Bgrp2*lowerLimit_))/Bgrp2;
5976  if( norm != 0 ) return exp(-Bgrp2*mass)/norm;
5977  else return 0.;
5978 
5979  }
tuple mass
Definition: scaleCards.py:27
tuple cout
Definition: gather_cfg.py:121
virtual void backgroundFunctionType6::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 5980 of file Functions.h.

References backgroundFunctionBase::setPar().

5980  {
5981  double thisStep[] = {0.01, 0.01};
5982  TString thisParName[] = {"Bgr fraction", "Bgr slope"};
5983  if( muonType == 1 ) {
5984  double thisMini[] = {0.0, 0.};
5985  double thisMaxi[] = {1.0, 10.};
5986  this->setPar( Start, Step, Mini, Maxi, ind, parname, parBgrIt, parBgrOrderIt, thisStep, thisMini, thisMaxi, thisParName );
5987  } else {
5988  double thisMini[] = {0.0, 0.};
5989  double thisMaxi[] = {1.0, 10.};
5990  this->setPar( Start, Step, Mini, Maxi, ind, parname, parBgrIt, parBgrOrderIt, thisStep, thisMini, thisMaxi, thisParName );
5991  }
5992  }
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:5669