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 1431 of file Functions.h.

Constructor & Destructor Documentation

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

Definition at line 1433 of file Functions.h.

References backgroundFunctionBase::parNum_.

1433  :
1434  backgroundFunctionBase(lowerLimit, upperLimit)
1435  {
1436  this->parNum_ = 2;
1437  }
backgroundFunctionBase(const double &lowerLimit, const double &upperLimit)
Definition: Functions.h:1134

Member Function Documentation

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

Reimplemented from backgroundFunctionBase.

Definition at line 1487 of file Functions.h.

References gather_cfg::cout.

1488  {
1489  if( fabs(eta1) <= 1.3 && fabs(eta2) <= 1.3 ) {
1490  return (1.-0.910903);
1491  }
1492  else if( (fabs(eta1) <= 1.6 && fabs(eta1) > 1.3) && (fabs(eta2) <= 1.6 && fabs(eta2) > 1.3) ) {
1493  return (1.-0.801469);
1494  }
1495  else if( fabs(eta1) > 1.6 && fabs(eta2) > 1.6 ) {
1496  return (1.-0.658196);
1497  }
1498  else if( (fabs(eta1) <= 1.3 && (fabs(eta2) > 1.3 && fabs(eta2) <= 1.6)) ||
1499  (fabs(eta2) <= 1.3 && (fabs(eta1) > 1.3 && fabs(eta1) <= 1.6)) ) {
1500  return (1.-0.873411);
1501  }
1502  else if( (fabs(eta1) <= 1.3 && fabs(eta2) > 1.6) ||
1503  (fabs(eta2) <= 1.3 && fabs(eta1) > 1.6) ) {
1504  return (1.-0.784674);
1505  }
1506  else if( ((fabs(eta1) > 1.3 && fabs(eta1) <= 1.6) && fabs(eta2) > 1.6) ||
1507  ((fabs(eta2) > 1.3 && fabs(eta2) <= 1.6) && fabs(eta1) > 1.6) ) {
1508  return (1.-0.714398);
1509  }
1510  else {
1511  std::cout << "WARNING: this should not happen for eta1 = " << eta1 << " and eta2 = " << eta2 << std::endl;
1512  return (1.-0.658196);
1513  }
1514  }
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 1438 of file Functions.h.

1438 {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 1439 of file Functions.h.

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

1440  {
1441  double Bgrp2 = 0.;
1442  if( fabs(eta1) <= 1.3 && fabs(eta2) <= 1.3 ) {
1443  Bgrp2 = -1.20528;
1444  }
1445  else if( (fabs(eta1) <= 1.6 && fabs(eta1) > 1.3) && (fabs(eta2) <= 1.6 && fabs(eta2) > 1.3) ) {
1446  Bgrp2 = 0.234713;
1447  }
1448  else if( fabs(eta1) > 1.6 && fabs(eta2) > 1.6 ) {
1449  Bgrp2 = -0.667103;
1450  }
1451  else if( (fabs(eta1) <= 1.3 && (fabs(eta2) > 1.3 && fabs(eta2) <= 1.6)) ||
1452  (fabs(eta2) <= 1.3 && (fabs(eta1) > 1.3 && fabs(eta1) <= 1.6)) ) {
1453  Bgrp2 = -0.656904;
1454  }
1455  else if( (fabs(eta1) <= 1.3 && fabs(eta2) > 1.6) ||
1456  (fabs(eta2) <= 1.3 && fabs(eta1) > 1.6) ) {
1457  Bgrp2 = 0.155328;
1458  }
1459  else if( ((fabs(eta1) > 1.3 && fabs(eta1) <= 1.6) && fabs(eta2) > 1.6) ||
1460  ((fabs(eta2) > 1.3 && fabs(eta2) <= 1.6) && fabs(eta1) > 1.6) ) {
1461  Bgrp2 = -0.177154;
1462  }
1463  else {
1464  std::cout << "WARNING: this should not happen for eta1 = " << eta1 << " and eta2 = " << eta2 << std::endl;
1465  Bgrp2 = -0.667103;
1466  }
1467  Bgrp2*=-1.;
1468  double norm = -(exp(-Bgrp2*upperLimit_) - exp(-Bgrp2*lowerLimit_))/Bgrp2;
1469  if( norm != 0 ) return exp(-Bgrp2*mass)/norm;
1470  else return 0.;
1471 
1472  }
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 1473 of file Functions.h.

References backgroundFunctionBase::setPar().

1473  {
1474  double thisStep[] = {0.01, 0.01};
1475  TString thisParName[] = {"Bgr fraction", "Bgr slope"};
1476  if( muonType == 1 ) {
1477  double thisMini[] = {0.0, 0.};
1478  double thisMaxi[] = {1.0, 10.};
1479  this->setPar( Start, Step, Mini, Maxi, ind, parname, parBgrIt, parBgrOrderIt, thisStep, thisMini, thisMaxi, thisParName );
1480  } else {
1481  double thisMini[] = {0.0, 0.};
1482  double thisMaxi[] = {1.0, 10.};
1483  this->setPar( Start, Step, Mini, Maxi, ind, parname, parBgrIt, parBgrOrderIt, thisStep, thisMini, thisMaxi, thisParName );
1484  }
1485  }
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