CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
Functions.cc File Reference
#include "MuonAnalysis/MomentumScaleCalibration/interface/Functions.h"

Go to the source code of this file.

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(), 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
tuple cout
Definition: gather_cfg.py:145
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.

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 }
tuple cout
Definition: gather_cfg.py:145
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(), 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  }
tuple cout
Definition: gather_cfg.py:145
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.

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 }
tuple cout
Definition: gather_cfg.py:145
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().

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 }
tuple cout
Definition: gather_cfg.py:145
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 }
tuple cout
Definition: gather_cfg.py:145