CMS 3D CMS Logo

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