CMS 3D CMS Logo

Functions.cc
Go to the documentation of this file.
2 
4  switch (identifier) {
5  case (0):
6  return (new scaleFunctionType0<double *>);
7  break;
8  case (50):
10  break;
11  case (64):
12  return (new scaleFunctionType64<double *>);
13  break;
14  default:
15  std::cout << "Error: wrong identifier = " << identifier << std::endl;
16  exit(1);
17  }
18 }
19 
21  switch (identifier) {
22  case (0):
23  return (new scaleFunctionType0<std::vector<double> >);
24  break;
25  case (50):
26  return (new scaleFunctionType50<std::vector<double> >);
27  break;
28  case (64):
29  return (new scaleFunctionType64<std::vector<double> >);
30  break;
31  default:
32  std::cout << "Error: wrong identifier = " << identifier << std::endl;
33  exit(1);
34  }
35 }
36 
38  switch (identifier) {
39  case (0):
40  return (new smearFunctionType0);
41  break;
42  case (1):
43  return (new smearFunctionType1);
44  break;
45  case (2):
46  return (new smearFunctionType2);
47  break;
48  case (3):
49  return (new smearFunctionType3);
50  break;
51  case (4):
52  return (new smearFunctionType4);
53  break;
54  case (5):
55  return (new smearFunctionType5);
56  break;
57  case (6):
58  return (new smearFunctionType6);
59  break;
60  case (7):
61  return (new smearFunctionType7);
62  break;
63  default:
64  std::cout << "Error: undefined smear type = " << identifier << std::endl;
65  exit(1);
66  break;
67  }
68 }
69 
71  switch (identifier) {
72  case (0):
74  break;
75  case (45):
77  break;
78  case (46):
80  break;
81  case (47):
83  break;
84 
85  default:
86  std::cout << "Error: undefined resolution type = " << identifier << std::endl;
87  exit(1);
88  break;
89  }
90 }
91 
93  switch (identifier) {
94  case (0):
95  return (new resolutionFunctionType0<std::vector<double> >);
96  break;
97  case (45):
98  return (new resolutionFunctionType45<std::vector<double> >);
99  break;
100  case (46):
101  return (new resolutionFunctionType46<std::vector<double> >);
102  break;
103  case (47):
104  return (new resolutionFunctionType47<std::vector<double> >);
105  break;
106 
107  default:
108  std::cout << "Error: undefined resolution type = " << identifier << std::endl;
109  exit(1);
110  break;
111  }
112 }
113 
115  const double &lowerLimit,
116  const double &upperLimit) {
117  switch (identifier) {
118  case (0):
119  std::cout << "Error: background function type " << identifier << " not defined" << std::endl;
120  exit(1);
121  break;
122  case (1):
123  return new backgroundFunctionType1(lowerLimit, upperLimit);
124  break;
125  case (2):
126  return new backgroundFunctionType2(lowerLimit, upperLimit);
127  break;
128  // case ( 3 ): return new backgroundFunctionType3(lowerLimit, upperLimit); break;
129  case (4):
130  return new backgroundFunctionType4(lowerLimit, upperLimit);
131  break;
132  case (5):
133  return new backgroundFunctionType5(lowerLimit, upperLimit);
134  break;
135  case (6):
136  return new backgroundFunctionType6(lowerLimit, upperLimit);
137  break;
138  case (7):
139  return new backgroundFunctionType7(lowerLimit, upperLimit);
140  break;
141  case (8):
142  return new backgroundFunctionType8(lowerLimit, upperLimit);
143  break;
144  case (9):
145  return new backgroundFunctionType9(lowerLimit, upperLimit);
146  break; //Gul
147  case (10):
148  return new backgroundFunctionType10(lowerLimit, upperLimit);
149  break; //Gul
150  case (11):
151  return new backgroundFunctionType11(lowerLimit, upperLimit);
152  break; // SC
153  default:
154  std::cout << "Error: undefined background function type = " << identifier << std::endl;
155  exit(1);
156  break;
157  }
158 }
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:92
Exponential binned in eta, much finer binning then type6.
Definition: Functions.h:1789
scaleFunctionBase< double * > * scaleFunctionService(const int identifier)
Service to build the scale functor corresponding to the passed identifier.
Definition: Functions.cc:3
resolutionFunctionBase< double * > * resolutionFunctionService(const int identifier)
Service to build the resolution functor corresponding to the passed identifier.
Definition: Functions.cc:70
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:114
smearFunctionBase * smearFunctionService(const int identifier)
Service to build the smearing functor corresponding to the passed identifier.
Definition: Functions.cc:37
Exponential with eta dependence.
Definition: Functions.h:1602
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:20
Linear with eta dependence.
Definition: Functions.h:1653
Exponential binned in eta (Z, Run2012C PromptReco-v1 + PromptReco-v2)
Definition: Functions.h:2559
def exit(msg="")
Exponential binned in eta.
Definition: Functions.h:1707