CMS 3D CMS Logo

GlobalScales.cc
Go to the documentation of this file.
13 
14 #include <iostream>
15 #include <fstream>
16 #include <iomanip>
17 
20 
21 // constructor
23 
24 // destructor
26 
27 std::string l1t::GlobalScales::getScalesName() const { return m_ScaleSetName; }
28 
29 void l1t::GlobalScales::setLUT_CalMuEta(const std::string& lutName, std::vector<long long> lut) {
30  if (m_lut_CalMuEta.count(lutName) != 0) {
31  LogTrace("GlobalScales") << " LUT \"" << lutName << "\"already exists in the LUT map- not inserted!"
32  << std::endl;
33  return;
34  }
35 
36  // Insert this LUT into the Table
37  m_lut_CalMuEta.insert(std::map<std::string, std::vector<long long>>::value_type(lutName, lut));
38 
39  return;
40 }
41 
42 void l1t::GlobalScales::setLUT_CalMuPhi(const std::string& lutName, std::vector<long long> lut) {
43  if (m_lut_CalMuPhi.count(lutName) != 0) {
44  LogTrace("GlobalScales") << " LUT \"" << lutName << "\"already exists in the LUT map- not inserted!"
45  << std::endl;
46  return;
47  }
48 
49  // Insert this LUT into the Table
50  m_lut_CalMuPhi.insert(std::map<std::string, std::vector<long long>>::value_type(lutName, lut));
51 
52  return;
53 }
54 
56  std::vector<long long> lut,
57  unsigned int precision) {
58  if (m_lut_DeltaEta.count(lutName) != 0) {
59  LogTrace("GlobalScales") << " LUT \"" << lutName << "\"already exists in the LUT map- not inserted!"
60  << std::endl;
61  return;
62  }
63 
64  // Insert this LUT into the Table
65  m_lut_DeltaEta.insert(std::map<std::string, std::vector<long long>>::value_type(lutName, lut));
66  m_Prec_DeltaEta.insert(std::map<std::string, unsigned int>::value_type(lutName, precision));
67 
68  return;
69 }
70 
72  std::vector<long long> lut,
73  unsigned int precision) {
74  if (m_lut_DeltaPhi.count(lutName) != 0) {
75  LogTrace("GlobalScales") << " LUT \"" << lutName << "\"already exists in the LUT map- not inserted!"
76  << std::endl;
77  return;
78  }
79 
80  // Insert this LUT into the Table
81  m_lut_DeltaPhi.insert(std::map<std::string, std::vector<long long>>::value_type(lutName, lut));
82  m_Prec_DeltaPhi.insert(std::map<std::string, unsigned int>::value_type(lutName, precision));
83 
84  return;
85 }
86 
87 void l1t::GlobalScales::setLUT_Pt(const std::string& lutName, std::vector<long long> lut, unsigned int precision) {
88  if (m_lut_Pt.count(lutName) != 0) {
89  LogTrace("GlobalScales") << " LUT \"" << lutName << "\"already exists in the LUT map- not inserted!"
90  << std::endl;
91  return;
92  }
93 
94  // Insert this LUT into the Table
95  m_lut_Pt.insert(std::map<std::string, std::vector<long long>>::value_type(lutName, lut));
97 
98  return;
99 }
100 
101 void l1t::GlobalScales::setLUT_Cosh(const std::string& lutName, std::vector<long long> lut, unsigned int precision) {
102  if (m_lut_Cosh.count(lutName) != 0) {
103  LogTrace("GlobalScales") << " LUT \"" << lutName << "\"already exists in the LUT map- not inserted!"
104  << std::endl;
105  return;
106  }
107 
108  // Insert this LUT into the Table
109  m_lut_Cosh.insert(std::map<std::string, std::vector<long long>>::value_type(lutName, lut));
110  m_Prec_Cosh.insert(std::map<std::string, unsigned int>::value_type(lutName, precision));
111 
112  return;
113 }
114 
115 void l1t::GlobalScales::setLUT_Cos(const std::string& lutName, std::vector<long long> lut, unsigned int precision) {
116  if (m_lut_Cos.count(lutName) != 0) {
117  LogTrace("GlobalScales") << " LUT \"" << lutName << "\"already exists in the LUT map- not inserted!"
118  << std::endl;
119  return;
120  }
121 
122  // Insert this LUT into the Table
123  m_lut_Cos.insert(std::map<std::string, std::vector<long long>>::value_type(lutName, lut));
124  m_Prec_Cos.insert(std::map<std::string, unsigned int>::value_type(lutName, precision));
125 
126  return;
127 }
128 
129 void l1t::GlobalScales::setLUT_Sin(const std::string& lutName, std::vector<long long> lut, unsigned int precision) {
130  if (m_lut_Sin.count(lutName) != 0) {
131  LogTrace("GlobalScales") << " LUT \"" << lutName << "\"already exists in the LUT map- not inserted!"
132  << std::endl;
133  return;
134  }
135 
136  // Insert this LUT into the Table
137  m_lut_Sin.insert(std::map<std::string, std::vector<long long>>::value_type(lutName, lut));
138  m_Prec_Sin.insert(std::map<std::string, unsigned int>::value_type(lutName, precision));
139 
140  return;
141 }
142 
143 long long l1t::GlobalScales::getLUT_CalMuEta(const std::string& lutName, int element) const {
144  long long value = 0;
145 
146  if (element < 0) {
147  edm::LogError("GlobalScales") << "Error: Negative index, " << element << ", requested for CalMuEta LUT ( "
148  << lutName << ")" << std::endl;
149  } else if (element >= (int)m_lut_CalMuEta.find(lutName)->second.size()) {
150  edm::LogError("GlobalScales") << "Error: Element Requested " << element << " too large for CalMuEta LUT ("
151  << lutName << ") size = " << m_lut_CalMuEta.find(lutName)->second.size() << std::endl;
152  } else {
153  value = m_lut_CalMuEta.find(lutName)->second.at(element);
154  }
155  return value;
156 }
157 
158 long long l1t::GlobalScales::getLUT_CalMuPhi(const std::string& lutName, int element) const {
159  long long value = 0;
160 
161  if (element < 0) {
162  edm::LogError("GlobalScales") << "Error: Negative index, " << element << ", requested for CalMuPhi LUT ( "
163  << lutName << ")" << std::endl;
164  } else if (element >= (int)m_lut_CalMuPhi.find(lutName)->second.size()) {
165  edm::LogError("GlobalScales") << "Error: Element Requested " << element << " too large for CalMuPhi LUT ("
166  << lutName << ") size = " << m_lut_CalMuPhi.find(lutName)->second.size() << std::endl;
167  } else {
168  value = m_lut_CalMuPhi.find(lutName)->second.at(element);
169  }
170  return value;
171 }
172 
173 long long l1t::GlobalScales::getLUT_DeltaEta(std::string lutName, int element) const {
174  long long value = 0;
175 
176  //first check whether this LUT exists
177  if (m_lut_DeltaEta.find(lutName) == m_lut_DeltaEta.end()) {
178  //does not exist. Check for oppoisite ordering
179  std::size_t pos = lutName.find('-');
180  std::string name = lutName.substr(pos + 1);
181  name += "-";
182  name += lutName.substr(0, pos);
183 
184  //check again
185  if (m_lut_DeltaEta.find(name) == m_lut_DeltaEta.end()) {
186  edm::LogError("GlobalScales") << "Warning: No LUT by name " << lutName << " or " << name << " exists! "
187  << std::endl;
188  return value;
189  } else {
190  lutName = name;
191  }
192  }
193 
194  if (element < 0) {
195  edm::LogError("GlobalScales") << "Error: Negative index, " << element << ", requested for DeltaEta LUT ( "
196  << lutName << ")" << std::endl;
197  } else if (element >= (int)m_lut_DeltaEta.find(lutName)->second.size()) {
198  edm::LogError("GlobalScales") << "Error: Element Requested " << element << " too large for DeltaEta LUT ("
199  << lutName << ") size = " << m_lut_DeltaEta.find(lutName)->second.size() << std::endl;
200  } else {
201  value = m_lut_DeltaEta.find(lutName)->second.at(element);
202  }
203  return value;
204 }
205 unsigned int l1t::GlobalScales::getPrec_DeltaEta(const std::string& lutName) const {
206  unsigned int value = 0;
207 
208  if (m_Prec_DeltaEta.find(lutName) != m_Prec_DeltaEta.end()) {
209  value = m_Prec_DeltaEta.find(lutName)->second;
210  } else {
211  //does not exist. Check for oppoisite ordering
212  std::size_t pos = lutName.find('-');
213  std::string name = lutName.substr(pos + 1);
214  name += "-";
215  name += lutName.substr(0, pos);
216 
217  //check again
218  if (m_Prec_DeltaEta.find(name) != m_Prec_DeltaEta.end()) {
219  value = m_Prec_DeltaEta.find(name)->second;
220  } else {
221  edm::LogError("GlobalScales") << "Warning: LUT " << lutName << " for DeltaEta not found" << std::endl;
222  }
223  }
224  return value;
225 }
226 
227 long long l1t::GlobalScales::getLUT_DeltaPhi(std::string lutName, int element) const {
228  long long value = 0;
229 
230  //first check whether this LUT exists
231  if (m_lut_DeltaPhi.find(lutName) == m_lut_DeltaPhi.end()) {
232  //does not exist. Check for oppoisite ordering
233  std::size_t pos = lutName.find('-');
234  std::string name = lutName.substr(pos + 1);
235  name += "-";
236  name += lutName.substr(0, pos);
237 
238  //check again
239  if (m_lut_DeltaPhi.find(name) == m_lut_DeltaPhi.end()) {
240  edm::LogError("GlobalScales") << "Warning: No LUT by name " << lutName << " or " << name << " exists! "
241  << std::endl;
242  return value;
243  } else {
244  lutName = name;
245  }
246  }
247 
248  if (element < 0) {
249  edm::LogError("GlobalScales") << "Error: Negative index, " << element << ", requested for DeltaPhi LUT ( "
250  << lutName << ")" << std::endl;
251  } else if (element >= (int)m_lut_DeltaPhi.find(lutName)->second.size()) {
252  edm::LogError("GlobalScales") << "Error: Element Requested " << element << " too large for DeltaPhi LUT ("
253  << lutName << ") size = " << m_lut_DeltaPhi.find(lutName)->second.size() << std::endl;
254  } else {
255  value = m_lut_DeltaPhi.find(lutName)->second.at(element);
256  }
257  return value;
258 }
259 unsigned int l1t::GlobalScales::getPrec_DeltaPhi(const std::string& lutName) const {
260  unsigned int value = 0;
261 
262  if (m_Prec_DeltaPhi.find(lutName) != m_Prec_DeltaPhi.end()) {
263  value = m_Prec_DeltaPhi.find(lutName)->second;
264  } else {
265  //does not exist. Check for oppoisite ordering
266  std::size_t pos = lutName.find('-');
267  std::string name = lutName.substr(pos + 1);
268  name += "-";
269  name += lutName.substr(0, pos);
270 
271  //check again
272  if (m_Prec_DeltaPhi.find(name) != m_Prec_DeltaPhi.end()) {
273  value = m_Prec_DeltaPhi.find(name)->second;
274  } else {
275  edm::LogError("GlobalScales") << "Warning: LUT " << lutName << " for DeltaPhi not found" << std::endl;
276  }
277  }
278  return value;
279 }
280 
281 long long l1t::GlobalScales::getLUT_Pt(const std::string& lutName, int element) const {
282  long long value = 0;
283 
284  if (element < 0) {
285  edm::LogError("GlobalScales") << "Error: Negative index, " << element << ", requested for Pt LUT ( " << lutName
286  << ")" << std::endl;
287  } else if (element >= (int)m_lut_Pt.find(lutName)->second.size()) {
288  edm::LogError("GlobalScales") << "Error: Element Requested " << element << " too large for Pt LUT (" << lutName
289  << ") size = " << m_lut_Pt.find(lutName)->second.size() << std::endl;
290  } else {
291  value = m_lut_Pt.find(lutName)->second.at(element);
292  }
293  return value;
294 }
295 unsigned int l1t::GlobalScales::getPrec_Pt(const std::string& lutName) const {
296  unsigned int value = 0;
297 
298  if (m_Prec_Pt.find(lutName) != m_Prec_Pt.end()) {
299  value = m_Prec_Pt.find(lutName)->second;
300  } else {
301  edm::LogError("GlobalScales") << "Warning: LUT " << lutName << " for Pt not found" << std::endl;
302  }
303  return value;
304 }
305 
306 long long l1t::GlobalScales::getLUT_DeltaEta_Cosh(std::string lutName, int element) const {
307  long long value = 0;
308 
309  //first check whether this LUT exists
310  if (m_lut_Cosh.find(lutName) == m_lut_Cosh.end()) {
311  //does not exist. Check for oppoisite ordering
312  std::size_t pos = lutName.find('-');
313  std::string name = lutName.substr(pos + 1);
314  name += "-";
315  name += lutName.substr(0, pos);
316 
317  //check again
318  if (m_lut_Cosh.find(name) == m_lut_Cosh.end()) {
319  edm::LogError("GlobalScales") << "Warning: No LUT by name " << lutName << " or " << name << " exists! "
320  << std::endl;
321  return value;
322  } else {
323  lutName = name;
324  }
325  }
326 
327  if (element < 0) {
328  edm::LogError("GlobalScales") << "Error: Negative index, " << element << ", requested for Cosh LUT ( " << lutName
329  << ")" << std::endl;
330  } else if (element >= (int)m_lut_Cosh.find(lutName)->second.size()) {
331  edm::LogError("GlobalScales") << "Error: Element Requested " << element << " too large for Cosh LUT (" << lutName
332  << ") size = " << m_lut_Cosh.find(lutName)->second.size() << std::endl;
333  } else {
334  value = m_lut_Cosh.find(lutName)->second.at(element);
335  }
336  return value;
337 }
338 unsigned int l1t::GlobalScales::getPrec_DeltaEta_Cosh(const std::string& lutName) const {
339  unsigned int value = 0;
340 
341  if (m_Prec_Cosh.find(lutName) != m_Prec_Cosh.end()) {
342  value = m_Prec_Cosh.find(lutName)->second;
343  } else {
344  //does not exist. Check for oppoisite ordering
345  std::size_t pos = lutName.find('-');
346  std::string name = lutName.substr(pos + 1);
347  name += "-";
348  name += lutName.substr(0, pos);
349 
350  //check again
351  if (m_Prec_Cosh.find(name) != m_Prec_Cosh.end()) {
352  value = m_Prec_Cosh.find(name)->second;
353  } else {
354  edm::LogError("GlobalScales") << "Warning: LUT " << lutName << " for Cosh not found" << std::endl;
355  }
356  }
357  return value;
358 }
359 
360 long long l1t::GlobalScales::getLUT_DeltaPhi_Cos(std::string lutName, int element) const {
361  long long value = 0;
362 
363  //first check whether this LUT exists
364  if (m_lut_Cos.find(lutName) == m_lut_Cos.end()) {
365  //does not exist. Check for oppoisite ordering
366  std::size_t pos = lutName.find('-');
367  std::string name = lutName.substr(pos + 1);
368  name += "-";
369  name += lutName.substr(0, pos);
370 
371  //check again
372  if (m_lut_Cos.find(name) == m_lut_Cos.end()) {
373  edm::LogError("GlobalScales") << "Warning: No LUT by name " << lutName << " or " << name << " exists! "
374  << std::endl;
375  return value;
376  } else {
377  lutName = name;
378  }
379  }
380 
381  if (element < 0) {
382  edm::LogError("GlobalScales") << "Error: Negative index, " << element << ", requested for Cos LUT ( " << lutName
383  << ")" << std::endl;
384  } else if (element >= (int)m_lut_DeltaPhi.find(lutName)->second.size()) {
385  edm::LogError("GlobalScales") << "Error: Element Requested " << element << " too large for Cos LUT (" << lutName
386  << ") size = " << m_lut_Cos.find(lutName)->second.size() << std::endl;
387  } else {
388  value = m_lut_Cos.find(lutName)->second.at(element);
389  }
390  return value;
391 }
392 
393 long long l1t::GlobalScales::getLUT_Cos(const std::string& lutName, int element) const {
394  long long value = 0;
395 
396  //first check whether this LUT exists
397  if (m_lut_Cos.find(lutName) == m_lut_Cos.end()) {
398  edm::LogError("GlobalScales") << "Warning: No LUT by name " << lutName << " exists! " << std::endl;
399  return value;
400  }
401 
402  if (element < 0) {
403  edm::LogError("GlobalScales") << "Error: Negative index, " << element << ", requested for Cos LUT ( " << lutName
404  << ")" << std::endl;
405  } else if (element >= (int)m_lut_Cos.find(lutName)->second.size()) {
406  edm::LogError("GlobalScales") << "Error: Element Requested " << element << " too large for Cos LUT (" << lutName
407  << ") size = " << m_lut_Cos.find(lutName)->second.size() << std::endl;
408  } else {
409  value = m_lut_Cos.find(lutName)->second.at(element);
410  }
411  return value;
412 }
413 
414 long long l1t::GlobalScales::getLUT_Sin(const std::string& lutName, int element) const {
415  long long value = 0;
416 
417  //first check whether this LUT exists
418  if (m_lut_Sin.find(lutName) == m_lut_Sin.end()) {
419  edm::LogError("GlobalScales") << "Warning: No LUT by name " << lutName << " exists! " << std::endl;
420  return value;
421  }
422 
423  if (element < 0) {
424  edm::LogError("GlobalScales") << "Error: Negative index, " << element << ", requested for Sin LUT ( " << lutName
425  << ")" << std::endl;
426  } else if (element >= (int)m_lut_Sin.find(lutName)->second.size()) {
427  edm::LogError("GlobalScales") << "Error: Element Requested " << element << " too large for Sin LUT (" << lutName
428  << ") size = " << m_lut_Sin.find(lutName)->second.size() << std::endl;
429  } else {
430  value = m_lut_Sin.find(lutName)->second.at(element);
431  }
432  return value;
433 }
434 
435 unsigned int l1t::GlobalScales::getPrec_DeltaPhi_Cos(const std::string& lutName) const {
436  unsigned int value = 0;
437 
438  if (m_Prec_Cos.find(lutName) != m_Prec_Cos.end()) {
439  value = m_Prec_Cos.find(lutName)->second;
440  } else {
441  //does not exist. Check for oppoisite ordering
442  std::size_t pos = lutName.find('-');
443  std::string name = lutName.substr(pos + 1);
444  name += "-";
445  name += lutName.substr(0, pos);
446 
447  //check again
448  if (m_Prec_Cos.find(name) != m_Prec_Cos.end()) {
449  value = m_Prec_Cos.find(name)->second;
450  } else {
451  edm::LogError("GlobalScales") << "Warning: LUT " << lutName << " for Cos not found" << std::endl;
452  }
453  }
454  return value;
455 }
456 
457 unsigned int l1t::GlobalScales::getPrec_Cos(const std::string& lutName) const {
458  unsigned int value = 0;
459 
460  if (m_Prec_Sin.find(lutName) != m_Prec_Sin.end()) {
461  value = m_Prec_Sin.find(lutName)->second;
462  } else {
463  edm::LogError("GlobalScales") << "Warning: LUT " << lutName << " for Sin not found" << std::endl;
464  }
465  return value;
466 }
467 
468 unsigned int l1t::GlobalScales::getPrec_Sin(const std::string& lutName) const {
469  unsigned int value = 0;
470 
471  if (m_Prec_Sin.find(lutName) != m_Prec_Sin.end()) {
472  value = m_Prec_Sin.find(lutName)->second;
473  } else {
474  edm::LogError("GlobalScales") << "Warning: LUT " << lutName << " for Sin not found" << std::endl;
475  }
476  return value;
477 }
478 
479 void l1t::GlobalScales::dumpAllLUTs(std::ostream& myCout) const {
480  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_CalMuEta.begin();
481  itr != m_lut_CalMuEta.end();
482  itr++) {
483  dumpLUT(myCout, 1, itr->first);
484  }
485 
486  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_CalMuPhi.begin();
487  itr != m_lut_CalMuPhi.end();
488  itr++) {
489  dumpLUT(myCout, 2, itr->first);
490  }
491 
492  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_DeltaEta.begin();
493  itr != m_lut_DeltaEta.end();
494  itr++) {
495  dumpLUT(myCout, 3, itr->first);
496  }
497 
498  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_DeltaPhi.begin();
499  itr != m_lut_DeltaPhi.end();
500  itr++) {
501  dumpLUT(myCout, 4, itr->first);
502  }
503 
504  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_Cosh.begin(); itr != m_lut_Cosh.end();
505  itr++) {
506  dumpLUT(myCout, 5, itr->first);
507  }
508 
509  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_Cos.begin(); itr != m_lut_Cos.end();
510  itr++) {
511  dumpLUT(myCout, 6, itr->first);
512  }
513 
514  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_Sin.begin(); itr != m_lut_Sin.end();
515  itr++) {
516  dumpLUT(myCout, 7, itr->first);
517  }
518 
519  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_Pt.begin(); itr != m_lut_Pt.end();
520  itr++) {
521  dumpLUT(myCout, 8, itr->first);
522  }
523 }
524 
525 void l1t::GlobalScales::dumpLUT(std::ostream& myCout, int LUTtype, std::string name) const {
526  std::vector<long long> dumpV;
527  unsigned int prec = 0;
528  std::string type = "Null";
529  switch (LUTtype) {
530  case 1: {
531  dumpV = m_lut_CalMuEta.find(name)->second;
532  type = "Cal-Mu Eta";
533  break;
534  }
535  case 2: {
536  dumpV = m_lut_CalMuPhi.find(name)->second;
537  type = "Cal-Mu Phi";
538  break;
539  }
540  case 3: {
541  dumpV = m_lut_DeltaEta.find(name)->second;
542  prec = m_Prec_DeltaEta.find(name)->second;
543  type = "Delta Eta";
544  break;
545  }
546  case 4: {
547  dumpV = m_lut_DeltaPhi.find(name)->second;
548  prec = m_Prec_DeltaPhi.find(name)->second;
549  type = "Delta Phi";
550  break;
551  }
552  case 5: {
553  dumpV = m_lut_Cosh.find(name)->second;
554  prec = m_Prec_Cosh.find(name)->second;
555  type = "Cosh";
556  break;
557  }
558  case 6: {
559  dumpV = m_lut_Cos.find(name)->second;
560  prec = m_Prec_Cos.find(name)->second;
561  type = "Cos";
562  break;
563  }
564  case 7: {
565  dumpV = m_lut_Sin.find(name)->second;
566  prec = m_Prec_Sin.find(name)->second;
567  type = "Sin";
568  break;
569  }
570  case 8: {
571  dumpV = m_lut_Pt.find(name)->second;
572  prec = m_Prec_Pt.find(name)->second;
573  type = "Pt";
574  break;
575  }
576  }
577 
578  myCout << "=========================================" << std::endl;
579  myCout << " LUT: " << type << " Table: " << name << " Size = " << dumpV.size() << " Precision " << prec
580  << std::endl;
581  myCout << "=========================================" << std::endl;
582  for (int i = 0; i < (int)dumpV.size(); i++) {
583  myCout << " Element " << i << " " << dumpV.at(i) << std::endl;
584  }
585 }
586 
587 void l1t::GlobalScales::print(std::ostream& myCout) const {
588  myCout << "\n ************* L1T Global Scales ************" << std::endl;
589 
590  myCout << " Muon Scales: " << std::endl;
591  printScale(m_muScales, myCout);
592 
593  myCout << " EG Scales: " << std::endl;
594  printScale(m_egScales, myCout);
595 
596  myCout << " Tau Scales: " << std::endl;
597  printScale(m_tauScales, myCout);
598 
599  myCout << " Jet Scales: " << std::endl;
600  printScale(m_jetScales, myCout);
601 
602  myCout << " HTT Scales: " << std::endl;
603  printScale(m_httScales, myCout);
604 
605  myCout << " ETT Scales: " << std::endl;
606  printScale(m_ettScales, myCout);
607 
608  myCout << " HTM Scales: " << std::endl;
609  printScale(m_htmScales, myCout);
610 
611  myCout << " ETM Scales: " << std::endl;
612  printScale(m_etmScales, myCout);
613 
614  myCout << std::endl;
615  myCout << " LUTs Stored: " << std::endl;
616  myCout << " CalMuEta:";
617  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_CalMuEta.begin();
618  itr != m_lut_CalMuEta.end();
619  itr++) {
620  myCout << " " << itr->first;
621  }
622  myCout << std::endl;
623 
624  myCout << " CalMuPhi:";
625  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_CalMuPhi.begin();
626  itr != m_lut_CalMuPhi.end();
627  itr++) {
628  myCout << " " << itr->first;
629  }
630  myCout << std::endl;
631 
632  myCout << " DeltaEta:";
633  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_DeltaEta.begin();
634  itr != m_lut_DeltaEta.end();
635  itr++) {
636  myCout << " " << itr->first;
637  }
638  myCout << std::endl;
639 
640  myCout << " DeltaPhi:";
641  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_DeltaPhi.begin();
642  itr != m_lut_DeltaPhi.end();
643  itr++) {
644  myCout << " " << itr->first;
645  }
646  myCout << std::endl;
647 
648  myCout << " Cos: ";
649  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_Cos.begin(); itr != m_lut_Cos.end();
650  itr++) {
651  myCout << " " << itr->first;
652  }
653  myCout << std::endl;
654 
655  myCout << " Sin: ";
656  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_Sin.begin(); itr != m_lut_Sin.end();
657  itr++) {
658  myCout << " " << itr->first;
659  }
660  myCout << std::endl;
661 
662  myCout << " Cosh: ";
663  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_Cosh.begin(); itr != m_lut_Cosh.end();
664  itr++) {
665  myCout << " " << itr->first;
666  }
667  myCout << std::endl;
668 
669  myCout << " Pt: ";
670  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_Pt.begin(); itr != m_lut_Pt.end();
671  itr++) {
672  myCout << " " << itr->first;
673  }
674  myCout << std::endl;
675 }
676 void l1t::GlobalScales::printScale(ScaleParameters scale, std::ostream& myCout) const {
677  myCout << " Pt Min = " << std::setw(10) << scale.etMin << " Pt Max = " << std::setw(10) << scale.etMax
678  << " Pt Step = " << std::setw(10) << scale.etStep << " Number = " << std::setw(10)
679  << scale.etBins.size() << std::endl;
680  myCout << "\n";
681  for (int i = 0; i < int(scale.etBins.size()); i++) {
682  std::pair<double, double> binEdges = scale.etBins.at(i);
683  myCout << " etBins[" << i << "]\trange:\t" << binEdges.first << " - " << binEdges.second << std::endl;
684  }
685 
686  myCout << "\n Phi Min = " << std::setw(10) << scale.phiMin << " Phi Max = " << std::setw(10) << scale.phiMax
687  << " Phi Step = " << std::setw(10) << scale.phiStep << " Number = " << std::setw(10)
688  << scale.phiBins.size() << std::endl;
689  myCout << "\n";
690  for (int i = 0; i < int(scale.phiBins.size()); i++) {
691  std::pair<double, double> binEdges = scale.phiBins.at(i);
692  myCout << " phiBins[" << i << "]\trange:\t" << binEdges.first << " - " << binEdges.second << std::endl;
693  }
694 
695  myCout << "\n Eta Min = " << std::setw(10) << scale.etaMin << " Eta Max = " << std::setw(10) << scale.etaMax
696  << " Eta Step = " << std::setw(10) << scale.etaStep << " Number = " << std::setw(10)
697  << scale.etaBins.size() << std::endl;
698  myCout << "\n";
699  for (int i = 0; i < int(scale.etaBins.size()); i++) {
700  std::pair<double, double> binEdges = scale.etaBins.at(i);
701  myCout << " etaBins[" << i << "]\trange:\t" << binEdges.first << " - " << binEdges.second << std::endl;
702  }
703 }
l1t::GlobalScales::getPrec_Pt
unsigned int getPrec_Pt(const std::string &lutName) const
Definition: GlobalScales.cc:295
mps_fire.i
i
Definition: mps_fire.py:428
MessageLogger.h
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
l1t::GlobalScales::getLUT_Cos
long long getLUT_Cos(const std::string &lutName, int element) const
Definition: GlobalScales.cc:393
pos
Definition: PixelAliasList.h:18
l1t::GlobalScales::setLUT_Cos
virtual void setLUT_Cos(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:115
l1t::GlobalScales::setLUT_CalMuPhi
virtual void setLUT_CalMuPhi(const std::string &lutName, std::vector< long long > lut)
Definition: GlobalScales.cc:42
l1t::GlobalScales::getPrec_DeltaEta_Cosh
unsigned int getPrec_DeltaEta_Cosh(const std::string &lutName) const
Definition: GlobalScales.cc:338
l1t::GlobalScales::getLUT_Sin
long long getLUT_Sin(const std::string &lutName, int element) const
Definition: GlobalScales.cc:414
l1t::GlobalScales::print
virtual void print(std::ostream &myCout) const
Definition: GlobalScales.cc:587
l1t::GlobalScales::getLUT_CalMuPhi
long long getLUT_CalMuPhi(const std::string &lutName, int element) const
Definition: GlobalScales.cc:158
l1t::GlobalScales::getLUT_Pt
long long getLUT_Pt(const std::string &lutName, int element) const
Definition: GlobalScales.cc:281
l1t::GlobalScales::setLUT_Cosh
virtual void setLUT_Cosh(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:101
l1t::GlobalScales::getLUT_DeltaEta
long long getLUT_DeltaEta(std::string lutName, int element) const
Definition: GlobalScales.cc:173
l1t::GlobalScales::~GlobalScales
virtual ~GlobalScales()
Definition: GlobalScales.cc:25
l1t::GlobalScales::dumpLUT
virtual void dumpLUT(std::ostream &myCout, int LUTtype, std::string name) const
Definition: GlobalScales.cc:525
l1t::GlobalScales::getPrec_Cos
unsigned int getPrec_Cos(const std::string &lutName) const
Definition: GlobalScales.cc:457
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
common_cff.precision
precision
Definition: common_cff.py:44
MessageDrop.h
l1t::GlobalScales::getScalesName
virtual std::string getScalesName() const
Definition: GlobalScales.cc:27
l1t::GlobalScales::getPrec_DeltaPhi_Cos
unsigned int getPrec_DeltaPhi_Cos(const std::string &lutName) const
Definition: GlobalScales.cc:435
l1t::GlobalScales::dumpAllLUTs
virtual void dumpAllLUTs(std::ostream &myCout) const
Definition: GlobalScales.cc:479
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
l1t::GlobalScales::setLUT_DeltaPhi
virtual void setLUT_DeltaPhi(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:71
l1t::GlobalScales::printScale
virtual void printScale(ScaleParameters scale, std::ostream &myCout) const
Definition: GlobalScales.cc:676
createfilelist.int
int
Definition: createfilelist.py:10
l1t::GlobalScales::ScaleParameters
typedef for a single object template
Definition: GlobalScales.h:35
value
Definition: value.py:1
l1t::GlobalScales::getPrec_DeltaEta
unsigned int getPrec_DeltaEta(const std::string &lutName) const
Definition: GlobalScales.cc:205
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
itr
std::vector< std::pair< float, float > >::iterator itr
Definition: HGCDigitizer.cc:29
l1t::GlobalScales::setLUT_Pt
virtual void setLUT_Pt(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:87
l1t::GlobalScales::getLUT_DeltaPhi_Cos
long long getLUT_DeltaPhi_Cos(std::string lutName, int element) const
Definition: GlobalScales.cc:360
l1t::GlobalScales::setLUT_Sin
virtual void setLUT_Sin(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:129
l1t::GlobalScales::getLUT_CalMuEta
long long getLUT_CalMuEta(const std::string &lutName, int element) const
Definition: GlobalScales.cc:143
l1t::GlobalScales::getPrec_DeltaPhi
unsigned int getPrec_DeltaPhi(const std::string &lutName) const
Definition: GlobalScales.cc:259
l1t::GlobalScales::setLUT_CalMuEta
virtual void setLUT_CalMuEta(const std::string &lutName, std::vector< long long > lut)
Definition: GlobalScales.cc:29
relativeConstraints.value
value
Definition: relativeConstraints.py:53
l1t::GlobalScales::getLUT_DeltaEta_Cosh
long long getLUT_DeltaEta_Cosh(std::string lutName, int element) const
Definition: GlobalScales.cc:306
l1t::GlobalScales::getLUT_DeltaPhi
long long getLUT_DeltaPhi(std::string lutName, int element) const
Definition: GlobalScales.cc:227
GlobalScales.h
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
l1t::GlobalScales::GlobalScales
GlobalScales()
Definition: GlobalScales.cc:22
genParticles_cff.map
map
Definition: genParticles_cff.py:11
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
l1t::GlobalScales::setLUT_DeltaEta
virtual void setLUT_DeltaEta(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:55
l1t::GlobalScales::getPrec_Sin
unsigned int getPrec_Sin(const std::string &lutName) const
Definition: GlobalScales.cc:468