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 ( 1 ): return ( new scaleFunctionType1<double * > ); break;
8  case ( 2 ): return ( new scaleFunctionType2<double * > ); break;
9  case ( 3 ): return ( new scaleFunctionType3<double * > ); break;
10  case ( 4 ): return ( new scaleFunctionType4<double * > ); break;
11  case ( 5 ): return ( new scaleFunctionType5<double * > ); break;
12  case ( 6 ): return ( new scaleFunctionType6<double * > ); break;
13  case ( 7 ): return ( new scaleFunctionType7<double * > ); break;
14  case ( 8 ): return ( new scaleFunctionType8<double * > ); break;
15  case ( 9 ): return ( new scaleFunctionType9<double * > ); break;
16  case ( 10 ): return ( new scaleFunctionType10<double * > ); break;
17  case ( 11 ): return ( new scaleFunctionType11<double * > ); break;
18  case ( 12 ): return ( new scaleFunctionType12<double * > ); break;
19  case ( 13 ): return ( new scaleFunctionType13<double * > ); break;
20  case ( 14 ): return ( new scaleFunctionType14<double * > ); break;
21  case ( 15 ): return ( new scaleFunctionType15<double * > ); break;
22  case ( 16 ): return ( new scaleFunctionType16<double * > ); break;
23  case ( 17 ): return ( new scaleFunctionType17<double * > ); break;
24  case ( 18 ): return ( new scaleFunctionType18<double * > ); break;
25  case ( 19 ): return ( new scaleFunctionType19<double * > ); break;
26  case ( 20 ): return ( new scaleFunctionType20<double * > ); break;
27  case ( 21 ): return ( new scaleFunctionType21<double * > ); break;
28  case ( 22 ): return ( new scaleFunctionType22<double * > ); break;
29  case ( 23 ): return ( new scaleFunctionType23<double * > ); break;
30  case ( 24 ): return ( new scaleFunctionType24<double * > ); break;
31  case ( 25 ): return ( new scaleFunctionType25<double * > ); break;
32  case ( 26 ): return ( new scaleFunctionType26<double * > ); break;
33  case ( 27 ): return ( new scaleFunctionType27<double * > ); break;
34  case ( 28 ): return ( new scaleFunctionType28<double * > ); break;
35  case ( 29 ): return ( new scaleFunctionType29<double * > ); break;
36  case ( 30 ): return ( new scaleFunctionType30<double * > ); break;
37  case ( 31 ): return ( new scaleFunctionType31<double * > ); break;
38  case ( 32 ): return ( new scaleFunctionType32<double * > ); break;
39  case ( 33 ): return ( new scaleFunctionType33<double * > ); break;
40  case ( 34 ): return ( new scaleFunctionType34<double * > ); break;
41  case ( 35 ): return ( new scaleFunctionType35<double * > ); break;
42  case ( 36 ): return ( new scaleFunctionType36<double * > ); break;
43  case ( 37 ): return ( new scaleFunctionType37<double * > ); break;
44  case ( 38 ): return ( new scaleFunctionType38<double * > ); break;
45  case ( 50 ): return ( new scaleFunctionType50<double * > ); break;
46  case ( 51 ): return ( new scaleFunctionType51<double * > ); break;
47  case ( 52 ): return ( new scaleFunctionType52<double * > ); break;
48  default: std::cout << "Error: wrong identifier = " << identifier << std::endl; exit(1);
49  }
50 }
51 
53 {
54  switch ( identifier ) {
55  case ( 0 ): return ( new scaleFunctionType0<std::vector<double> > ); break;
56  case ( 1 ): return ( new scaleFunctionType1<std::vector<double> > ); break;
57  case ( 2 ): return ( new scaleFunctionType2<std::vector<double> > ); break;
58  case ( 3 ): return ( new scaleFunctionType3<std::vector<double> > ); break;
59  case ( 4 ): return ( new scaleFunctionType4<std::vector<double> > ); break;
60  case ( 5 ): return ( new scaleFunctionType5<std::vector<double> > ); break;
61  case ( 6 ): return ( new scaleFunctionType6<std::vector<double> > ); break;
62  case ( 7 ): return ( new scaleFunctionType7<std::vector<double> > ); break;
63  case ( 8 ): return ( new scaleFunctionType8<std::vector<double> > ); break;
64  case ( 9 ): return ( new scaleFunctionType9<std::vector<double> > ); break;
65  case ( 10 ): return ( new scaleFunctionType10<std::vector<double> > ); break;
66  case ( 11 ): return ( new scaleFunctionType11<std::vector<double> > ); break;
67  case ( 12 ): return ( new scaleFunctionType12<std::vector<double> > ); break;
68  case ( 13 ): return ( new scaleFunctionType13<std::vector<double> > ); break;
69  case ( 14 ): return ( new scaleFunctionType14<std::vector<double> > ); break;
70  case ( 15 ): return ( new scaleFunctionType15<std::vector<double> > ); break;
71  case ( 16 ): return ( new scaleFunctionType16<std::vector<double> > ); break;
72  case ( 17 ): return ( new scaleFunctionType17<std::vector<double> > ); break;
73  case ( 18 ): return ( new scaleFunctionType18<std::vector<double> > ); break;
74  case ( 19 ): return ( new scaleFunctionType19<std::vector<double> > ); break;
75  case ( 20 ): return ( new scaleFunctionType20<std::vector<double> > ); break;
76  case ( 21 ): return ( new scaleFunctionType21<std::vector<double> > ); break;
77  case ( 22 ): return ( new scaleFunctionType22<std::vector<double> > ); break;
78  case ( 23 ): return ( new scaleFunctionType23<std::vector<double> > ); break;
79  case ( 24 ): return ( new scaleFunctionType24<std::vector<double> > ); break;
80  case ( 25 ): return ( new scaleFunctionType25<std::vector<double> > ); break;
81  case ( 26 ): return ( new scaleFunctionType26<std::vector<double> > ); break;
82  case ( 27 ): return ( new scaleFunctionType27<std::vector<double> > ); break;
83  case ( 28 ): return ( new scaleFunctionType28<std::vector<double> > ); break;
84  case ( 29 ): return ( new scaleFunctionType29<std::vector<double> > ); break;
85  case ( 30 ): return ( new scaleFunctionType30<std::vector<double> > ); break;
86  case ( 31 ): return ( new scaleFunctionType31<std::vector<double> > ); break;
87  case ( 32 ): return ( new scaleFunctionType32<std::vector<double> > ); break;
88  case ( 33 ): return ( new scaleFunctionType33<std::vector<double> > ); break;
89  case ( 34 ): return ( new scaleFunctionType34<std::vector<double> > ); break;
90  case ( 35 ): return ( new scaleFunctionType35<std::vector<double> > ); break;
91  case ( 36 ): return ( new scaleFunctionType36<std::vector<double> > ); break;
92  case ( 37 ): return ( new scaleFunctionType37<std::vector<double> > ); break;
93  case ( 38 ): return ( new scaleFunctionType38<std::vector<double> > ); break;
94  case ( 50 ): return ( new scaleFunctionType50<std::vector<double> > ); break;
95  case ( 51 ): return ( new scaleFunctionType51<std::vector<double> > ); break;
96  case ( 52 ): return ( new scaleFunctionType52<std::vector<double> > ); break;
97  default: std::cout << "Error: wrong identifier = " << identifier << std::endl; exit(1);
98  }
99 }
100 
101 smearFunctionBase * smearFunctionService( const int identifier )
102 {
103  switch ( identifier ) {
104  case ( 0 ): return ( new smearFunctionType0 ); break;
105  case ( 1 ): return ( new smearFunctionType1 ); break;
106  case ( 2 ): return ( new smearFunctionType2 ); break;
107  case ( 3 ): return ( new smearFunctionType3 ); break;
108  case ( 4 ): return ( new smearFunctionType4 ); break;
109  case ( 5 ): return ( new smearFunctionType5 ); break;
110  case ( 6 ): return ( new smearFunctionType6 ); break;
111  case ( 7 ): return ( new smearFunctionType7 ); break;
112  default: std::cout << "Error: undefined smear type = " << identifier << std::endl; exit(1); break;
113  }
114 }
115 
117 {
118  switch ( identifier ) {
119  case ( 0 ): std::cout << "Error: resolution function type " << identifier << " not defined" << std::endl; exit(1); break;
120  case ( 1 ): return ( new resolutionFunctionType1<double *> ); break;
121  case ( 2 ): std::cout << "Error: resolution function type " << identifier << " not defined" << std::endl; exit(1); break;
122  case ( 3 ): std::cout << "Error: resolution function type " << identifier << " not defined" << std::endl; exit(1); break;
123  case ( 4 ): std::cout << "Error: resolution function type " << identifier << " not defined" << std::endl; exit(1); break;
124  case ( 5 ): std::cout << "Error: resolution function type " << identifier << " not defined" << std::endl; exit(1); break;
125  case ( 6 ): return ( new resolutionFunctionType6<double *> ); break;
126  case ( 7 ): return ( new resolutionFunctionType7<double *> ); break;
127  case ( 8 ): return ( new resolutionFunctionType8<double *> ); break;
128  case ( 9 ): return ( new resolutionFunctionType9<double *> ); break;
129  case ( 10 ): return ( new resolutionFunctionType10<double *> ); break;
130  case ( 11 ): return ( new resolutionFunctionType11<double *> ); break;
131  case ( 12 ): return ( new resolutionFunctionType12<double *> ); break;
132  case ( 13 ): return ( new resolutionFunctionType13<double *> ); break;
133  case ( 14 ): return ( new resolutionFunctionType14<double *> ); break;
134  case ( 15 ): return ( new resolutionFunctionType15<double *> ); break;
135  case ( 17 ): return ( new resolutionFunctionType17<double *> ); break;
136  case ( 18 ): return ( new resolutionFunctionType18<double *> ); break;
137  case ( 19 ): return ( new resolutionFunctionType19<double *> ); break;
138  case ( 20 ): return ( new resolutionFunctionType20<double *> ); break;
139  case ( 30 ): return ( new resolutionFunctionType30<double *> ); break;
140  case ( 31 ): return ( new resolutionFunctionType31<double *> ); break;
141  case ( 32 ): return ( new resolutionFunctionType32<double *> ); break;
142  case ( 40 ): return ( new resolutionFunctionType40<double *> ); break;
143  case ( 41 ): return ( new resolutionFunctionType41<double *> ); break;
144  case ( 42 ): return ( new resolutionFunctionType42<double *> ); break;
145  case ( 43 ): return ( new resolutionFunctionType43<double *> ); break;
146  case ( 44 ): return ( new resolutionFunctionType44<double *> ); break;
147  case ( 45 ): return ( new resolutionFunctionType45<double *> ); break;
148  case ( 46 ): return ( new resolutionFunctionType46<double *> ); break;
149  case ( 47 ): return ( new resolutionFunctionType47<double *> ); break;
150  case ( 99 ): return ( new resolutionFunctionType99<double *> ); break;
151 
152  default: std::cout << "Error: undefined resolution type = " << identifier << std::endl; exit(1); break;
153  }
154 }
155 
157 {
158  switch ( identifier ) {
159  case ( 0 ): std::cout << "Error: resolution function type " << identifier << " not defined" << std::endl; exit(1); break;
160  case ( 1 ): return ( new resolutionFunctionType1<std::vector<double> > ); break;
161  case ( 2 ): std::cout << "Error: resolution function type " << identifier << " not defined" << std::endl; exit(1); break;
162  case ( 3 ): std::cout << "Error: resolution function type " << identifier << " not defined" << std::endl; exit(1); break;
163  case ( 4 ): std::cout << "Error: resolution function type " << identifier << " not defined" << std::endl; exit(1); break;
164  case ( 5 ): std::cout << "Error: resolution function type " << identifier << " not defined" << std::endl; exit(1); break;
165  case ( 6 ): return ( new resolutionFunctionType6<std::vector<double> > ); break;
166  case ( 7 ): return ( new resolutionFunctionType7<std::vector<double> > ); break;
167  case ( 8 ): return ( new resolutionFunctionType8<std::vector<double> > ); break;
168  case ( 9 ): return ( new resolutionFunctionType9<std::vector<double> > ); break;
169  case ( 10 ): return ( new resolutionFunctionType10<std::vector<double> > ); break;
170  case ( 11 ): return ( new resolutionFunctionType11<std::vector<double> > ); break;
171  case ( 12 ): return ( new resolutionFunctionType12<std::vector<double> > ); break;
172  case ( 13 ): return ( new resolutionFunctionType13<std::vector<double> > ); break;
173  case ( 14 ): return ( new resolutionFunctionType14<std::vector<double> > ); break;
174  case ( 15 ): return ( new resolutionFunctionType15<std::vector<double> > ); break;
175  case ( 17 ): return ( new resolutionFunctionType17<std::vector<double> > ); break;
176  case ( 18 ): return ( new resolutionFunctionType18<std::vector<double> > ); break;
177  case ( 19 ): return ( new resolutionFunctionType19<std::vector<double> > ); break;
178  case ( 20 ): return ( new resolutionFunctionType20<std::vector<double> > ); break;
179  case ( 30 ): return ( new resolutionFunctionType30<std::vector<double> > ); break;
180  case ( 31 ): return ( new resolutionFunctionType31<std::vector<double> > ); break;
181  case ( 32 ): return ( new resolutionFunctionType32<std::vector<double> > ); break;
182  case ( 40 ): return ( new resolutionFunctionType40<std::vector<double> > ); break;
183  case ( 41 ): return ( new resolutionFunctionType41<std::vector<double> > ); break;
184  case ( 42 ): return ( new resolutionFunctionType42<std::vector<double> > ); break;
185  case ( 43 ): return ( new resolutionFunctionType43<std::vector<double> > ); break;
186  case ( 44 ): return ( new resolutionFunctionType44<std::vector<double> > ); break;
187  case ( 45 ): return ( new resolutionFunctionType45<std::vector<double> > ); break;
188  case ( 46 ): return ( new resolutionFunctionType46<std::vector<double> > ); break;
189  case ( 47 ): return ( new resolutionFunctionType47<std::vector<double> > ); break;
190  case ( 99 ): return ( new resolutionFunctionType99<std::vector<double> > ); break;
191 
192  default: std::cout << "Error: undefined resolution type = " << identifier << std::endl; exit(1); break;
193  }
194  }
195 
196 backgroundFunctionBase * backgroundFunctionService( const int identifier, const double & lowerLimit, const double & upperLimit )
197 {
198  switch ( identifier ) {
199  case ( 0 ): std::cout << "Error: background function type " << identifier << " not defined" << std::endl; exit(1); break;
200  case ( 1 ): return new backgroundFunctionType1(lowerLimit, upperLimit); break;
201  case ( 2 ): return new backgroundFunctionType2(lowerLimit, upperLimit); break;
202  // case ( 3 ): return new backgroundFunctionType3(lowerLimit, upperLimit); break;
203  case ( 4 ): return new backgroundFunctionType4(lowerLimit, upperLimit); break;
204  case ( 5 ): return new backgroundFunctionType5(lowerLimit, upperLimit); break;
205  case ( 6 ): return new backgroundFunctionType6(lowerLimit, upperLimit); break;
206  case ( 7 ): return new backgroundFunctionType7(lowerLimit, upperLimit); break;
207  case ( 8 ): return new backgroundFunctionType8(lowerLimit, upperLimit); break;
208  case ( 9 ): return new backgroundFunctionType9(lowerLimit, upperLimit); break; //Gul
209  case ( 10 ): return new backgroundFunctionType10(lowerLimit, upperLimit); break; //Gul
210  case ( 11 ): return new backgroundFunctionType11(lowerLimit, upperLimit); break; // SC
211  default: std::cout << "Error: undefined background function type = " << identifier << std::endl; exit(1); break;
212  }
213 }
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:6026
This is resolution function where sigmaPt/Pt is described by f(Pt) = a + b/pt + pt/(pt+c)and f(Eta) =...
Definition: Functions.h:3474
TESTED on 23-01-2011.
Definition: Functions.h:567
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:156
Exponential with eta dependence.
Definition: Functions.h:5857
smearFunctionBase * smearFunctionService(const int identifier)
Service to build the smearing functor corresponding to the passed identifier.
Definition: Functions.cc:101
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:52
Linear with eta dependence.
Definition: Functions.h:5896
This is resolution function where sigmaPt/Pt is described by f(Pt) = polynomial(4th grade) and f(Eta)...
Definition: Functions.h:3417
resolutionFunctionBase< double * > * resolutionFunctionService(const int identifier)
Service to build the resolution functor corresponding to the passed identifier.
Definition: Functions.cc:116
Exponential binned in eta (Z, Run2012C PromptReco-v1 + PromptReco-v2)
Definition: Functions.h:6846
tuple cout
Definition: gather_cfg.py:121
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:196
Exponential binned in eta.
Definition: Functions.h:5938