30 if (m_lut_CalMuEta.count(lutName) != 0) {
31 LogTrace(
"GlobalScales") <<
" LUT \"" << lutName <<
"\"already exists in the LUT map- not inserted!" 43 if (m_lut_CalMuPhi.count(lutName) != 0) {
44 LogTrace(
"GlobalScales") <<
" LUT \"" << lutName <<
"\"already exists in the LUT map- not inserted!" 56 std::vector<long long> lut,
58 if (m_lut_DeltaEta.count(lutName) != 0) {
59 LogTrace(
"GlobalScales") <<
" LUT \"" << lutName <<
"\"already exists in the LUT map- not inserted!" 72 std::vector<long long> lut,
74 if (m_lut_DeltaPhi.count(lutName) != 0) {
75 LogTrace(
"GlobalScales") <<
" LUT \"" << lutName <<
"\"already exists in the LUT map- not inserted!" 88 if (m_lut_Pt.count(lutName) != 0) {
89 LogTrace(
"GlobalScales") <<
" LUT \"" << lutName <<
"\"already exists in the LUT map- not inserted!" 103 if (m_lut_Upt.count(lutName) != 0) {
104 LogTrace(
"GlobalScales") <<
" LUT \"" << lutName <<
"\"already exists in the LUT map- not inserted!" 117 if (m_lut_Cosh.count(lutName) != 0) {
118 LogTrace(
"GlobalScales") <<
" LUT \"" << lutName <<
"\"already exists in the LUT map- not inserted!" 131 if (m_lut_Cos.count(lutName) != 0) {
132 LogTrace(
"GlobalScales") <<
" LUT \"" << lutName <<
"\"already exists in the LUT map- not inserted!" 145 if (m_lut_Sin.count(lutName) != 0) {
146 LogTrace(
"GlobalScales") <<
" LUT \"" << lutName <<
"\"already exists in the LUT map- not inserted!" 162 edm::LogError(
"GlobalScales") <<
"Error: Negative index, " << element <<
", requested for CalMuEta LUT ( " 163 << lutName <<
")" << std::endl;
164 }
else if (element >= (
int)m_lut_CalMuEta.find(lutName)->second.size()) {
165 edm::LogError(
"GlobalScales") <<
"Error: Element Requested " << element <<
" too large for CalMuEta LUT (" 166 << lutName <<
") size = " << m_lut_CalMuEta.find(lutName)->second.size() << std::endl;
168 value = m_lut_CalMuEta.find(lutName)->second.at(element);
177 edm::LogError(
"GlobalScales") <<
"Error: Negative index, " << element <<
", requested for CalMuPhi LUT ( " 178 << lutName <<
")" << std::endl;
179 }
else if (element >= (
int)m_lut_CalMuPhi.find(lutName)->second.size()) {
180 edm::LogError(
"GlobalScales") <<
"Error: Element Requested " << element <<
" too large for CalMuPhi LUT (" 181 << lutName <<
") size = " << m_lut_CalMuPhi.find(lutName)->second.size() << std::endl;
183 value = m_lut_CalMuPhi.find(lutName)->second.at(element);
192 if (m_lut_DeltaEta.find(lutName) == m_lut_DeltaEta.end()) {
194 std::size_t
pos = lutName.find(
'-');
197 name += lutName.substr(0,
pos);
200 if (m_lut_DeltaEta.find(
name) == m_lut_DeltaEta.end()) {
201 edm::LogError(
"GlobalScales") <<
"Warning: No LUT by name " << lutName <<
" or " <<
name <<
" exists! " 210 edm::LogError(
"GlobalScales") <<
"Error: Negative index, " << element <<
", requested for DeltaEta LUT ( " 211 << lutName <<
")" << std::endl;
212 }
else if (element >= (
int)m_lut_DeltaEta.find(lutName)->second.size()) {
213 edm::LogError(
"GlobalScales") <<
"Error: Element Requested " << element <<
" too large for DeltaEta LUT (" 214 << lutName <<
") size = " << m_lut_DeltaEta.find(lutName)->second.size() << std::endl;
216 value = m_lut_DeltaEta.find(lutName)->second.at(element);
221 unsigned int value = 0;
223 if (m_Prec_DeltaEta.find(lutName) != m_Prec_DeltaEta.end()) {
224 value = m_Prec_DeltaEta.find(lutName)->second;
227 std::size_t
pos = lutName.find(
'-');
230 name += lutName.substr(0,
pos);
233 if (m_Prec_DeltaEta.find(
name) != m_Prec_DeltaEta.end()) {
234 value = m_Prec_DeltaEta.find(
name)->second;
236 edm::LogError(
"GlobalScales") <<
"Warning: LUT " << lutName <<
" for DeltaEta not found" << std::endl;
246 if (m_lut_DeltaPhi.find(lutName) == m_lut_DeltaPhi.end()) {
248 std::size_t
pos = lutName.find(
'-');
251 name += lutName.substr(0,
pos);
254 if (m_lut_DeltaPhi.find(
name) == m_lut_DeltaPhi.end()) {
255 edm::LogError(
"GlobalScales") <<
"Warning: No LUT by name " << lutName <<
" or " <<
name <<
" exists! " 264 edm::LogError(
"GlobalScales") <<
"Error: Negative index, " << element <<
", requested for DeltaPhi LUT ( " 265 << lutName <<
")" << std::endl;
266 }
else if (element >= (
int)m_lut_DeltaPhi.find(lutName)->second.size()) {
267 edm::LogError(
"GlobalScales") <<
"Error: Element Requested " << element <<
" too large for DeltaPhi LUT (" 268 << lutName <<
") size = " << m_lut_DeltaPhi.find(lutName)->second.size() << std::endl;
270 value = m_lut_DeltaPhi.find(lutName)->second.at(element);
275 unsigned int value = 0;
277 if (m_Prec_DeltaPhi.find(lutName) != m_Prec_DeltaPhi.end()) {
278 value = m_Prec_DeltaPhi.find(lutName)->second;
281 std::size_t
pos = lutName.find(
'-');
284 name += lutName.substr(0,
pos);
287 if (m_Prec_DeltaPhi.find(
name) != m_Prec_DeltaPhi.end()) {
288 value = m_Prec_DeltaPhi.find(
name)->second;
290 edm::LogError(
"GlobalScales") <<
"Warning: LUT " << lutName <<
" for DeltaPhi not found" << std::endl;
300 edm::LogError(
"GlobalScales") <<
"Error: Negative index, " << element <<
", requested for Pt LUT ( " << lutName
302 }
else if (element >= (
int)m_lut_Pt.find(lutName)->second.size()) {
303 edm::LogError(
"GlobalScales") <<
"Error: Element Requested " << element <<
" too large for Pt LUT (" << lutName
304 <<
") size = " << m_lut_Pt.find(lutName)->second.size() << std::endl;
306 value = m_lut_Pt.find(lutName)->second.at(element);
311 unsigned int value = 0;
313 if (m_Prec_Pt.find(lutName) != m_Prec_Pt.end()) {
314 value = m_Prec_Pt.find(lutName)->second;
316 edm::LogError(
"GlobalScales") <<
"Warning: LUT " << lutName <<
" for Pt not found" << std::endl;
326 edm::LogError(
"GlobalScales") <<
"Error: Negative index, " << element <<
", requested for Upt LUT ( " << lutName
328 }
else if (element >= (
int)m_lut_Upt.find(lutName)->second.size()) {
329 edm::LogError(
"GlobalScales") <<
"Error: Element Requested " << element <<
" too large for Upt LUT (" << lutName
330 <<
") size = " << m_lut_Upt.find(lutName)->second.size() << std::endl;
332 value = m_lut_Upt.find(lutName)->second.at(element);
338 unsigned int value = 0;
340 if (m_Prec_Upt.find(lutName) != m_Prec_Upt.end()) {
341 value = m_Prec_Upt.find(lutName)->second;
343 edm::LogError(
"GlobalScales") <<
"Warning: LUT " << lutName <<
" for Upt not found" << std::endl;
352 if (m_lut_Cosh.find(lutName) == m_lut_Cosh.end()) {
354 std::size_t
pos = lutName.find(
'-');
357 name += lutName.substr(0,
pos);
360 if (m_lut_Cosh.find(
name) == m_lut_Cosh.end()) {
361 edm::LogError(
"GlobalScales") <<
"Warning: No LUT by name " << lutName <<
" or " <<
name <<
" exists! " 370 edm::LogError(
"GlobalScales") <<
"Error: Negative index, " << element <<
", requested for Cosh LUT ( " << lutName
372 }
else if (element >= (
int)m_lut_Cosh.find(lutName)->second.size()) {
373 edm::LogError(
"GlobalScales") <<
"Error: Element Requested " << element <<
" too large for Cosh LUT (" << lutName
374 <<
") size = " << m_lut_Cosh.find(lutName)->second.size() << std::endl;
376 value = m_lut_Cosh.find(lutName)->second.at(element);
381 unsigned int value = 0;
383 if (m_Prec_Cosh.find(lutName) != m_Prec_Cosh.end()) {
384 value = m_Prec_Cosh.find(lutName)->second;
387 std::size_t
pos = lutName.find(
'-');
390 name += lutName.substr(0,
pos);
393 if (m_Prec_Cosh.find(
name) != m_Prec_Cosh.end()) {
396 edm::LogError(
"GlobalScales") <<
"Warning: LUT " << lutName <<
" for Cosh not found" << std::endl;
406 if (m_lut_Cos.find(lutName) == m_lut_Cos.end()) {
408 std::size_t
pos = lutName.find(
'-');
411 name += lutName.substr(0,
pos);
414 if (m_lut_Cos.find(
name) == m_lut_Cos.end()) {
415 edm::LogError(
"GlobalScales") <<
"Warning: No LUT by name " << lutName <<
" or " <<
name <<
" exists! " 424 edm::LogError(
"GlobalScales") <<
"Error: Negative index, " << element <<
", requested for Cos LUT ( " << lutName
426 }
else if (element >= (
int)m_lut_DeltaPhi.find(lutName)->second.size()) {
427 edm::LogError(
"GlobalScales") <<
"Error: Element Requested " << element <<
" too large for Cos LUT (" << lutName
428 <<
") size = " << m_lut_Cos.find(lutName)->second.size() << std::endl;
430 value = m_lut_Cos.find(lutName)->second.at(element);
439 if (m_lut_Cos.find(lutName) == m_lut_Cos.end()) {
440 edm::LogError(
"GlobalScales") <<
"Warning: No LUT by name " << lutName <<
" exists! " << std::endl;
445 edm::LogError(
"GlobalScales") <<
"Error: Negative index, " << element <<
", requested for Cos LUT ( " << lutName
447 }
else if (element >= (
int)m_lut_Cos.find(lutName)->second.size()) {
448 edm::LogError(
"GlobalScales") <<
"Error: Element Requested " << element <<
" too large for Cos LUT (" << lutName
449 <<
") size = " << m_lut_Cos.find(lutName)->second.size() << std::endl;
451 value = m_lut_Cos.find(lutName)->second.at(element);
460 if (m_lut_Sin.find(lutName) == m_lut_Sin.end()) {
461 edm::LogError(
"GlobalScales") <<
"Warning: No LUT by name " << lutName <<
" exists! " << std::endl;
466 edm::LogError(
"GlobalScales") <<
"Error: Negative index, " << element <<
", requested for Sin LUT ( " << lutName
468 }
else if (element >= (
int)m_lut_Sin.find(lutName)->second.size()) {
469 edm::LogError(
"GlobalScales") <<
"Error: Element Requested " << element <<
" too large for Sin LUT (" << lutName
470 <<
") size = " << m_lut_Sin.find(lutName)->second.size() << std::endl;
472 value = m_lut_Sin.find(lutName)->second.at(element);
478 unsigned int value = 0;
480 if (m_Prec_Cos.find(lutName) != m_Prec_Cos.end()) {
481 value = m_Prec_Cos.find(lutName)->second;
484 std::size_t
pos = lutName.find(
'-');
487 name += lutName.substr(0,
pos);
490 if (m_Prec_Cos.find(
name) != m_Prec_Cos.end()) {
493 edm::LogError(
"GlobalScales") <<
"Warning: LUT " << lutName <<
" for Cos not found" << std::endl;
500 unsigned int value = 0;
502 if (m_Prec_Sin.find(lutName) != m_Prec_Sin.end()) {
503 value = m_Prec_Sin.find(lutName)->second;
505 edm::LogError(
"GlobalScales") <<
"Warning: LUT " << lutName <<
" for Sin not found" << std::endl;
511 unsigned int value = 0;
513 if (m_Prec_Sin.find(lutName) != m_Prec_Sin.end()) {
514 value = m_Prec_Sin.find(lutName)->second;
516 edm::LogError(
"GlobalScales") <<
"Warning: LUT " << lutName <<
" for Sin not found" << std::endl;
522 for (
std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_CalMuEta.begin();
523 itr != m_lut_CalMuEta.end();
525 dumpLUT(myCout, 1, itr->first);
528 for (
std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_CalMuPhi.begin();
529 itr != m_lut_CalMuPhi.end();
531 dumpLUT(myCout, 2, itr->first);
534 for (
std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_DeltaEta.begin();
535 itr != m_lut_DeltaEta.end();
537 dumpLUT(myCout, 3, itr->first);
540 for (
std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_DeltaPhi.begin();
541 itr != m_lut_DeltaPhi.end();
543 dumpLUT(myCout, 4, itr->first);
546 for (
std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_Cosh.begin(); itr != m_lut_Cosh.end();
548 dumpLUT(myCout, 5, itr->first);
551 for (
std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_Cos.begin(); itr != m_lut_Cos.end();
553 dumpLUT(myCout, 6, itr->first);
556 for (
std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_Sin.begin(); itr != m_lut_Sin.end();
558 dumpLUT(myCout, 7, itr->first);
561 for (
std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_Pt.begin(); itr != m_lut_Pt.end();
563 dumpLUT(myCout, 8, itr->first);
566 for (
std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_Upt.begin(); itr != m_lut_Upt.end();
568 dumpLUT(myCout, 8, itr->first);
573 std::vector<long long> dumpV;
574 unsigned int prec = 0;
578 dumpV = m_lut_CalMuEta.find(
name)->second;
583 dumpV = m_lut_CalMuPhi.find(
name)->second;
588 dumpV = m_lut_DeltaEta.find(
name)->second;
589 prec = m_Prec_DeltaEta.find(
name)->second;
594 dumpV = m_lut_DeltaPhi.find(
name)->second;
595 prec = m_Prec_DeltaPhi.find(
name)->second;
600 dumpV = m_lut_Cosh.find(
name)->second;
601 prec = m_Prec_Cosh.find(
name)->second;
606 dumpV = m_lut_Cos.find(
name)->second;
607 prec = m_Prec_Cos.find(
name)->second;
612 dumpV = m_lut_Sin.find(
name)->second;
613 prec = m_Prec_Sin.find(
name)->second;
618 dumpV = m_lut_Pt.find(
name)->second;
619 prec = m_Prec_Pt.find(
name)->second;
624 dumpV = m_lut_Upt.find(
name)->second;
625 prec = m_Prec_Upt.find(
name)->second;
631 myCout <<
"=========================================" << std::endl;
632 myCout <<
" LUT: " <<
type <<
" Table: " <<
name <<
" Size = " << dumpV.size() <<
" Precision " << prec
634 myCout <<
"=========================================" << std::endl;
635 for (
int i = 0;
i < (
int)dumpV.size();
i++) {
636 myCout <<
" Element " <<
i <<
" " << dumpV.at(
i) << std::endl;
641 myCout <<
"\n ************* L1T Global Scales ************" << std::endl;
643 myCout <<
" Muon Scales: " << std::endl;
644 printScale(m_muScales, myCout);
646 myCout <<
" EG Scales: " << std::endl;
647 printScale(m_egScales, myCout);
649 myCout <<
" Tau Scales: " << std::endl;
650 printScale(m_tauScales, myCout);
652 myCout <<
" Jet Scales: " << std::endl;
653 printScale(m_jetScales, myCout);
655 myCout <<
" HTT Scales: " << std::endl;
656 printScale(m_httScales, myCout);
658 myCout <<
" ETT Scales: " << std::endl;
659 printScale(m_ettScales, myCout);
661 myCout <<
" HTM Scales: " << std::endl;
662 printScale(m_htmScales, myCout);
664 myCout <<
" ETM Scales: " << std::endl;
665 printScale(m_etmScales, myCout);
668 myCout <<
" LUTs Stored: " << std::endl;
669 myCout <<
" CalMuEta:";
670 for (
std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_CalMuEta.begin();
671 itr != m_lut_CalMuEta.end();
673 myCout <<
" " << itr->first;
677 myCout <<
" CalMuPhi:";
678 for (
std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_CalMuPhi.begin();
679 itr != m_lut_CalMuPhi.end();
681 myCout <<
" " << itr->first;
685 myCout <<
" DeltaEta:";
686 for (
std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_DeltaEta.begin();
687 itr != m_lut_DeltaEta.end();
689 myCout <<
" " << itr->first;
693 myCout <<
" DeltaPhi:";
694 for (
std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_DeltaPhi.begin();
695 itr != m_lut_DeltaPhi.end();
697 myCout <<
" " << itr->first;
702 for (
std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_Cos.begin(); itr != m_lut_Cos.end();
704 myCout <<
" " << itr->first;
709 for (
std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_Sin.begin(); itr != m_lut_Sin.end();
711 myCout <<
" " << itr->first;
716 for (
std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_Cosh.begin(); itr != m_lut_Cosh.end();
718 myCout <<
" " << itr->first;
723 for (
std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_Pt.begin(); itr != m_lut_Pt.end();
725 myCout <<
" " << itr->first;
731 for (
std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_Upt.begin(); itr != m_lut_Upt.end();
733 myCout <<
" " << itr->first;
738 myCout <<
" Pt Min = " << std::setw(10) <<
scale.etMin <<
" Pt Max = " << std::setw(10) <<
scale.etMax
739 <<
" Pt Step = " << std::setw(10) <<
scale.etStep <<
" Number = " << std::setw(10)
740 <<
scale.etBins.size() << std::endl;
742 for (
int i = 0;
i <
int(
scale.etBins.size());
i++) {
743 std::pair<double, double> binEdges =
scale.etBins.at(
i);
744 myCout <<
" etBins[" <<
i <<
"]\trange:\t" << binEdges.first <<
" - " << binEdges.second << std::endl;
747 myCout <<
"\n Phi Min = " << std::setw(10) <<
scale.phiMin <<
" Phi Max = " << std::setw(10) <<
scale.phiMax
748 <<
" Phi Step = " << std::setw(10) <<
scale.phiStep <<
" Number = " << std::setw(10)
749 <<
scale.phiBins.size() << std::endl;
751 for (
int i = 0;
i <
int(
scale.phiBins.size());
i++) {
752 std::pair<double, double> binEdges =
scale.phiBins.at(
i);
753 myCout <<
" phiBins[" <<
i <<
"]\trange:\t" << binEdges.first <<
" - " << binEdges.second << std::endl;
756 myCout <<
"\n Eta Min = " << std::setw(10) <<
scale.etaMin <<
" Eta Max = " << std::setw(10) <<
scale.etaMax
757 <<
" Eta Step = " << std::setw(10) <<
scale.etaStep <<
" Number = " << std::setw(10)
758 <<
scale.etaBins.size() << std::endl;
760 for (
int i = 0;
i <
int(
scale.etaBins.size());
i++) {
761 std::pair<double, double> binEdges =
scale.etaBins.at(
i);
762 myCout <<
" etaBins[" <<
i <<
"]\trange:\t" << binEdges.first <<
" - " << binEdges.second << std::endl;
long long getLUT_CalMuPhi(const std::string &lutName, int element) const
long long getLUT_DeltaPhi(std::string lutName, int element) const
unsigned int getPrec_Sin(const std::string &lutName) const
unsigned int getPrec_DeltaPhi(const std::string &lutName) const
long long getLUT_DeltaEta_Cosh(std::string lutName, int element) const
virtual void printScale(ScaleParameters scale, std::ostream &myCout) const
unsigned int getPrec_DeltaPhi_Cos(const std::string &lutName) const
long long getLUT_Upt(const std::string &lutName, int element) const
virtual std::string getScalesName() const
virtual void setLUT_CalMuPhi(const std::string &lutName, std::vector< long long > lut)
virtual void setLUT_Upt(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
virtual void setLUT_DeltaEta(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
long long getLUT_Cos(const std::string &lutName, int element) const
Log< level::Error, false > LogError
unsigned int getPrec_Pt(const std::string &lutName) const
long long getLUT_Pt(const std::string &lutName, int element) const
virtual void setLUT_Cos(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Container::value_type value_type
unsigned int getPrec_Cos(const std::string &lutName) const
virtual void dumpLUT(std::ostream &myCout, int LUTtype, std::string name) const
virtual void setLUT_Cosh(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
long long getLUT_CalMuEta(const std::string &lutName, int element) const
virtual void setLUT_DeltaPhi(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
unsigned int getPrec_DeltaEta(const std::string &lutName) const
long long getLUT_DeltaEta(std::string lutName, int element) const
long long getLUT_DeltaPhi_Cos(std::string lutName, int element) const
virtual void setLUT_Pt(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
unsigned int getPrec_Upt(const std::string &lutName) const
typedef for a single object template
unsigned int getPrec_DeltaEta_Cosh(const std::string &lutName) const
long long getLUT_Sin(const std::string &lutName, int element) const
virtual void print(std::ostream &myCout) const
virtual void setLUT_CalMuEta(const std::string &lutName, std::vector< long long > lut)
virtual void setLUT_Sin(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
virtual void dumpAllLUTs(std::ostream &myCout) const