CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions.cc
Go to the documentation of this file.
2 
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 }
12 
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 }
22 
23 smearFunctionBase * smearFunctionService( const int identifier )
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 }
37 
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 }
49 
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  }
61 
62 backgroundFunctionBase * backgroundFunctionService( const int identifier, const double & lowerLimit, const double & upperLimit )
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 }
scaleFunctionBase< double * > * scaleFunctionService(const int identifier)
Service to build the scale functor corresponding to the passed identifier.
Definition: Functions.cc:3
Exponential binned in eta, much finer binning then type6.
Definition: Functions.h:1519
resolutionFunctionBase< std::vector< double > > * resolutionFunctionVecService(const int identifier)
Service to build the resolution functor corresponding to the passed identifier when receiving a std::...
Definition: Functions.cc:50
Exponential with eta dependence.
Definition: Functions.h:1350
smearFunctionBase * smearFunctionService(const int identifier)
Service to build the smearing functor corresponding to the passed identifier.
Definition: Functions.cc:23
scaleFunctionBase< std::vector< double > > * scaleFunctionVecService(const int identifier)
Service to build the scale functor corresponding to the passed identifier when receiving a std::vecto...
Definition: Functions.cc:13
Linear with eta dependence.
Definition: Functions.h:1389
resolutionFunctionBase< double * > * resolutionFunctionService(const int identifier)
Service to build the resolution functor corresponding to the passed identifier.
Definition: Functions.cc:38
Exponential binned in eta (Z, Run2012C PromptReco-v1 + PromptReco-v2)
Definition: Functions.h:2339
tuple cout
Definition: gather_cfg.py:145
backgroundFunctionBase * backgroundFunctionService(const int identifier, const double &lowerLimit, const double &upperLimit)
Service to build the background functor corresponding to the passed identifier.
Definition: Functions.cc:62
Exponential binned in eta.
Definition: Functions.h:1431