41 if (m_lut_CalMuEta.count(lutName) != 0) {
42 LogTrace(
"GlobalScales") <<
" LUT \"" << lutName
43 <<
"\"already exists in the LUT map- not inserted!" << std::endl;
57 if (m_lut_CalMuPhi.count(lutName) != 0) {
58 LogTrace(
"GlobalScales") <<
" LUT \"" << lutName
59 <<
"\"already exists in the LUT map- not inserted!" << std::endl;
73 if (m_lut_DeltaEta.count(lutName) != 0) {
74 LogTrace(
"GlobalScales") <<
" LUT \"" << lutName
75 <<
"\"already exists in the LUT map- not inserted!" << std::endl;
89 if (m_lut_DeltaPhi.count(lutName) != 0) {
90 LogTrace(
"GlobalScales") <<
" LUT \"" << lutName
91 <<
"\"already exists in the LUT map- not inserted!" << std::endl;
105 if (m_lut_Pt.count(lutName) != 0) {
106 LogTrace(
"GlobalScales") <<
" LUT \"" << lutName
107 <<
"\"already exists in the LUT map- not inserted!" << std::endl;
121 if (m_lut_Cosh.count(lutName) != 0) {
122 LogTrace(
"GlobalScales") <<
" LUT \"" << lutName
123 <<
"\"already exists in the LUT map- not inserted!" << std::endl;
137 if (m_lut_Cos.count(lutName) != 0) {
138 LogTrace(
"GlobalScales") <<
" LUT \"" << lutName
139 <<
"\"already exists in the LUT map- not inserted!" << std::endl;
156 if(element < (
int)m_lut_CalMuEta.find(lutName)->second.size()) {
157 value = m_lut_CalMuEta.find(lutName)->second.at(element);
159 std::cout <<
"Warning: Element Requested " << element <<
" too large for CalMuEta LUT (" << lutName <<
") size = " << m_lut_CalMuEta.find(lutName)->second.size() << std::endl;
168 if(element < (
int)m_lut_CalMuPhi.find(lutName)->second.size()) {
169 value = m_lut_CalMuPhi.find(lutName)->second.at(element);
171 std::cout <<
"Warning: Element Requested " << element <<
" too large for CalMuPhi LUT (" << lutName <<
") size = " << m_lut_CalMuPhi.find(lutName)->second.size() << std::endl;
182 if(m_lut_DeltaEta.find(lutName) == m_lut_DeltaEta.end()) {
185 std::size_t pos = lutName.find(
"-");
188 name += lutName.substr(0,pos);
191 if(m_lut_DeltaEta.find(name) == m_lut_DeltaEta.end()) {
192 std::cout <<
"Warning: No LUT by name "<< lutName <<
" or " << name <<
" exists! " << std::endl;
200 if(element < (
int)m_lut_DeltaEta.find(lutName)->second.size()) {
201 value = m_lut_DeltaEta.find(lutName)->second.at(element);
203 std::cout <<
"Warning: Element Requested " << element <<
" too large for DeltaEta LUT (" << lutName <<
") size = " << m_lut_DeltaEta.find(lutName)->second.size() << std::endl;
209 unsigned int value = 0;
211 if(m_Prec_DeltaEta.find(lutName) != m_Prec_DeltaEta.end()) {
212 value = m_Prec_DeltaEta.find(lutName)->second;
216 std::size_t pos = lutName.find(
"-");
219 name += lutName.substr(0,pos);
222 if(m_Prec_DeltaEta.find(name) != m_Prec_DeltaEta.end()) {
223 value = m_Prec_DeltaEta.find(name)->second;
225 std::cout <<
"Warning: LUT " << lutName <<
" for DeltaEta not found" << std::endl;
237 if(m_lut_DeltaPhi.find(lutName) == m_lut_DeltaPhi.end()) {
240 std::size_t pos = lutName.find(
"-");
243 name += lutName.substr(0,pos);
246 if(m_lut_DeltaPhi.find(name) == m_lut_DeltaPhi.end()) {
247 std::cout <<
"Warning: No LUT by name "<< lutName <<
" or " << name <<
" exists! " << std::endl;
255 if(element < (
int)m_lut_DeltaPhi.find(lutName)->second.size()) {
256 value = m_lut_DeltaPhi.find(lutName)->second.at(element);
258 std::cout <<
"Warning: Element Requested " << element <<
" too large for DeltaPhi LUT (" << lutName <<
") size = " << m_lut_DeltaPhi.find(lutName)->second.size() << std::endl;
264 unsigned int value = 0;
266 if(m_Prec_DeltaPhi.find(lutName) != m_Prec_DeltaPhi.end()) {
267 value = m_Prec_DeltaPhi.find(lutName)->second;
271 std::size_t pos = lutName.find(
"-");
274 name += lutName.substr(0,pos);
277 if(m_Prec_DeltaPhi.find(name) != m_Prec_DeltaPhi.end()) {
278 value = m_Prec_DeltaPhi.find(name)->second;
280 std::cout <<
"Warning: LUT " << lutName <<
" for DeltaPhi not found" << std::endl;
291 if(element < (
int)m_lut_Pt.find(lutName)->second.size()) {
292 value = m_lut_Pt.find(lutName)->second.at(element);
294 std::cout <<
"Warning: Element Requested " << element <<
" too large for Pt LUT (" << lutName <<
") size = " << m_lut_Pt.find(lutName)->second.size() << std::endl;
300 unsigned int value = 0;
302 if(m_Prec_Pt.find(lutName) != m_Prec_Pt.end()) {
303 value = m_Prec_Pt.find(lutName)->second;
305 std::cout <<
"Warning: LUT " << lutName <<
" for Pt not found" << std::endl;
316 if(m_lut_Cosh.find(lutName) == m_lut_Cosh.end()) {
319 std::size_t pos = lutName.find(
"-");
322 name += lutName.substr(0,pos);
325 if(m_lut_Cosh.find(name) == m_lut_Cosh.end()) {
326 std::cout <<
"Warning: No LUT by name "<< lutName <<
" or " << name <<
" exists! " << std::endl;
333 if(element < (
int)m_lut_Cosh.find(lutName)->second.size()) {
334 value = m_lut_Cosh.find(lutName)->second.at(element);
336 std::cout <<
"Warning: Element Requested " << element <<
" too large for Cosh LUT (" << lutName <<
") size = " << m_lut_Cosh.find(lutName)->second.size() << std::endl;
342 unsigned int value = 0;
344 if(m_Prec_Cosh.find(lutName) != m_Prec_Cosh.end()) {
345 value = m_Prec_Cosh.find(lutName)->second;
349 std::size_t pos = lutName.find(
"-");
352 name += lutName.substr(0,pos);
355 if(m_Prec_Cosh.find(name) != m_Prec_Cosh.end()) {
356 value = m_Prec_Cosh.find(name)->second;
358 std::cout <<
"Warning: LUT " << lutName <<
" for Cosh not found" << std::endl;
369 if(m_lut_Cos.find(lutName) == m_lut_Cos.end()) {
372 std::size_t pos = lutName.find(
"-");
375 name += lutName.substr(0,pos);
378 if(m_lut_Cos.find(name) == m_lut_Cos.end()) {
379 std::cout <<
"Warning: No LUT by name "<< lutName <<
" or " << name <<
" exists! " << std::endl;
386 if(element < (
int)m_lut_Cos.find(lutName)->second.size()) {
387 value = m_lut_Cos.find(lutName)->second.at(element);
389 std::cout <<
"Warning: Element Requested " << element <<
" too large for Cos LUT (" << lutName <<
") size = " << m_lut_Cos.find(lutName)->second.size() << std::endl;
395 unsigned int value = 0;
397 if(m_Prec_Cos.find(lutName) != m_Prec_Cos.end()) {
398 value = m_Prec_Cos.find(lutName)->second;
402 std::size_t pos = lutName.find(
"-");
405 name += lutName.substr(0,pos);
408 if(m_Prec_Cos.find(name) != m_Prec_Cos.end()) {
409 value = m_Prec_Cos.find(name)->second;
411 std::cout <<
"Warning: LUT " << lutName <<
" for Cos not found" << std::endl;
420 for (std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_CalMuEta.begin(); itr != m_lut_CalMuEta.end(); itr++) {
421 dumpLUT(myCout,1,itr->first);
424 for (std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_CalMuPhi.begin(); itr != m_lut_CalMuPhi.end(); itr++) {
425 dumpLUT(myCout,2,itr->first);
429 for (std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_DeltaEta.begin(); itr != m_lut_DeltaEta.end(); itr++) {
430 dumpLUT(myCout,3,itr->first);
434 for (std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_DeltaPhi.begin(); itr != m_lut_DeltaPhi.end(); itr++) {
435 dumpLUT(myCout,4,itr->first);
439 for (std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_Cosh.begin(); itr != m_lut_Cosh.end(); itr++) {
440 dumpLUT(myCout,5,itr->first);
444 for (std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_Cos.begin(); itr != m_lut_Cos.end(); itr++) {
445 dumpLUT(myCout,6,itr->first);
449 for (std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_Pt.begin(); itr != m_lut_Pt.end(); itr++) {
450 dumpLUT(myCout,7,itr->first);
456 std::vector<long long> dumpV;
457 unsigned int prec = 0;
461 dumpV = m_lut_CalMuEta.find(name)->second;
466 dumpV = m_lut_CalMuPhi.find(name)->second;
471 dumpV = m_lut_DeltaEta.find(name)->second;
472 prec = m_Prec_DeltaEta.find(name)->second;
477 dumpV = m_lut_DeltaPhi.find(name)->second;
478 prec = m_Prec_DeltaPhi.find(name)->second;
483 dumpV = m_lut_Cosh.find(name)->second;
484 prec = m_Prec_Cosh.find(name)->second;
489 dumpV = m_lut_Cos.find(name)->second;
490 prec = m_Prec_Cos.find(name)->second;
495 dumpV = m_lut_Pt.find(name)->second;
496 prec = m_Prec_Pt.find(name)->second;
502 myCout <<
"=========================================" << std::endl;
503 myCout <<
" LUT: " << type <<
" Table: " << name <<
" Size = " << dumpV.size() <<
" Precision " << prec << std::endl;
504 myCout <<
"=========================================" << std::endl;
505 for(
int i=0;
i<(int)dumpV.size();
i++) {
506 myCout <<
" Element " <<
i <<
" " << dumpV.at(
i) << std::endl;
513 myCout <<
"\n ************* L1T Global Scales ************" << std::endl;
516 myCout <<
" Muon Scales: " << std::endl;
517 printScale(m_muScales,myCout);
519 myCout <<
" EG Scales: "<< std::endl;
520 printScale(m_egScales,myCout);
522 myCout <<
" Tau Scales: "<< std::endl;
523 printScale(m_tauScales,myCout);
525 myCout <<
" Jet Scales: "<< std::endl;
526 printScale(m_jetScales,myCout);
529 myCout <<
" HTT Scales: "<< std::endl;
530 printScale(m_httScales,myCout);
532 myCout <<
" ETT Scales: "<< std::endl;
533 printScale(m_ettScales,myCout);
535 myCout <<
" HTM Scales: "<< std::endl;
536 printScale(m_htmScales,myCout);
538 myCout <<
" ETM Scales: "<< std::endl;
539 printScale(m_etmScales,myCout);
543 myCout <<
" LUTs Stored: " << std::endl;
544 myCout <<
" CalMuEta:";
545 for (std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_CalMuEta.begin(); itr != m_lut_CalMuEta.end(); itr++) {
546 myCout <<
" " << itr->first;
550 myCout <<
" CalMuPhi:";
551 for (std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_CalMuPhi.begin(); itr != m_lut_CalMuPhi.end(); itr++) {
552 myCout <<
" " << itr->first;
556 myCout <<
" DeltaEta:";
557 for (std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_DeltaEta.begin(); itr != m_lut_DeltaEta.end(); itr++) {
558 myCout <<
" " << itr->first;
562 myCout <<
" DeltaPhi:";
563 for (std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_DeltaPhi.begin(); itr != m_lut_DeltaPhi.end(); itr++) {
564 myCout <<
" " << itr->first;
569 for (std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_Cos.begin(); itr != m_lut_Cos.end(); itr++) {
570 myCout <<
" " << itr->first;
575 for (std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_Cosh.begin(); itr != m_lut_Cosh.end(); itr++) {
576 myCout <<
" " << itr->first;
581 for (std::map<
std::string, std::vector<long long>>::const_iterator itr = m_lut_Pt.begin(); itr != m_lut_Pt.end(); itr++) {
582 myCout <<
" " << itr->first;
590 myCout <<
" Pt Min = " << std::setw(10) << scale.
etMin
591 <<
" Pt Max = " << std::setw(10) << scale.
etMax
592 <<
" Pt Step = " << std::setw(10) << scale.
etStep
593 <<
" Number = " << std::setw(10) << scale.
etBins.size()
594 <<
"\n Phi Min = " << std::setw(10) << scale.
phiMin
595 <<
" Phi Max = " << std::setw(10) << scale.
phiMax
596 <<
" Phi Step = " << std::setw(10) << scale.
phiStep
597 <<
" Number = " << std::setw(10) << scale.
phiBins.size()
598 <<
"\n Eta Min = " << std::setw(10) << scale.
etaMin
599 <<
" Eta Max = " << std::setw(10) << scale.
etaMax
600 <<
" Eta Step = " << std::setw(10) << scale.
etaStep
601 <<
" Number = " << std::setw(10) << scale.
etaBins.size()
virtual void setLUT_DeltaEta(std::string lutName, std::vector< long long > lut, unsigned int precision)
std::vector< std::pair< double, double > > etaBins
unsigned int getPrec_Pt(std::string lutName) const
std::vector< std::pair< double, double > > phiBins
virtual void setLUT_CalMuPhi(std::string lutName, std::vector< long long > lut)
long long getLUT_Cos(std::string lutName, int element) const
unsigned int getPrec_Cosh(std::string lutName) const
long long getLUT_DeltaEta(std::string lutName, int element) const
virtual void setLUT_Cosh(std::string lutName, std::vector< long long > lut, unsigned int precision)
virtual void dumpAllLUTs(std::ostream &myCout) const
long long getLUT_Pt(std::string lutName, int element) const
Container::value_type value_type
unsigned int getPrec_DeltaEta(std::string lutName) const
long long getLUT_Cosh(std::string lutName, int element) const
long long getLUT_CalMuEta(std::string lutName, int element) const
virtual void print(std::ostream &myCout) const
unsigned int getPrec_DeltaPhi(std::string lutName) const
virtual void setLUT_Cos(std::string lutName, std::vector< long long > lut, unsigned int precision)
virtual void setLUT_CalMuEta(std::string lutName, std::vector< long long > lut)
virtual void dumpLUT(std::ostream &myCout, int LUTtype, std::string name) const
std::vector< std::pair< double, double > > etBins
long long getLUT_DeltaPhi(std::string lutName, int element) const
virtual void setLUT_DeltaPhi(std::string lutName, std::vector< long long > lut, unsigned int precision)
virtual void setLUT_Pt(std::string lutName, std::vector< long long > lut, unsigned int precision)
typedef for a single object template
long long getLUT_CalMuPhi(std::string lutName, int element) const
virtual std::string getScalesName() const
unsigned int getPrec_Cos(std::string lutName) const
virtual void printScale(ScaleParameters scale, std::ostream &myCout) const