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!"
102 if (m_lut_Cosh.count(lutName) != 0) {
103 LogTrace(
"GlobalScales") <<
" LUT \"" << lutName <<
"\"already exists in the LUT map- not inserted!"
116 if (m_lut_Cos.count(lutName) != 0) {
117 LogTrace(
"GlobalScales") <<
" LUT \"" << lutName <<
"\"already exists in the LUT map- not inserted!"
130 if (m_lut_Sin.count(lutName) != 0) {
131 LogTrace(
"GlobalScales") <<
" LUT \"" << lutName <<
"\"already exists in the LUT map- not inserted!"
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;
153 value = m_lut_CalMuEta.find(lutName)->second.at(element);
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;
168 value = m_lut_CalMuPhi.find(lutName)->second.at(element);
177 if (m_lut_DeltaEta.find(lutName) == m_lut_DeltaEta.end()) {
179 std::size_t
pos = lutName.find(
'-');
182 name += lutName.substr(0,
pos);
185 if (m_lut_DeltaEta.find(
name) == m_lut_DeltaEta.end()) {
186 edm::LogError(
"GlobalScales") <<
"Warning: No LUT by name " << lutName <<
" or " <<
name <<
" exists! "
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;
201 value = m_lut_DeltaEta.find(lutName)->second.at(element);
206 unsigned int value = 0;
208 if (m_Prec_DeltaEta.find(lutName) != m_Prec_DeltaEta.end()) {
209 value = m_Prec_DeltaEta.find(lutName)->second;
212 std::size_t
pos = lutName.find(
'-');
215 name += lutName.substr(0,
pos);
218 if (m_Prec_DeltaEta.find(
name) != m_Prec_DeltaEta.end()) {
219 value = m_Prec_DeltaEta.find(
name)->second;
221 edm::LogError(
"GlobalScales") <<
"Warning: LUT " << lutName <<
" for DeltaEta not found" << std::endl;
231 if (m_lut_DeltaPhi.find(lutName) == m_lut_DeltaPhi.end()) {
233 std::size_t
pos = lutName.find(
'-');
236 name += lutName.substr(0,
pos);
239 if (m_lut_DeltaPhi.find(
name) == m_lut_DeltaPhi.end()) {
240 edm::LogError(
"GlobalScales") <<
"Warning: No LUT by name " << lutName <<
" or " <<
name <<
" exists! "
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;
255 value = m_lut_DeltaPhi.find(lutName)->second.at(element);
260 unsigned int value = 0;
262 if (m_Prec_DeltaPhi.find(lutName) != m_Prec_DeltaPhi.end()) {
263 value = m_Prec_DeltaPhi.find(lutName)->second;
266 std::size_t
pos = lutName.find(
'-');
269 name += lutName.substr(0,
pos);
272 if (m_Prec_DeltaPhi.find(
name) != m_Prec_DeltaPhi.end()) {
273 value = m_Prec_DeltaPhi.find(
name)->second;
275 edm::LogError(
"GlobalScales") <<
"Warning: LUT " << lutName <<
" for DeltaPhi not found" << std::endl;
285 edm::LogError(
"GlobalScales") <<
"Error: Negative index, " << element <<
", requested for Pt LUT ( " << lutName
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;
291 value = m_lut_Pt.find(lutName)->second.at(element);
296 unsigned int value = 0;
298 if (m_Prec_Pt.find(lutName) != m_Prec_Pt.end()) {
299 value = m_Prec_Pt.find(lutName)->second;
301 edm::LogError(
"GlobalScales") <<
"Warning: LUT " << lutName <<
" for Pt not found" << std::endl;
310 if (m_lut_Cosh.find(lutName) == m_lut_Cosh.end()) {
312 std::size_t
pos = lutName.find(
'-');
315 name += lutName.substr(0,
pos);
318 if (m_lut_Cosh.find(
name) == m_lut_Cosh.end()) {
319 edm::LogError(
"GlobalScales") <<
"Warning: No LUT by name " << lutName <<
" or " <<
name <<
" exists! "
328 edm::LogError(
"GlobalScales") <<
"Error: Negative index, " << element <<
", requested for Cosh LUT ( " << lutName
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;
334 value = m_lut_Cosh.find(lutName)->second.at(element);
339 unsigned int value = 0;
341 if (m_Prec_Cosh.find(lutName) != m_Prec_Cosh.end()) {
342 value = m_Prec_Cosh.find(lutName)->second;
345 std::size_t
pos = lutName.find(
'-');
348 name += lutName.substr(0,
pos);
351 if (m_Prec_Cosh.find(
name) != m_Prec_Cosh.end()) {
354 edm::LogError(
"GlobalScales") <<
"Warning: LUT " << lutName <<
" for Cosh not found" << std::endl;
364 if (m_lut_Cos.find(lutName) == m_lut_Cos.end()) {
366 std::size_t
pos = lutName.find(
'-');
369 name += lutName.substr(0,
pos);
372 if (m_lut_Cos.find(
name) == m_lut_Cos.end()) {
373 edm::LogError(
"GlobalScales") <<
"Warning: No LUT by name " << lutName <<
" or " <<
name <<
" exists! "
382 edm::LogError(
"GlobalScales") <<
"Error: Negative index, " << element <<
", requested for Cos LUT ( " << lutName
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;
388 value = m_lut_Cos.find(lutName)->second.at(element);
397 if (m_lut_Cos.find(lutName) == m_lut_Cos.end()) {
398 edm::LogError(
"GlobalScales") <<
"Warning: No LUT by name " << lutName <<
" exists! " << std::endl;
403 edm::LogError(
"GlobalScales") <<
"Error: Negative index, " << element <<
", requested for Cos LUT ( " << lutName
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;
409 value = m_lut_Cos.find(lutName)->second.at(element);
418 if (m_lut_Sin.find(lutName) == m_lut_Sin.end()) {
419 edm::LogError(
"GlobalScales") <<
"Warning: No LUT by name " << lutName <<
" exists! " << std::endl;
424 edm::LogError(
"GlobalScales") <<
"Error: Negative index, " << element <<
", requested for Sin LUT ( " << lutName
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;
430 value = m_lut_Sin.find(lutName)->second.at(element);
436 unsigned int value = 0;
438 if (m_Prec_Cos.find(lutName) != m_Prec_Cos.end()) {
439 value = m_Prec_Cos.find(lutName)->second;
442 std::size_t
pos = lutName.find(
'-');
445 name += lutName.substr(0,
pos);
448 if (m_Prec_Cos.find(
name) != m_Prec_Cos.end()) {
451 edm::LogError(
"GlobalScales") <<
"Warning: LUT " << lutName <<
" for Cos not found" << std::endl;
458 unsigned int value = 0;
460 if (m_Prec_Sin.find(lutName) != m_Prec_Sin.end()) {
461 value = m_Prec_Sin.find(lutName)->second;
463 edm::LogError(
"GlobalScales") <<
"Warning: LUT " << lutName <<
" for Sin not found" << std::endl;
469 unsigned int value = 0;
471 if (m_Prec_Sin.find(lutName) != m_Prec_Sin.end()) {
472 value = m_Prec_Sin.find(lutName)->second;
474 edm::LogError(
"GlobalScales") <<
"Warning: LUT " << lutName <<
" for Sin not found" << std::endl;
481 itr != m_lut_CalMuEta.end();
483 dumpLUT(myCout, 1,
itr->first);
487 itr != m_lut_CalMuPhi.end();
489 dumpLUT(myCout, 2,
itr->first);
493 itr != m_lut_DeltaEta.end();
495 dumpLUT(myCout, 3,
itr->first);
499 itr != m_lut_DeltaPhi.end();
501 dumpLUT(myCout, 4,
itr->first);
506 dumpLUT(myCout, 5,
itr->first);
511 dumpLUT(myCout, 6,
itr->first);
516 dumpLUT(myCout, 7,
itr->first);
521 dumpLUT(myCout, 8,
itr->first);
526 std::vector<long long> dumpV;
527 unsigned int prec = 0;
531 dumpV = m_lut_CalMuEta.find(
name)->second;
536 dumpV = m_lut_CalMuPhi.find(
name)->second;
541 dumpV = m_lut_DeltaEta.find(
name)->second;
542 prec = m_Prec_DeltaEta.find(
name)->second;
547 dumpV = m_lut_DeltaPhi.find(
name)->second;
548 prec = m_Prec_DeltaPhi.find(
name)->second;
553 dumpV = m_lut_Cosh.find(
name)->second;
554 prec = m_Prec_Cosh.find(
name)->second;
559 dumpV = m_lut_Cos.find(
name)->second;
560 prec = m_Prec_Cos.find(
name)->second;
565 dumpV = m_lut_Sin.find(
name)->second;
566 prec = m_Prec_Sin.find(
name)->second;
571 dumpV = m_lut_Pt.find(
name)->second;
572 prec = m_Prec_Pt.find(
name)->second;
578 myCout <<
"=========================================" << std::endl;
579 myCout <<
" LUT: " <<
type <<
" Table: " <<
name <<
" Size = " << dumpV.size() <<
" Precision " << prec
581 myCout <<
"=========================================" << std::endl;
582 for (
int i = 0;
i < (
int)dumpV.size();
i++) {
583 myCout <<
" Element " <<
i <<
" " << dumpV.at(
i) << std::endl;
588 myCout <<
"\n ************* L1T Global Scales ************" << std::endl;
590 myCout <<
" Muon Scales: " << std::endl;
591 printScale(m_muScales, myCout);
593 myCout <<
" EG Scales: " << std::endl;
594 printScale(m_egScales, myCout);
596 myCout <<
" Tau Scales: " << std::endl;
597 printScale(m_tauScales, myCout);
599 myCout <<
" Jet Scales: " << std::endl;
600 printScale(m_jetScales, myCout);
602 myCout <<
" HTT Scales: " << std::endl;
603 printScale(m_httScales, myCout);
605 myCout <<
" ETT Scales: " << std::endl;
606 printScale(m_ettScales, myCout);
608 myCout <<
" HTM Scales: " << std::endl;
609 printScale(m_htmScales, myCout);
611 myCout <<
" ETM Scales: " << std::endl;
612 printScale(m_etmScales, myCout);
615 myCout <<
" LUTs Stored: " << std::endl;
616 myCout <<
" CalMuEta:";
618 itr != m_lut_CalMuEta.end();
620 myCout <<
" " <<
itr->first;
624 myCout <<
" CalMuPhi:";
626 itr != m_lut_CalMuPhi.end();
628 myCout <<
" " <<
itr->first;
632 myCout <<
" DeltaEta:";
634 itr != m_lut_DeltaEta.end();
636 myCout <<
" " <<
itr->first;
640 myCout <<
" DeltaPhi:";
642 itr != m_lut_DeltaPhi.end();
644 myCout <<
" " <<
itr->first;
651 myCout <<
" " <<
itr->first;
658 myCout <<
" " <<
itr->first;
665 myCout <<
" " <<
itr->first;
672 myCout <<
" " <<
itr->first;
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;
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;
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;
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;
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;
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;