CMS 3D CMS Logo

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

#include <Functions.h>

Inheritance diagram for backgroundFunctionType9:
backgroundFunctionBase

Public Member Functions

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

Definition at line 6525 of file Functions.h.

Constructor & Destructor Documentation

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

Definition at line 6527 of file Functions.h.

References backgroundFunctionBase::parNum_.

6527  :
6528  backgroundFunctionBase(lowerLimit, upperLimit)
6529  {
6530  this->parNum_ = 2;
6531  }
backgroundFunctionBase(const double &lowerLimit, const double &upperLimit)
Definition: Functions.h:5641

Member Function Documentation

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

Reimplemented from backgroundFunctionBase.

Definition at line 6597 of file Functions.h.

6599  {
6600  // std::cout << "Eta1 " << eta1 << " eta2 = " << eta2 << std::endl;
6601 if( (fabs(eta1) >= 0. && fabs(eta1) < 0.85) && (fabs(eta2) >= 0. && fabs(eta2) < 0.85) ) {
6602  return (1.-0.893683);
6603 }
6604 if( (fabs(eta1) >= 0.85 && fabs(eta1) < 1.25) && (fabs(eta2) >= 0.85 && fabs(eta2) < 1.25) ) {
6605  return (1.-0.888968);
6606 }
6607 if( (fabs(eta1) >= 1.25 && fabs(eta1) < 1.6) && (fabs(eta2) >= 1.25 && fabs(eta2) < 1.6) ) {
6608  return (1.-0.885926);
6609 }
6610 if( (fabs(eta1) >= 1.6 && fabs(eta1) < 1000) && (fabs(eta2) >= 1.6 && fabs(eta2) < 1000) ) {
6611  return (1.-0.866615);
6612 }
6613 if( ((fabs(eta1) >= 0. && fabs(eta1) < 0.85) && (fabs(eta2) >= 0.85 && fabs(eta2) < 1.25)) ||
6614  ((fabs(eta2) >= 0. && fabs(eta2) < 0.85) && (fabs(eta1) >= 0.85 && fabs(eta1) < 1.25)) ) {
6615  return (1.-0.892856);
6616 }
6617 if( ((fabs(eta1) >= 0. && fabs(eta1) < 0.85) && (fabs(eta2) >= 1.25 && fabs(eta2) < 1.6)) ||
6618  ((fabs(eta2) >= 0. && fabs(eta2) < 0.85) && (fabs(eta1) >= 1.25 && fabs(eta1) < 1.6)) ) {
6619  return (1.-0.884864);
6620 }
6621 if( ((fabs(eta1) >= 0. && fabs(eta1) < 0.85) && (fabs(eta2) >= 1.6 && fabs(eta2) < 1000)) ||
6622  ((fabs(eta2) >= 0. && fabs(eta2) < 0.85) && (fabs(eta1) >= 1.6 && fabs(eta1) < 1000)) ) {
6623  return (1.-0.6);
6624 }
6625 if( ((fabs(eta1) >= 0.85 && fabs(eta1) < 1.25) && (fabs(eta2) >= 1.25 && fabs(eta2) < 1.6)) ||
6626  ((fabs(eta2) >= 0.85 && fabs(eta2) < 1.25) && (fabs(eta1) >= 1.25 && fabs(eta1) < 1.6)) ) {
6627  return (1.-0.894739);
6628 }
6629 if( ((fabs(eta1) >= 0.85 && fabs(eta1) < 1.25) && (fabs(eta2) >= 1.6 && fabs(eta2) < 1000)) ||
6630  ((fabs(eta2) >= 0.85 && fabs(eta2) < 1.25) && (fabs(eta1) >= 1.6 && fabs(eta1) < 1000)) ) {
6631  return (1.-0.880597);
6632 }
6633 if( ((fabs(eta1) >= 1.25 && fabs(eta1) < 1.6) && (fabs(eta2) >= 1.6 && fabs(eta2) < 1000)) ||
6634  ((fabs(eta2) >= 1.25 && fabs(eta2) < 1.6) && (fabs(eta1) >= 1.6 && fabs(eta1) < 1000)) ) {
6635  return (1.-0.869165);
6636 }
6637 if( ((fabs(eta1) >= 1.25 && fabs(eta1) < 1.6) && (fabs(eta2) >= 1.6 && fabs(eta2) < 1000)) ||
6638  ((fabs(eta2) >= 1.25 && fabs(eta2) < 1.6) && (fabs(eta1) >= 1.6 && fabs(eta1) < 1000)) ) {
6639  return (1.-0.869165);
6640 }
6641  return 0;}
virtual double backgroundFunctionType9::operator() ( const double *  parval,
const double &  mass,
const double &  eta 
) const
inlinevirtual

Implements backgroundFunctionBase.

Definition at line 6532 of file Functions.h.

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

Reimplemented from backgroundFunctionBase.

Definition at line 6533 of file Functions.h.

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

6534  {
6535  double Bgrp2 = 0.;
6536 
6537 if( (fabs(eta1) >= 0. && fabs(eta1) < 0.85) && (fabs(eta2) >= 0. && fabs(eta2) < 0.85) ) {
6538  Bgrp2 = (-1.80833);
6539 }
6540 else if( (fabs(eta1) >= 0.85 && fabs(eta1) < 1.25) && (fabs(eta2) >= 0.85 && fabs(eta2) < 1.25) ) {
6541  Bgrp2 = (-1.98281);
6542 }
6543 else if( (fabs(eta1) >= 1.25 && fabs(eta1) < 1.6) && (fabs(eta2) >= 1.25 && fabs(eta2) < 1.6) ) {
6544  Bgrp2 = (-1.79632);
6545 }
6546 else if( (fabs(eta1) >= 1.6 && fabs(eta1) < 1000) && (fabs(eta2) >= 1.6 && fabs(eta2) < 1000) ) {
6547  Bgrp2 = (-1.14645);
6548 }
6549 else if( ((fabs(eta1) >= 0. && fabs(eta1) < 0.85) && (fabs(eta2) >= 0.85 && fabs(eta2) < 1.25)) ||
6550  ((fabs(eta2) >= 0. && fabs(eta2) < 0.85) && (fabs(eta1) >= 0.85 && fabs(eta1) < 1.25)) ) {
6551  Bgrp2 = (-1.55747);
6552 }
6553 else if( ((fabs(eta1) >= 0. && fabs(eta1) < 0.85) && (fabs(eta2) >= 1.25 && fabs(eta2) < 1.6)) ||
6554  ((fabs(eta2) >= 0. && fabs(eta2) < 0.85) && (fabs(eta1) >= 1.25 && fabs(eta1) < 1.6)) ) {
6555  Bgrp2 = (-0.337598);
6556 }
6557 else if( ((fabs(eta1) >= 0. && fabs(eta1) < 0.85) && (fabs(eta2) >= 1.6 && fabs(eta2) < 1000)) ||
6558  ((fabs(eta2) >= 0. && fabs(eta2) < 0.85) && (fabs(eta1) >= 1.6 && fabs(eta1) < 1000)) ) {
6559  Bgrp2 = (5.36513);
6560 }
6561 else if( ((fabs(eta1) >= 0.85 && fabs(eta1) < 1.25) && (fabs(eta2) >= 1.25 && fabs(eta2) < 1.6)) ||
6562  ((fabs(eta2) >= 0.85 && fabs(eta2) < 1.25) && (fabs(eta1) >= 1.25 && fabs(eta1) < 1.6)) ) {
6563  Bgrp2 = (-1.44363);
6564 }
6565 else if( ((fabs(eta1) >= 0.85 && fabs(eta1) < 1.25) && (fabs(eta2) >= 1.6 && fabs(eta2) < 1000)) ||
6566  ((fabs(eta2) >= 0.85 && fabs(eta2) < 1.25) && (fabs(eta1) >= 1.6 && fabs(eta1) < 1000)) ) {
6567  Bgrp2 = (-0.54614);
6568 }
6569 else if( ((fabs(eta1) >= 1.25 && fabs(eta1) < 1.6) && (fabs(eta2) >= 1.6 && fabs(eta2) < 1000)) ||
6570  ((fabs(eta2) >= 1.25 && fabs(eta2) < 1.6) && (fabs(eta1) >= 1.6 && fabs(eta1) < 1000)) ) {
6571  Bgrp2 = (-1.41059);
6572 }
6573 else if( ((fabs(eta1) >= 1.25 && fabs(eta1) < 1.6) && (fabs(eta2) >= 1.6 && fabs(eta2) < 1000)) ||
6574  ((fabs(eta2) >= 1.25 && fabs(eta2) < 1.6) && (fabs(eta1) >= 1.6 && fabs(eta1) < 1000)) ) {
6575  Bgrp2 = (-1.41059);
6576 }
6577  Bgrp2*=-1.;
6578  double norm = -(exp(-Bgrp2*upperLimit_) - exp(-Bgrp2*lowerLimit_))/Bgrp2;
6579  if( norm != 0 ) return exp(-Bgrp2*mass)/norm;
6580  else return 0.;
6581 
6582  }
tuple mass
Definition: scaleCards.py:27
virtual void backgroundFunctionType9::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 6583 of file Functions.h.

References backgroundFunctionBase::setPar().

6583  {
6584  double thisStep[] = {0.01, 0.01};
6585  TString thisParName[] = {"Bgr fraction", "Bgr slope"};
6586  if( muonType == 1 ) {
6587  double thisMini[] = {0.0, 0.};
6588  double thisMaxi[] = {1.0, 10.};
6589  this->setPar( Start, Step, Mini, Maxi, ind, parname, parBgrIt, parBgrOrderIt, thisStep, thisMini, thisMaxi, thisParName );
6590  } else {
6591  double thisMini[] = {0.0, 0.};
6592  double thisMaxi[] = {1.0, 10.};
6593  this->setPar( Start, Step, Mini, Maxi, ind, parname, parBgrIt, parBgrOrderIt, thisStep, thisMini, thisMaxi, thisParName );
6594  }
6595  }
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