CMS 3D CMS Logo

Classes | Functions
Functions.h File Reference
#include <iostream>
#include <vector>
#include <cmath>
#include "TMath.h"
#include "TString.h"
#include "TF1.h"
#include "TRandom.h"
#include "MuonAnalysis/MomentumScaleCalibration/interface/SigmaPtDiff.h"

Go to the source code of this file.

Classes

class  backgroundFunctionBase
 
class  backgroundFunctionType1
 Linear. More...
 
class  backgroundFunctionType10
 
class  backgroundFunctionType11
 Exponential binned in eta (Z, Run2012C PromptReco-v1 + PromptReco-v2) More...
 
class  backgroundFunctionType2
 Exponential. More...
 
class  backgroundFunctionType4
 Exponential with eta dependence. More...
 
class  backgroundFunctionType5
 Linear with eta dependence. More...
 
class  backgroundFunctionType6
 Exponential binned in eta. More...
 
class  backgroundFunctionType7
 Exponential binned in eta, much finer binning then type6. More...
 
class  backgroundFunctionType8
 
class  backgroundFunctionType9
 
class  backgroundFunctionBase::FunctionForIntegral
 
struct  ParameterSet
 
class  resolutionFunctionBase< T >
 
class  resolutionFunctionType0< T >
 
class  resolutionFunctionType45< T >
 
class  resolutionFunctionType46< T >
 
class  resolutionFunctionType47< T >
 
class  scaleFunctionBase< T >
 
class  scaleFunctionType0< T >
 
class  scaleFunctionType50< T >
 
class  scaleFunctionType64< T >
 
class  smearFunctionBase
 
class  smearFunctionType0
 
class  smearFunctionType1
 
class  smearFunctionType2
 
class  smearFunctionType3
 
class  smearFunctionType4
 
class  smearFunctionType5
 
class  smearFunctionType6
 
class  smearFunctionType7
 

Functions

backgroundFunctionBasebackgroundFunctionService (const int identifier, const double &lowerLimit, const double &upperLimit)
 Service to build the background functor corresponding to the passed identifier. More...
 
resolutionFunctionBase< double * > * resolutionFunctionService (const int identifier)
 Service to build the resolution functor corresponding to the passed identifier. More...
 
resolutionFunctionBase< std::vector< double > > * resolutionFunctionVecService (const int identifier)
 Service to build the resolution functor corresponding to the passed identifier when receiving a std::vector<double> More...
 
scaleFunctionBase< double * > * scaleFunctionService (const int identifier)
 Service to build the scale functor corresponding to the passed identifier. More...
 
scaleFunctionBase< std::vector< double > > * scaleFunctionVecService (const int identifier)
 Service to build the scale functor corresponding to the passed identifier when receiving a std::vector<double> More...
 
smearFunctionBasesmearFunctionService (const int identifier)
 Service to build the smearing functor corresponding to the passed identifier. More...
 

Function Documentation

backgroundFunctionBase* backgroundFunctionService ( const int  identifier,
const double &  lowerLimit,
const double &  upperLimit 
)

Service to build the background functor corresponding to the passed identifier.

Definition at line 62 of file Functions.cc.

References gather_cfg::cout, and cmsRelvalreport::exit.

Referenced by BackgroundFunction::BackgroundFunction(), BackgroundHandler::BackgroundHandler(), backgroundFunctionType8::fracVsEta(), and BackgroundFunction::readParameters().

63 {
64  switch ( identifier ) {
65  case ( 0 ): std::cout << "Error: background function type " << identifier << " not defined" << std::endl; exit(1); break;
66  case ( 1 ): return new backgroundFunctionType1(lowerLimit, upperLimit); break;
67  case ( 2 ): return new backgroundFunctionType2(lowerLimit, upperLimit); break;
68  // case ( 3 ): return new backgroundFunctionType3(lowerLimit, upperLimit); break;
69  case ( 4 ): return new backgroundFunctionType4(lowerLimit, upperLimit); break;
70  case ( 5 ): return new backgroundFunctionType5(lowerLimit, upperLimit); break;
71  case ( 6 ): return new backgroundFunctionType6(lowerLimit, upperLimit); break;
72  case ( 7 ): return new backgroundFunctionType7(lowerLimit, upperLimit); break;
73  case ( 8 ): return new backgroundFunctionType8(lowerLimit, upperLimit); break;
74  case ( 9 ): return new backgroundFunctionType9(lowerLimit, upperLimit); break; //Gul
75  case ( 10 ): return new backgroundFunctionType10(lowerLimit, upperLimit); break; //Gul
76  case ( 11 ): return new backgroundFunctionType11(lowerLimit, upperLimit); break; // SC
77  default: std::cout << "Error: undefined background function type = " << identifier << std::endl; exit(1); break;
78  }
79 }
Exponential binned in eta, much finer binning then type6.
Definition: Functions.h:1519
Exponential with eta dependence.
Definition: Functions.h:1350
Linear with eta dependence.
Definition: Functions.h:1389
Exponential binned in eta (Z, Run2012C PromptReco-v1 + PromptReco-v2)
Definition: Functions.h:2339
Exponential binned in eta.
Definition: Functions.h:1431
resolutionFunctionBase<double *>* resolutionFunctionService ( const int  identifier)

Service to build the resolution functor corresponding to the passed identifier.

Definition at line 38 of file Functions.cc.

References gather_cfg::cout, and cmsRelvalreport::exit.

Referenced by ErrorsAnalyzer::fillHistograms(), ErrorsPropagationAnalyzer::fillHistograms(), MuScleFit::MuScleFit(), ResolutionFunction::readParameters(), heppy::MuScleFitCorrector::readParameters(), ResolutionAnalyzer::ResolutionAnalyzer(), ResolutionFunction::ResolutionFunction(), and resolutionFunctionType47< T >::setParameters().

39 {
40  switch ( identifier ) {
41  case ( 0 ): return ( new resolutionFunctionType0<double *> ); break;
42  case ( 45 ): return ( new resolutionFunctionType45<double *> ); break;
43  case ( 46 ): return ( new resolutionFunctionType46<double *> ); break;
44  case ( 47 ): return ( new resolutionFunctionType47<double *> ); break;
45 
46  default: std::cout << "Error: undefined resolution type = " << identifier << std::endl; exit(1); break;
47  }
48 }
resolutionFunctionBase<std::vector<double> >* resolutionFunctionVecService ( const int  identifier)

Service to build the resolution functor corresponding to the passed identifier when receiving a std::vector<double>

Definition at line 50 of file Functions.cc.

References gather_cfg::cout, and cmsRelvalreport::exit.

Referenced by ErrorsAnalyzer::fillHistograms(), ErrorsPropagationAnalyzer::fillHistograms(), MuScleFit::MuScleFit(), ResolutionAnalyzer::ResolutionAnalyzer(), resolutionFunctionType47< T >::setParameters(), and TestCorrection::TestCorrection().

51 {
52  switch ( identifier ) {
53  case ( 0 ): return ( new resolutionFunctionType0<std::vector<double> > ); break;
54  case ( 45 ): return ( new resolutionFunctionType45<std::vector<double> > ); break;
55  case ( 46 ): return ( new resolutionFunctionType46<std::vector<double> > ); break;
56  case ( 47 ): return ( new resolutionFunctionType47<std::vector<double> > ); break;
57 
58  default: std::cout << "Error: undefined resolution type = " << identifier << std::endl; exit(1); break;
59  }
60  }
scaleFunctionBase<double * >* scaleFunctionService ( const int  identifier)

Service to build the scale functor corresponding to the passed identifier.

Definition at line 3 of file Functions.cc.

References gather_cfg::cout, and cmsRelvalreport::exit.

Referenced by MomentumScaleCorrector::MomentumScaleCorrector(), MuScleFit::MuScleFit(), MomentumScaleCorrector::readParameters(), heppy::MuScleFitCorrector::readParameters(), and scaleFunctionType64< T >::setParameters().

4 {
5  switch ( identifier ) {
6  case ( 0 ): return ( new scaleFunctionType0<double * > ); break;
7  case ( 50 ): return ( new scaleFunctionType50<double * > ); break;
8  case ( 64 ): return ( new scaleFunctionType64<double * > ); break;
9  default: std::cout << "Error: wrong identifier = " << identifier << std::endl; exit(1);
10  }
11 }
scaleFunctionBase<std::vector<double> >* scaleFunctionVecService ( const int  identifier)

Service to build the scale functor corresponding to the passed identifier when receiving a std::vector<double>

Definition at line 13 of file Functions.cc.

References gather_cfg::cout, and cmsRelvalreport::exit.

Referenced by MuScleFit::MuScleFit(), and scaleFunctionType64< T >::setParameters().

14 {
15  switch ( identifier ) {
16  case ( 0 ): return ( new scaleFunctionType0<std::vector<double> > ); break;
17  case ( 50 ): return ( new scaleFunctionType50<std::vector<double> > ); break;
18  case ( 64 ): return ( new scaleFunctionType64<std::vector<double> > ); break;
19  default: std::cout << "Error: wrong identifier = " << identifier << std::endl; exit(1);
20  }
21 }
smearFunctionBase* smearFunctionService ( const int  identifier)

Service to build the smearing functor corresponding to the passed identifier.

Definition at line 23 of file Functions.cc.

References gather_cfg::cout, and cmsRelvalreport::exit.

Referenced by MuScleFit::MuScleFit().

24 {
25  switch ( identifier ) {
26  case ( 0 ): return ( new smearFunctionType0 ); break;
27  case ( 1 ): return ( new smearFunctionType1 ); break;
28  case ( 2 ): return ( new smearFunctionType2 ); break;
29  case ( 3 ): return ( new smearFunctionType3 ); break;
30  case ( 4 ): return ( new smearFunctionType4 ); break;
31  case ( 5 ): return ( new smearFunctionType5 ); break;
32  case ( 6 ): return ( new smearFunctionType6 ); break;
33  case ( 7 ): return ( new smearFunctionType7 ); break;
34  default: std::cout << "Error: undefined smear type = " << identifier << std::endl; exit(1); break;
35  }
36 }