CMS 3D CMS Logo

L1GtEtaPhiConversions.cc
Go to the documentation of this file.
1 
15 // this class header
17 
18 // system include files
19 #include <iomanip>
20 #include <iostream>
21 
22 // user include files
23 
24 // base class
25 
26 //
28 
31 
34 
36 
37 // constructor
39  : m_nrBinsPhiMu(0),
40  m_nrBinsPhiJetEg(0),
41  m_nrBinsPhiEtm(0),
42  m_nrBinsPhiHtm(0),
43  m_nrBinsEtaCommon(0),
44  m_verbosity(0),
45  m_isDebugEnabled(edm::isDebugEnabled()) {
46  // prepare the pairs of L1GtObjects, reserve (by hand) memory for vectors
47  // the index of the pair in m_gtObjectPairVec is used to extract
48  // the information from the other vectors, so the push_back must be done
49  // coherently
50 
51  std::pair<L1GtObject, L1GtObject> gtObjPair;
52  m_gtObjectPairVec.reserve(56);
54  m_pairNrPhiBinsVec.reserve(56);
55  m_pairPhiConvVec.reserve(56);
56 
57  // Mu -> Jet & EG & ETM & HTM
58  //
59  gtObjPair = std::make_pair(Mu, CenJet);
60  m_gtObjectPairVec.push_back(gtObjPair);
61  m_pairConvertPhiFirstGtObject.push_back(true);
64 
65  gtObjPair = std::make_pair(CenJet, Mu);
66  m_gtObjectPairVec.push_back(gtObjPair);
67  m_pairConvertPhiFirstGtObject.push_back(false);
70 
71  //
72  gtObjPair = std::make_pair(Mu, ForJet);
73  m_gtObjectPairVec.push_back(gtObjPair);
74  m_pairConvertPhiFirstGtObject.push_back(true);
77 
78  gtObjPair = std::make_pair(ForJet, Mu);
79  m_gtObjectPairVec.push_back(gtObjPair);
80  m_pairConvertPhiFirstGtObject.push_back(false);
83 
84  //
85  gtObjPair = std::make_pair(Mu, TauJet);
86  m_gtObjectPairVec.push_back(gtObjPair);
87  m_pairConvertPhiFirstGtObject.push_back(true);
90 
91  gtObjPair = std::make_pair(TauJet, Mu);
92  m_gtObjectPairVec.push_back(gtObjPair);
93  m_pairConvertPhiFirstGtObject.push_back(false);
96 
97  //
98  gtObjPair = std::make_pair(Mu, NoIsoEG);
99  m_gtObjectPairVec.push_back(gtObjPair);
100  m_pairConvertPhiFirstGtObject.push_back(true);
103 
104  gtObjPair = std::make_pair(NoIsoEG, Mu);
105  m_gtObjectPairVec.push_back(gtObjPair);
106  m_pairConvertPhiFirstGtObject.push_back(false);
109 
110  //
111  gtObjPair = std::make_pair(Mu, IsoEG);
112  m_gtObjectPairVec.push_back(gtObjPair);
113  m_pairConvertPhiFirstGtObject.push_back(true);
116 
117  gtObjPair = std::make_pair(IsoEG, Mu);
118  m_gtObjectPairVec.push_back(gtObjPair);
119  m_pairConvertPhiFirstGtObject.push_back(false);
122 
123  //
124  gtObjPair = std::make_pair(Mu, ETM);
125  m_gtObjectPairVec.push_back(gtObjPair);
126  m_pairConvertPhiFirstGtObject.push_back(true);
128  m_pairPhiConvVec.push_back(&m_lutPhiMuToEtm);
129 
130  gtObjPair = std::make_pair(ETM, Mu);
131  m_gtObjectPairVec.push_back(gtObjPair);
132  m_pairConvertPhiFirstGtObject.push_back(false);
134  m_pairPhiConvVec.push_back(&m_lutPhiMuToEtm);
135 
136  //
137  gtObjPair = std::make_pair(Mu, HTM);
138  m_gtObjectPairVec.push_back(gtObjPair);
139  m_pairConvertPhiFirstGtObject.push_back(true);
141  m_pairPhiConvVec.push_back(&m_lutPhiMuToHtm);
142 
143  gtObjPair = std::make_pair(HTM, Mu);
144  m_gtObjectPairVec.push_back(gtObjPair);
145  m_pairConvertPhiFirstGtObject.push_back(false);
147  m_pairPhiConvVec.push_back(&m_lutPhiMuToHtm);
148 
149  // ETM -> Jet & EG
150  //
151  gtObjPair = std::make_pair(ETM, CenJet);
152  m_gtObjectPairVec.push_back(gtObjPair);
153  m_pairConvertPhiFirstGtObject.push_back(true);
156 
157  gtObjPair = std::make_pair(CenJet, ETM);
158  m_gtObjectPairVec.push_back(gtObjPair);
159  m_pairConvertPhiFirstGtObject.push_back(false);
162 
163  //
164  gtObjPair = std::make_pair(ETM, ForJet);
165  m_gtObjectPairVec.push_back(gtObjPair);
166  m_pairConvertPhiFirstGtObject.push_back(true);
169 
170  gtObjPair = std::make_pair(ForJet, ETM);
171  m_gtObjectPairVec.push_back(gtObjPair);
172  m_pairConvertPhiFirstGtObject.push_back(false);
175 
176  //
177  gtObjPair = std::make_pair(ETM, TauJet);
178  m_gtObjectPairVec.push_back(gtObjPair);
179  m_pairConvertPhiFirstGtObject.push_back(true);
182 
183  gtObjPair = std::make_pair(TauJet, ETM);
184  m_gtObjectPairVec.push_back(gtObjPair);
185  m_pairConvertPhiFirstGtObject.push_back(false);
188 
189  //
190  gtObjPair = std::make_pair(ETM, NoIsoEG);
191  m_gtObjectPairVec.push_back(gtObjPair);
192  m_pairConvertPhiFirstGtObject.push_back(true);
195 
196  gtObjPair = std::make_pair(NoIsoEG, ETM);
197  m_gtObjectPairVec.push_back(gtObjPair);
198  m_pairConvertPhiFirstGtObject.push_back(false);
201 
202  //
203  gtObjPair = std::make_pair(ETM, IsoEG);
204  m_gtObjectPairVec.push_back(gtObjPair);
205  m_pairConvertPhiFirstGtObject.push_back(true);
208 
209  gtObjPair = std::make_pair(IsoEG, ETM);
210  m_gtObjectPairVec.push_back(gtObjPair);
211  m_pairConvertPhiFirstGtObject.push_back(false);
214 
215  // HTM -> Jet & EG
216  //
217  gtObjPair = std::make_pair(HTM, CenJet);
218  m_gtObjectPairVec.push_back(gtObjPair);
219  m_pairConvertPhiFirstGtObject.push_back(true);
222 
223  gtObjPair = std::make_pair(CenJet, HTM);
224  m_gtObjectPairVec.push_back(gtObjPair);
225  m_pairConvertPhiFirstGtObject.push_back(false);
228 
229  //
230  gtObjPair = std::make_pair(HTM, ForJet);
231  m_gtObjectPairVec.push_back(gtObjPair);
232  m_pairConvertPhiFirstGtObject.push_back(true);
235 
236  gtObjPair = std::make_pair(ForJet, HTM);
237  m_gtObjectPairVec.push_back(gtObjPair);
238  m_pairConvertPhiFirstGtObject.push_back(false);
241 
242  //
243  gtObjPair = std::make_pair(HTM, TauJet);
244  m_gtObjectPairVec.push_back(gtObjPair);
245  m_pairConvertPhiFirstGtObject.push_back(true);
248 
249  gtObjPair = std::make_pair(TauJet, HTM);
250  m_gtObjectPairVec.push_back(gtObjPair);
251  m_pairConvertPhiFirstGtObject.push_back(false);
254 
255  //
256  gtObjPair = std::make_pair(HTM, NoIsoEG);
257  m_gtObjectPairVec.push_back(gtObjPair);
259  m_pairConvertPhiFirstGtObject.push_back(true);
261 
262  gtObjPair = std::make_pair(NoIsoEG, HTM);
263  m_gtObjectPairVec.push_back(gtObjPair);
264  m_pairConvertPhiFirstGtObject.push_back(false);
267 
268  //
269  gtObjPair = std::make_pair(HTM, IsoEG);
270  m_gtObjectPairVec.push_back(gtObjPair);
271  m_pairConvertPhiFirstGtObject.push_back(true);
274 
275  gtObjPair = std::make_pair(IsoEG, HTM);
276  m_gtObjectPairVec.push_back(gtObjPair);
277  m_pairConvertPhiFirstGtObject.push_back(false);
280 
281  // ETM -> HTM
282  //
283  gtObjPair = std::make_pair(ETM, HTM);
284  m_gtObjectPairVec.push_back(gtObjPair);
285  m_pairConvertPhiFirstGtObject.push_back(true);
288 
289  gtObjPair = std::make_pair(HTM, ETM);
290  m_gtObjectPairVec.push_back(gtObjPair);
291  m_pairConvertPhiFirstGtObject.push_back(false);
294 
295  // Jet & EG -> Jet & EG
296  //
297  gtObjPair = std::make_pair(CenJet, ForJet);
298  m_gtObjectPairVec.push_back(gtObjPair);
299  m_pairConvertPhiFirstGtObject.push_back(true);
302 
303  gtObjPair = std::make_pair(ForJet, CenJet);
304  m_gtObjectPairVec.push_back(gtObjPair);
305  m_pairConvertPhiFirstGtObject.push_back(false);
308 
309  //
310  gtObjPair = std::make_pair(CenJet, TauJet);
311  m_gtObjectPairVec.push_back(gtObjPair);
312  m_pairConvertPhiFirstGtObject.push_back(true);
315 
316  gtObjPair = std::make_pair(TauJet, CenJet);
317  m_gtObjectPairVec.push_back(gtObjPair);
318  m_pairConvertPhiFirstGtObject.push_back(false);
321 
322  //
323  gtObjPair = std::make_pair(CenJet, NoIsoEG);
324  m_gtObjectPairVec.push_back(gtObjPair);
325  m_pairConvertPhiFirstGtObject.push_back(true);
328 
329  gtObjPair = std::make_pair(NoIsoEG, CenJet);
330  m_gtObjectPairVec.push_back(gtObjPair);
331  m_pairConvertPhiFirstGtObject.push_back(false);
334 
335  //
336  gtObjPair = std::make_pair(CenJet, IsoEG);
337  m_gtObjectPairVec.push_back(gtObjPair);
338  m_pairConvertPhiFirstGtObject.push_back(true);
341 
342  gtObjPair = std::make_pair(IsoEG, CenJet);
343  m_gtObjectPairVec.push_back(gtObjPair);
344  m_pairConvertPhiFirstGtObject.push_back(false);
347 
348  //
349  gtObjPair = std::make_pair(ForJet, TauJet);
350  m_gtObjectPairVec.push_back(gtObjPair);
351  m_pairConvertPhiFirstGtObject.push_back(true);
354 
355  gtObjPair = std::make_pair(TauJet, ForJet);
356  m_gtObjectPairVec.push_back(gtObjPair);
357  m_pairConvertPhiFirstGtObject.push_back(false);
360 
361  //
362  gtObjPair = std::make_pair(ForJet, NoIsoEG);
363  m_gtObjectPairVec.push_back(gtObjPair);
364  m_pairConvertPhiFirstGtObject.push_back(true);
367 
368  gtObjPair = std::make_pair(NoIsoEG, ForJet);
369  m_gtObjectPairVec.push_back(gtObjPair);
370  m_pairConvertPhiFirstGtObject.push_back(false);
373 
374  //
375  gtObjPair = std::make_pair(ForJet, IsoEG);
376  m_gtObjectPairVec.push_back(gtObjPair);
377  m_pairConvertPhiFirstGtObject.push_back(true);
380 
381  gtObjPair = std::make_pair(IsoEG, ForJet);
382  m_gtObjectPairVec.push_back(gtObjPair);
383  m_pairConvertPhiFirstGtObject.push_back(false);
386 
387  //
388  gtObjPair = std::make_pair(TauJet, NoIsoEG);
389  m_gtObjectPairVec.push_back(gtObjPair);
390  m_pairConvertPhiFirstGtObject.push_back(true);
393 
394  gtObjPair = std::make_pair(NoIsoEG, TauJet);
395  m_gtObjectPairVec.push_back(gtObjPair);
396  m_pairConvertPhiFirstGtObject.push_back(false);
399 
400  //
401  gtObjPair = std::make_pair(TauJet, IsoEG);
402  m_gtObjectPairVec.push_back(gtObjPair);
403  m_pairConvertPhiFirstGtObject.push_back(true);
406 
407  gtObjPair = std::make_pair(IsoEG, TauJet);
408  m_gtObjectPairVec.push_back(gtObjPair);
409  m_pairConvertPhiFirstGtObject.push_back(false);
412 
413  //
414  gtObjPair = std::make_pair(NoIsoEG, IsoEG);
415  m_gtObjectPairVec.push_back(gtObjPair);
416  m_pairConvertPhiFirstGtObject.push_back(true);
419 
420  gtObjPair = std::make_pair(IsoEG, NoIsoEG);
421  m_gtObjectPairVec.push_back(gtObjPair);
422  m_pairConvertPhiFirstGtObject.push_back(false);
425 
426  // m_verbosity can not be used here, as L1GtEtaPhiConversions is called
427  // in L1GlobalTriggerGTL constructor, where m_verbosity is not yet set
428  if (m_isDebugEnabled) {
429  LogTrace("L1GlobalTrigger") << "\nm_gtObjectPairVec size: " << (m_gtObjectPairVec.size()) << std::endl;
430 
431  unsigned int iPair = 0;
432 
433  for (std::vector<std::pair<L1GtObject, L1GtObject>>::const_iterator cIter = m_gtObjectPairVec.begin();
434  cIter != m_gtObjectPairVec.end();
435  ++cIter) {
436  LogTrace("L1GlobalTrigger") << "m_gtObjectPairVec vector element [" << l1GtObjectEnumToString((*cIter).first)
437  << ", " << l1GtObjectEnumToString((*cIter).second) << "], \t\tpair index = " << iPair
438  << std::endl;
439 
440  iPair++;
441  }
442  }
443 }
444 
445 // destructor
447  // do nothing
448 }
449 
450 // methods
451 
452 const unsigned int L1GtEtaPhiConversions::gtObjectPairIndex(const L1GtObject &obj0, const L1GtObject &obj1) const {
453  std::pair<L1GtObject, L1GtObject> gtObjPair;
454  gtObjPair = std::make_pair(obj0, obj1);
455 
456  // LogTrace("L1GlobalTrigger") << "\nCompute index for pair ["
457  // << (l1GtObjectEnumToString(obj0)) << ", "
458  // << (l1GtObjectEnumToString(obj1)) << "]\n" << std::endl;
459 
460  unsigned int iPair = 0;
461  for (std::vector<std::pair<L1GtObject, L1GtObject>>::const_iterator cIter = m_gtObjectPairVec.begin();
462  cIter != m_gtObjectPairVec.end();
463  ++cIter) {
464  if (*cIter == gtObjPair) {
465  LogTrace("L1GlobalTrigger") << "\n Index for pair [" << l1GtObjectEnumToString(obj0) << ", "
466  << l1GtObjectEnumToString(obj1) << "] = " << iPair << std::endl;
467 
468  return iPair;
469  }
470 
471  iPair++;
472  }
473 
474  // if the pair was not found, return index outside vector size
475  // it should never happen, except due to programming error
476  // by using .at one gets an exception when using index outside vector size,
477  // due to the programming error...
478  return m_gtObjectPairVec.size();
479 }
480 
481 const bool L1GtEtaPhiConversions::convertPhiIndex(const unsigned int pairIndex,
482  const unsigned int positionPair,
483  const unsigned int initialIndex,
484  unsigned int &convertedIndex) const {
485  unsigned int newIndex = badIndex;
486  bool conversionStatus = false;
487 
488  // check if initial index is within the scale size
489  // could be outside the scale size if there are hardware errors
490  // or wrong scale conversions
491  if (initialIndex >= (*(m_pairPhiConvVec.at(pairIndex))).size()) {
492  if (m_verbosity && m_isDebugEnabled) {
493  LogTrace("L1GlobalTrigger") << (positionPair ? " Second" : "\n First") << " object from pair " << pairIndex
494  << ": initial phi index " << initialIndex
495  << " >= " << ((*(m_pairPhiConvVec.at(pairIndex))).size()) << " Conversion failed."
496  << std::endl;
497  }
498  } else {
499  if (m_verbosity && m_isDebugEnabled) {
500  LogTrace("L1GlobalTrigger") << (positionPair ? " Second" : "\n First") << " object from pair " << pairIndex
501  << ": initial phi index " << initialIndex << " within scale size "
502  << ((*(m_pairPhiConvVec.at(pairIndex))).size()) << std::endl;
503  }
504  }
505 
506  // convert the index
507  switch (positionPair) {
508  case 0: {
509  if (m_pairConvertPhiFirstGtObject.at(pairIndex)) {
510  newIndex = (*(m_pairPhiConvVec.at(pairIndex))).at(initialIndex);
511 
512  if (newIndex != badIndex) {
513  conversionStatus = true;
514 
515  if (m_verbosity && m_isDebugEnabled) {
516  LogTrace("L1GlobalTrigger") << (positionPair ? " Second" : "\n First") << " object from pair "
517  << pairIndex << ": initial phi index " << initialIndex << " converted to "
518  << newIndex << std::endl;
519  }
520 
521  } else {
522  conversionStatus = false;
523 
524  if (m_verbosity && m_isDebugEnabled) {
525  LogTrace("L1GlobalTrigger") << (positionPair ? " Second" : "\n First") << " object from pair "
526  << pairIndex << ": converted phi index " << newIndex << "is equal to badIndex "
527  << badIndex << " Conversion failed." << std::endl;
528  }
529  }
530 
531  } else {
532  newIndex = initialIndex;
533  conversionStatus = true;
534 
535  if (m_verbosity && m_isDebugEnabled) {
536  LogTrace("L1GlobalTrigger") << (positionPair ? " Second" : "\n First") << " object from pair "
537  << pairIndex << ": initial phi index " << initialIndex
538  << " not requested to be converted, return index " << newIndex << std::endl;
539  }
540  }
541  }
542 
543  break;
544  case 1: {
545  if (m_pairConvertPhiFirstGtObject.at(pairIndex)) {
546  newIndex = initialIndex;
547  conversionStatus = true;
548 
549  if (m_verbosity && m_isDebugEnabled) {
550  LogTrace("L1GlobalTrigger") << (positionPair ? " Second" : "\n First") << " object from pair "
551  << pairIndex << ": initial phi index " << initialIndex
552  << " not requested to be converted, return index, return index " << newIndex
553  << std::endl;
554  }
555  } else {
556  newIndex = (*(m_pairPhiConvVec.at(pairIndex))).at(initialIndex);
557 
558  if (newIndex != badIndex) {
559  conversionStatus = true;
560 
561  if (m_verbosity && m_isDebugEnabled) {
562  LogTrace("L1GlobalTrigger") << (positionPair ? " Second" : "\n First") << " object from pair "
563  << pairIndex << ": initial phi index " << initialIndex << " converted to "
564  << newIndex << std::endl;
565  }
566 
567  } else {
568  conversionStatus = false;
569 
570  if (m_verbosity && m_isDebugEnabled) {
571  LogTrace("L1GlobalTrigger") << (positionPair ? " Second" : "\n First") << " object from pair "
572  << pairIndex << ": converted phi index " << newIndex << "is equal to badIndex "
573  << badIndex << " Conversion failed." << std::endl;
574  }
575  }
576  }
577 
578  }
579 
580  break;
581  default: {
582  // should not happen (programming error)
583  throw cms::Exception("FailModule") << "\n Wrong position in the object pair " << positionPair
584  << "\n Programming error - position must be either 0 or 1..." << std::endl;
585 
586  } break;
587  }
588 
589  //
590  convertedIndex = newIndex;
591  return conversionStatus;
592 }
593 
595  const unsigned int initialIndex,
596  unsigned int &convertedIndex) const {
597  unsigned int newIndex = badIndex;
598  bool conversionStatus = false;
599 
600  switch (gtObject) {
601  case Mu: {
602  // check if initial index is within the scale size
603  // could be outside the scale size if there are hardware errors
604  // or wrong scale conversions
605  if (initialIndex >= m_lutEtaMuToCommonCalo.size()) {
606  conversionStatus = false;
607 
608  if (m_verbosity && m_isDebugEnabled) {
609  LogTrace("L1GlobalTrigger") << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
610  << " has initial eta index " << initialIndex
611  << " >= " << (m_lutEtaMuToCommonCalo.size()) << " scale size. Conversion failed."
612  << std::endl;
613  }
614  } else {
615  // convert the index
616  newIndex = m_lutEtaMuToCommonCalo[initialIndex];
617 
618  if (newIndex != badIndex) {
619  conversionStatus = true;
620 
621  if (m_verbosity && m_isDebugEnabled) {
622  LogTrace("L1GlobalTrigger") << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
623  << " initial eta index " << initialIndex << " (within scale size "
624  << (m_lutEtaMuToCommonCalo.size()) << ") converted to " << newIndex
625  << std::endl;
626  }
627 
628  } else {
629  conversionStatus = false;
630 
631  if (m_verbosity && m_isDebugEnabled) {
632  LogTrace("L1GlobalTrigger") << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
633  << " initial eta index " << initialIndex << " (within scale size "
634  << (m_lutEtaMuToCommonCalo.size()) << ") converted to badIndex" << newIndex
635  << " Conversion failed." << std::endl;
636  }
637  }
638  }
639 
640  } break;
641 
642  case NoIsoEG:
643  case IsoEG:
644  case CenJet:
645  case TauJet: {
646  // check if initial index is within the scale size
647  // could be outside the scale size if there are hardware errors
648  // or wrong scale conversions
649  if (initialIndex >= m_lutEtaCentralToCommonCalo.size()) {
650  conversionStatus = false;
651 
652  if (m_verbosity && m_isDebugEnabled) {
653  LogTrace("L1GlobalTrigger") << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
654  << " has initial eta index " << initialIndex
655  << " >= " << (m_lutEtaCentralToCommonCalo.size())
656  << " scale size. Conversion failed." << std::endl;
657  }
658  } else {
659  // convert the index
660  newIndex = m_lutEtaCentralToCommonCalo[initialIndex];
661 
662  if (newIndex != badIndex) {
663  conversionStatus = true;
664 
665  if (m_verbosity && m_isDebugEnabled) {
666  LogTrace("L1GlobalTrigger") << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
667  << " initial eta index " << initialIndex << " (within scale size "
668  << (m_lutEtaMuToCommonCalo.size()) << ") converted to " << newIndex
669  << std::endl;
670  }
671 
672  } else {
673  conversionStatus = false;
674 
675  if (m_verbosity && m_isDebugEnabled) {
676  LogTrace("L1GlobalTrigger") << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
677  << " initial eta index " << initialIndex << " (within scale size "
678  << (m_lutEtaCentralToCommonCalo.size()) << ") converted to badIndex" << newIndex
679  << " Conversion failed." << std::endl;
680  }
681  }
682  }
683 
684  } break;
685 
686  case ForJet: {
687  // check if initial index is within the scale size
688  // could be outside the scale size if there are hardware errors
689  // or wrong scale conversions
690  if (initialIndex >= m_lutEtaForJetToCommonCalo.size()) {
691  conversionStatus = false;
692 
693  if (m_verbosity && m_isDebugEnabled) {
694  LogTrace("L1GlobalTrigger") << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
695  << " has initial eta index " << initialIndex
696  << " >= " << (m_lutEtaForJetToCommonCalo.size())
697  << " scale size. Conversion failed." << std::endl;
698  }
699  } else {
700  // convert the index
701  newIndex = m_lutEtaForJetToCommonCalo[initialIndex];
702 
703  if (newIndex != badIndex) {
704  conversionStatus = true;
705 
706  if (m_verbosity && m_isDebugEnabled) {
707  LogTrace("L1GlobalTrigger") << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
708  << " initial eta index " << initialIndex << " (within scale size "
709  << (m_lutEtaMuToCommonCalo.size()) << ") converted to " << newIndex
710  << std::endl;
711  }
712 
713  } else {
714  conversionStatus = false;
715 
716  if (m_verbosity && m_isDebugEnabled) {
717  LogTrace("L1GlobalTrigger") << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
718  << " initial eta index " << initialIndex << " (within scale size "
719  << (m_lutEtaForJetToCommonCalo.size()) << ") converted to badIndex" << newIndex
720  << " Conversion failed." << std::endl;
721  }
722  }
723  }
724  } break;
725 
726  case ETM:
727  case ETT:
728  case HTT:
729  case HTM:
730  case JetCounts:
731  case HfBitCounts:
732  case HfRingEtSums:
733  case TechTrig:
734  case Castor:
735  case BPTX:
736  case GtExternal:
737  case ObjNull: {
738  // no conversions needed, there is no eta quantity for these objects
739  conversionStatus = false;
740  } break;
741 
742  default: {
743  edm::LogInfo("L1GtObject") << "\n '" << (l1GtObjectEnumToString(gtObject))
744  << "' is not a recognized L1GtObject. "
745  << "\n Conversion failed. " << std::endl;
746  conversionStatus = false;
747  } break;
748  }
749 
750  //
751  convertedIndex = newIndex;
752 
753  return conversionStatus;
754 }
755 
756 const unsigned int L1GtEtaPhiConversions::gtObjectNrBinsPhi(const L1GtObject &gtObject) const {
757  switch (gtObject) {
758  case Mu: {
759  return m_nrBinsPhiMu;
760  } break;
761 
762  case NoIsoEG:
763  case IsoEG:
764  case CenJet:
765  case ForJet:
766  case TauJet: {
767  return m_nrBinsPhiJetEg;
768  } break;
769 
770  case ETM: {
771  return m_nrBinsPhiEtm;
772  } break;
773 
774  case ETT:
775  case HTT: {
776  return 0;
777  } break;
778 
779  case HTM: {
780  return m_nrBinsPhiHtm;
781  } break;
782 
783  case JetCounts:
784  case HfBitCounts:
785  case HfRingEtSums:
786  case TechTrig:
787  case Castor:
788  case BPTX:
789  case GtExternal:
790  case ObjNull: {
791  return 0;
792  } break;
793 
794  default: {
795  edm::LogInfo("L1GtObject") << "\n '" << (l1GtObjectEnumToString(gtObject))
796  << "' is not a recognized L1GtObject. "
797  << "\n Return 0 bins.";
798  return 0;
799  } break;
800  }
801 }
802 
803 const unsigned int L1GtEtaPhiConversions::gtObjectNrBinsPhi(const L1GtObject &obj0, const L1GtObject &obj1) const {
804  std::pair<L1GtObject, L1GtObject> gtObjPair;
805  gtObjPair = std::make_pair(obj0, obj1);
806 
807  // LogTrace("L1GlobalTrigger") << "\nCompute gtObjectNrBinsPhi ["
808  // << (l1GtObjectEnumToString(obj0)) << ", "
809  // << (l1GtObjectEnumToString(obj1)) << "]\n" << std::endl;
810 
811  int iPair = 0;
812  for (std::vector<std::pair<L1GtObject, L1GtObject>>::const_iterator cIter = m_gtObjectPairVec.begin();
813  cIter != m_gtObjectPairVec.end();
814  ++cIter) {
815  if (*cIter == gtObjPair) {
816  LogTrace("L1GlobalTrigger") << "\n gtObjectNrBinsPhi [" << l1GtObjectEnumToString(obj0) << ", "
817  << l1GtObjectEnumToString(obj1) << "] = " << (*(m_pairNrPhiBinsVec.at(iPair)))
818  << std::endl;
819 
820  return *(m_pairNrPhiBinsVec.at(iPair));
821  }
822 
823  iPair++;
824  }
825 
826  return 0;
827 }
828 
829 const unsigned int L1GtEtaPhiConversions::gtObjectNrBinsPhi(const unsigned int pairIndex) const {
830  if (m_verbosity && m_isDebugEnabled) {
831  LogTrace("L1GlobalTrigger") << "\n gtObjectNrBinsPhi for L1 GT object pair index " << pairIndex << " = "
832  << (*(m_pairNrPhiBinsVec.at(pairIndex))) << std::endl;
833  }
834 
835  return *(m_pairNrPhiBinsVec.at(pairIndex));
836 }
837 
838 // perform all conversions
840  const L1MuTriggerScales *l1MuTriggerScales,
841  const int ifCaloEtaNumberBits,
842  const int ifMuEtaNumberBits) {
843  // no bullet-proof method, depends on binning ...
844  // decide "by hand / by eyes" which object converts to which object
845 
846  // update the scales used
848  m_l1MuTriggerScales = l1MuTriggerScales;
849 
850  // number of bins for all phi scales used
851 
852  m_nrBinsPhiMu = 144; // FIXME ask Ivan for size() ...
853  // m_nrBinsPhiMu = m_l1MuTriggerScales->getPhiScale()->size();
854 
858 
859  //
860  // convert phi scale for muon (finer) to phi scale for (*Jet, EG) / ETM / HTM
861  // (coarser)
862  //
863 
864  m_lutPhiMuToJetEg.clear();
866 
867  m_lutPhiMuToEtm.clear();
869 
870  m_lutPhiMuToHtm.clear();
872 
873  for (unsigned int phiMuInd = 0; phiMuInd < m_nrBinsPhiMu; ++phiMuInd) {
874  double phiMuLowEdge = m_l1MuTriggerScales->getPhiScale()->getLowEdge(phiMuInd);
875  double phiMuHighEdge = m_l1MuTriggerScales->getPhiScale()->getHighEdge(phiMuInd);
876 
877  // to avoid precision problems, add a small quantity to phiMuLowEdge
878  double phiMuLowEdgeSmallShiftRight = phiMuLowEdge + (phiMuHighEdge - phiMuLowEdge) / 100.;
879 
880  // phi Mu -> (*Jet, EG)
881 
882  unsigned int nrBins = m_nrBinsPhiJetEg;
883 
884  for (unsigned int iBin = nrBins;; --iBin) {
885  double phiLowEdge = m_l1CaloGeometry->emJetPhiBinLowEdge(iBin);
886  double phiHighEdge = m_l1CaloGeometry->emJetPhiBinHighEdge(iBin);
887 
888  if (phiMuLowEdgeSmallShiftRight >= phiLowEdge) {
889  m_lutPhiMuToJetEg[phiMuInd] = iBin % nrBins;
890 
891  LogTrace("L1GlobalTrigger") << " phiMuIndex \t" << phiMuInd << " [ " << phiMuLowEdge << " \t, " << phiMuHighEdge
892  << "] \t==>\t phiMuJetEG \t" << m_lutPhiMuToJetEg[phiMuInd] << " [ " << phiLowEdge
893  << "\t, " << phiHighEdge << " ]" << std::endl;
894 
895  break;
896  }
897  }
898 
899  // phi Mu -> ETM
900 
901  nrBins = m_nrBinsPhiEtm;
902 
903  for (unsigned int iBin = nrBins;; --iBin) {
904  double phiLowEdge = m_l1CaloGeometry->etSumPhiBinLowEdge(iBin);
905  double phiHighEdge = m_l1CaloGeometry->etSumPhiBinHighEdge(iBin);
906 
907  if (phiMuLowEdgeSmallShiftRight >= phiLowEdge) {
908  m_lutPhiMuToEtm[phiMuInd] = iBin % nrBins;
909 
910  LogTrace("L1GlobalTrigger") << " phiMuIndex \t" << phiMuInd << " [ " << phiMuLowEdge << " \t, " << phiMuHighEdge
911  << "] \t==>\t phiMuToEtm \t" << m_lutPhiMuToEtm[phiMuInd] << " [ " << phiLowEdge
912  << "\t, " << phiHighEdge << " ]" << std::endl;
913 
914  break;
915  }
916  }
917 
918  // phi Mu -> HTM
919 
920  nrBins = m_nrBinsPhiHtm;
921 
922  for (unsigned int iBin = nrBins;; --iBin) {
923  double phiLowEdge = m_l1CaloGeometry->htSumPhiBinLowEdge(iBin);
924  double phiHighEdge = m_l1CaloGeometry->htSumPhiBinHighEdge(iBin);
925 
926  if (phiMuLowEdgeSmallShiftRight >= phiLowEdge) {
927  m_lutPhiMuToHtm[phiMuInd] = iBin % nrBins;
928 
929  LogTrace("L1GlobalTrigger") << " phiMuIndex \t" << phiMuInd << " [ " << phiMuLowEdge << " \t, " << phiMuHighEdge
930  << "] \t==>\t phiMuToHtm \t" << m_lutPhiMuToHtm[phiMuInd] << " [ " << phiLowEdge
931  << "\t, " << phiHighEdge << " ]" << std::endl;
932 
933  break;
934  }
935  }
936 
937  LogTrace("L1GlobalTrigger") << std::endl;
938  }
939 
940  if (m_verbosity && m_isDebugEnabled) {
941  LogTrace("L1GlobalTrigger") << "Mu phi conversions" << std::endl;
942  for (unsigned int iBin = 0; iBin < m_nrBinsPhiMu; ++iBin) {
943  LogTrace("L1GlobalTrigger") << " Mu phiIndex \t" << iBin << "\t converted to index:"
944  << "\t Jet-EG \t" << m_lutPhiMuToJetEg.at(iBin) << "\t ETM \t"
945  << m_lutPhiMuToEtm.at(iBin) << "\t HTM \t" << m_lutPhiMuToHtm.at(iBin) << std::endl;
946  }
947  LogTrace("L1GlobalTrigger") << std::endl;
948  }
949 
950  //
951  // convert phi scale for ETM to phi scale for (*Jet, EG) / HTM (coarser)
952  //
953 
954  m_lutPhiEtmToJetEg.clear();
956 
957  m_lutPhiEtmToHtm.clear();
959 
960  for (unsigned int phiEtmInd = 0; phiEtmInd < m_nrBinsPhiEtm; ++phiEtmInd) {
961  double phiEtmLowEdge = m_l1CaloGeometry->etSumPhiBinLowEdge(phiEtmInd);
962  double phiEtmHighEdge = m_l1CaloGeometry->etSumPhiBinHighEdge(phiEtmInd);
963 
964  // to avoid precision problems, add a small quantity to phiEtmLowEdge
965  double phiEtmLowEdgeSmallShiftRight = phiEtmLowEdge + (phiEtmHighEdge - phiEtmLowEdge) / 100.;
966 
967  // phi ETM -> (*Jet, EG)
968 
969  unsigned int nrBins = m_nrBinsPhiJetEg;
970 
971  for (unsigned int iBin = nrBins;; --iBin) {
972  double phiLowEdge = m_l1CaloGeometry->emJetPhiBinLowEdge(iBin);
973  double phiHighEdge = m_l1CaloGeometry->emJetPhiBinHighEdge(iBin);
974 
975  if (phiEtmLowEdgeSmallShiftRight >= phiLowEdge) {
976  m_lutPhiEtmToJetEg[phiEtmInd] = iBin % nrBins;
977 
978  LogTrace("L1GlobalTrigger") << " phiEtmIndex \t" << phiEtmInd << " [ " << phiEtmLowEdge << " \t, "
979  << phiEtmHighEdge << "] \t==>\t phiEtmJetEG \t" << m_lutPhiEtmToJetEg[phiEtmInd]
980  << " [ " << phiLowEdge << "\t, " << phiHighEdge << " ]" << std::endl;
981 
982  break;
983  }
984  }
985 
986  // phi ETM -> HTM
987 
988  nrBins = m_nrBinsPhiHtm;
989 
990  for (unsigned int iBin = nrBins;; --iBin) {
991  double phiLowEdge = m_l1CaloGeometry->htSumPhiBinLowEdge(iBin);
992  double phiHighEdge = m_l1CaloGeometry->htSumPhiBinHighEdge(iBin);
993 
994  if (phiEtmLowEdgeSmallShiftRight >= phiLowEdge) {
995  m_lutPhiEtmToHtm[phiEtmInd] = iBin % nrBins;
996 
997  LogTrace("L1GlobalTrigger") << " phiEtmIndex \t" << phiEtmInd << " [ " << phiEtmLowEdge << " \t, "
998  << phiEtmHighEdge << "] \t==>\t phiEtmToHtm \t" << m_lutPhiEtmToHtm[phiEtmInd]
999  << " [ " << phiLowEdge << "\t, " << phiHighEdge << " ]" << std::endl;
1000 
1001  break;
1002  }
1003  }
1004 
1005  LogTrace("L1GlobalTrigger") << std::endl;
1006  }
1007 
1008  //
1009  // convert phi scale for HTM to phi scale for (*Jet, EG)
1010  //
1011 
1012  m_lutPhiHtmToJetEg.clear();
1014 
1015  for (unsigned int phiHtmInd = 0; phiHtmInd < m_nrBinsPhiHtm; ++phiHtmInd) {
1016  double phiHtmLowEdge = m_l1CaloGeometry->htSumPhiBinLowEdge(phiHtmInd);
1017  double phiHtmHighEdge = m_l1CaloGeometry->htSumPhiBinHighEdge(phiHtmInd);
1018 
1019  // to avoid precision problems, add a small quantity to phiHtmLowEdge
1020  double phiHtmLowEdgeSmallShiftRight = phiHtmLowEdge + (phiHtmHighEdge - phiHtmLowEdge) / 100.;
1021 
1022  unsigned int nrBins = m_nrBinsPhiJetEg;
1023 
1024  for (unsigned int iBin = nrBins;; --iBin) {
1025  double phiLowEdge = m_l1CaloGeometry->emJetPhiBinLowEdge(iBin);
1026  double phiHighEdge = m_l1CaloGeometry->emJetPhiBinHighEdge(iBin);
1027 
1028  if (phiHtmLowEdgeSmallShiftRight >= phiLowEdge) {
1029  m_lutPhiHtmToJetEg[phiHtmInd] = iBin % nrBins;
1030 
1031  LogTrace("L1GlobalTrigger") << " phiHtmIndex \t" << phiHtmInd << " [ " << phiHtmLowEdge << " \t, "
1032  << phiHtmHighEdge << "] \t==>\t phiHtmJetEG \t" << m_lutPhiHtmToJetEg[phiHtmInd]
1033  << " [ " << phiLowEdge << "\t, " << phiHighEdge << " ]" << std::endl;
1034 
1035  break;
1036  }
1037  }
1038  }
1039 
1040  //
1041  // convert phi scale for (*Jet, EG) to (*Jet, EG)
1042  // dummy - return the same index as the input index
1043 
1044  m_lutPhiJetEgToJetEg.clear();
1046 
1047  for (unsigned int phiInd = 0; phiInd < m_nrBinsPhiJetEg; ++phiInd) {
1048  m_lutPhiJetEgToJetEg[phiInd] = phiInd;
1049  }
1050 
1051  //
1052  // eta conversions
1053  //
1054 
1055  // all objects are converted to a common central / forward calorimeter eta
1056  // scale, built by setting together the forward scale and the central scale
1057  //
1058  // eta is signed, MSB is the sign for all objects - must be taken into
1059  // account in conversion - the common scale is, from 0 to m_nrBinsEtaCommon:
1060  //
1061  // [ForJet negative bins][Central Jet/IsoEG/NoIsoEG negative bins][Central
1062  // Jet/IsoEG/NoIsoEG positive bins][ForJet positive bins]
1063  //
1064 
1065  unsigned int nrGctCentralEtaBinsPerHalf = m_l1CaloGeometry->numberGctCentralEtaBinsPerHalf();
1066 
1067  unsigned int nrGctForwardEtaBinsPerHalf = m_l1CaloGeometry->numberGctForwardEtaBinsPerHalf();
1068 
1069  unsigned int nrGctTotalEtaBinsPerHalf = nrGctCentralEtaBinsPerHalf + nrGctForwardEtaBinsPerHalf;
1070 
1071  m_nrBinsEtaCommon = 2 * nrGctTotalEtaBinsPerHalf;
1072 
1073  //
1074  // convert eta scale for CenJet/TauJet & IsoEG/NoIsoEG to a common
1075  // central / forward calorimeter eta scale
1076  //
1077  // get the sign and the index absolute value
1078 
1079  LogTrace("L1GlobalTrigger") << " \nEta conversion: CenJet/TauJet & "
1080  "IsoEG/NoIsoEG to a common calorimeter scale\n"
1081  << std::endl;
1082 
1084  m_lutEtaCentralToCommonCalo.resize((nrGctCentralEtaBinsPerHalf | (1 << (ifCaloEtaNumberBits - 1))), badIndex);
1085 
1086  for (unsigned int etaInd = 0; etaInd < nrGctCentralEtaBinsPerHalf; ++etaInd) {
1087  // for positive values, the index is etaInd
1088  unsigned int globalIndex = m_l1CaloGeometry->globalEtaIndex(m_l1CaloGeometry->etaBinCenter(etaInd, true));
1089  m_lutEtaCentralToCommonCalo[etaInd] = globalIndex;
1090 
1091  LogTrace("L1GlobalTrigger") << " etaIndex " << etaInd << "\t [hex: " << std::hex << etaInd << "] " << std::dec
1092  << " ==> etaIndexGlobal " << globalIndex << std::endl;
1093 
1094  // for negative values, one adds (binary) 1 as MSB to the index
1095  unsigned int etaIndNeg = etaInd | (1 << (ifCaloEtaNumberBits - 1));
1096  globalIndex = m_l1CaloGeometry->globalEtaIndex(m_l1CaloGeometry->etaBinCenter(etaIndNeg, true));
1097  m_lutEtaCentralToCommonCalo[etaIndNeg] = globalIndex;
1098 
1099  LogTrace("L1GlobalTrigger") << " etaIndex " << etaIndNeg << "\t [hex: " << std::hex << etaIndNeg << "] " << std::dec
1100  << " ==> etaIndexGlobal " << globalIndex << std::endl;
1101  }
1102 
1103  //
1104  // convert eta scale for ForJet to a common
1105  // central / forward calorimeter eta scale
1106  //
1107 
1108  LogTrace("L1GlobalTrigger") << " \nEta conversion: ForJet to a common calorimeter scale\n" << std::endl;
1109 
1111  m_lutEtaForJetToCommonCalo.resize((nrGctForwardEtaBinsPerHalf | (1 << (ifCaloEtaNumberBits - 1))), badIndex);
1112 
1113  for (unsigned int etaInd = 0; etaInd < nrGctForwardEtaBinsPerHalf; ++etaInd) {
1114  // for positive values, the index is etaInd
1115  unsigned int globalIndex = m_l1CaloGeometry->globalEtaIndex(m_l1CaloGeometry->etaBinCenter(etaInd, false));
1116  m_lutEtaForJetToCommonCalo[etaInd] = globalIndex;
1117 
1118  LogTrace("L1GlobalTrigger") << " etaIndex " << etaInd << "\t [hex: " << std::hex << etaInd << "] " << std::dec
1119  << " ==> etaIndexGlobal " << globalIndex << std::endl;
1120 
1121  // for negative values, one adds (binary) 1 as MSB to the index
1122  unsigned int etaIndNeg = etaInd | (1 << (ifCaloEtaNumberBits - 1));
1123  globalIndex = m_l1CaloGeometry->globalEtaIndex(m_l1CaloGeometry->etaBinCenter(etaIndNeg, false));
1124  m_lutEtaForJetToCommonCalo[etaIndNeg] = globalIndex;
1125 
1126  LogTrace("L1GlobalTrigger") << " etaIndex " << etaIndNeg << "\t [hex: " << std::hex << etaIndNeg << "] " << std::dec
1127  << " ==> etaIndexGlobal " << globalIndex << std::endl;
1128  }
1129 
1130  //
1131  // convert eta scale for Mu to a common
1132  // central / forward calorimeter eta scale
1133  //
1134 
1135  LogDebug("L1GlobalTrigger") << " \nEta conversion: Mu to a common calorimeter scale\n" << std::endl;
1136 
1137  // eta scale defined for positive values - need to be symmetrized
1138  unsigned int nrBinsEtaMuPerHalf = m_l1MuTriggerScales->getGMTEtaScale()->getNBins();
1139  LogTrace("L1GlobalTrigger") << " \nnrBinsEtaMuPerHalf = " << nrBinsEtaMuPerHalf << "\n" << std::endl;
1140 
1141  m_lutEtaMuToCommonCalo.clear();
1142  m_lutEtaMuToCommonCalo.resize((nrBinsEtaMuPerHalf | (1 << (ifMuEtaNumberBits - 1))), badIndex);
1143 
1144  for (unsigned int etaMuInd = 0; etaMuInd < nrBinsEtaMuPerHalf; ++etaMuInd) {
1145  double etaMuLowEdge = m_l1MuTriggerScales->getGMTEtaScale()->getValue(etaMuInd);
1146  double etaMuHighEdge = m_l1MuTriggerScales->getGMTEtaScale()->getValue(etaMuInd + 1);
1147 
1148  // to avoid precision problems, add a small quantity to etaMuLowEdge
1149  double etaMuLowEdgeSmallShiftRight = etaMuLowEdge + (etaMuHighEdge - etaMuLowEdge) / 100.;
1150 
1151  // positive values
1152  for (unsigned int iBin = m_nrBinsEtaCommon;; --iBin) {
1153  double etaLowEdge = m_l1CaloGeometry->globalEtaBinLowEdge(iBin);
1154 
1155  double etaHighEdge = 0.0;
1156  if (iBin == m_nrBinsEtaCommon) {
1157  etaHighEdge = etaLowEdge;
1158  } else {
1159  etaHighEdge = m_l1CaloGeometry->globalEtaBinLowEdge(iBin + 1);
1160  }
1161 
1162  if (etaMuLowEdgeSmallShiftRight >= etaLowEdge) {
1163  m_lutEtaMuToCommonCalo[etaMuInd] = iBin % m_nrBinsEtaCommon;
1164 
1165  LogTrace("L1GlobalTrigger") << " etaMuIndex \t" << etaMuInd << "\t [ " << etaMuLowEdge << ", \t"
1166  << etaMuHighEdge << "] ==> etaMuJetEG \t" << m_lutEtaMuToCommonCalo[etaMuInd]
1167  << "\t [ " << etaLowEdge << ", \t" << etaHighEdge << " ]" << std::endl;
1168 
1169  break;
1170  }
1171  }
1172 
1173  // for negative values, one adds (binary) 1 as MSB to the index
1174  unsigned int etaMuIndNeg = etaMuInd | (1 << (ifMuEtaNumberBits - 1));
1175  m_lutEtaMuToCommonCalo[etaMuIndNeg] =
1177 
1178  LogTrace("L1GlobalTrigger") << " etaMuIndexNeg \t" << etaMuIndNeg << "\t [ " << (-1.0 * etaMuLowEdge) << ", \t"
1179  << (-1.0 * etaMuHighEdge) << "] ==> etaMuJetEG \t"
1180  << m_lutEtaMuToCommonCalo[etaMuIndNeg] << "\t [ "
1181  << m_l1CaloGeometry->globalEtaBinLowEdge(m_lutEtaMuToCommonCalo[etaMuIndNeg]) << ", \t"
1183  << " ]" << std::endl;
1184  }
1185 
1186  if (m_verbosity && m_isDebugEnabled) {
1187  LogTrace("L1GlobalTrigger") << std::endl;
1188  LogTrace("L1GlobalTrigger") << std::endl;
1189  }
1190 }
1191 
1192 // print all the performed conversions
1193 void L1GtEtaPhiConversions::print(std::ostream &myCout) const {
1194  // force a page break before each group
1195  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1196 
1197  myCout << "\n---++Conversion tables for phi and eta variables of the trigger "
1198  "objects used in correlation conditions \n"
1199  << std::endl;
1200 
1201  //
1202  // phi conversions
1203  //
1204 
1205  // phi Mu -> (*Jet, EG)
1206 
1207  myCout << "\n---+++Phi conversion for muons to jets and e-gamma common phi "
1208  "scale \n"
1209  << std::endl;
1210 
1211  size_t lutPhiMuToJetEgSize = m_lutPhiMuToJetEg.size();
1212  myCout << "Size of look-up table = " << lutPhiMuToJetEgSize << "\n" << std::endl;
1213 
1214  myCout << "| *Initial Phi Hardware Index* "
1215  << "|| *Initial Phi Range* ||"
1216  << " *Converted Phi Hardware Index* "
1217  << "|| *Converted Phi Range* ||"
1218  << "\n"
1219  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1220 
1221  for (unsigned int indexToConv = 0; indexToConv < lutPhiMuToJetEgSize; ++indexToConv) {
1222  double lowEdgeToConv = m_l1MuTriggerScales->getPhiScale()->getLowEdge(indexToConv);
1223  double highEdgeToConv = m_l1MuTriggerScales->getPhiScale()->getHighEdge(indexToConv);
1224 
1225  unsigned int convIndex = m_lutPhiMuToJetEg[indexToConv];
1226 
1227  double convLowEdge = 0.;
1228  double convHighEdge = 0.;
1229 
1230  if (convIndex != badIndex) {
1231  convLowEdge = m_l1CaloGeometry->emJetPhiBinLowEdge(convIndex);
1232  convHighEdge = m_l1CaloGeometry->emJetPhiBinHighEdge(convIndex);
1233  } else {
1234  // badIndex means a bad initialIndex
1235  lowEdgeToConv = 0.;
1236  highEdgeToConv = 0.;
1237  }
1238 
1239  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv << " | " << std::dec << std::setw(3)
1240  << std::left << indexToConv << " |[ " << std::setw(10) << std::left << (rad2deg(lowEdgeToConv)) << ", |"
1241  << std::setw(10) << std::left << (rad2deg(highEdgeToConv)) << " ) | 0x" << std::setw(6) << std::hex
1242  << std::left << convIndex << " | " << std::dec << std::setw(6) << convIndex << " |[ " << std::setw(10)
1243  << std::left << (rad2deg(convLowEdge)) << ", |" << std::setw(10) << std::left << (rad2deg(convHighEdge))
1244  << " ) |" << std::right << std::endl;
1245  }
1246 
1247  // phi Mu -> ETM
1248 
1249  // force a page break before each group
1250  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1251 
1252  myCout << "\n---+++Phi conversion for muons to ETM phi scale \n" << std::endl;
1253 
1254  size_t lutPhiMuToEtmSize = m_lutPhiMuToEtm.size();
1255  myCout << "Size of look-up table = " << lutPhiMuToEtmSize << "\n" << std::endl;
1256 
1257  myCout << "| *Initial Phi Hardware Index* "
1258  << "|| *Initial Phi Range* ||"
1259  << " *Converted Phi Hardware Index* "
1260  << "|| *Converted Phi Range* ||"
1261  << "\n"
1262  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1263 
1264  for (unsigned int indexToConv = 0; indexToConv < lutPhiMuToEtmSize; ++indexToConv) {
1265  double lowEdgeToConv = m_l1MuTriggerScales->getPhiScale()->getLowEdge(indexToConv);
1266  double highEdgeToConv = m_l1MuTriggerScales->getPhiScale()->getHighEdge(indexToConv);
1267 
1268  unsigned int convIndex = m_lutPhiMuToEtm[indexToConv];
1269 
1270  double convLowEdge = 0.;
1271  double convHighEdge = 0.;
1272 
1273  if (convIndex != badIndex) {
1274  convLowEdge = m_l1CaloGeometry->etSumPhiBinLowEdge(convIndex);
1275  convHighEdge = m_l1CaloGeometry->etSumPhiBinHighEdge(convIndex);
1276  } else {
1277  // badIndex means a bad initialIndex
1278  lowEdgeToConv = 0.;
1279  highEdgeToConv = 0.;
1280  }
1281 
1282  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv << " | " << std::dec << std::setw(3)
1283  << std::left << indexToConv << " |[ " << std::setw(10) << std::left << (rad2deg(lowEdgeToConv)) << ", |"
1284  << std::setw(10) << std::left << (rad2deg(highEdgeToConv)) << " ) | 0x" << std::setw(6) << std::hex
1285  << std::left << convIndex << " | " << std::dec << std::setw(6) << convIndex << " |[ " << std::setw(10)
1286  << std::left << (rad2deg(convLowEdge)) << ", |" << std::setw(10) << std::left << (rad2deg(convHighEdge))
1287  << " ) |" << std::right << std::endl;
1288  }
1289 
1290  // phi Mu -> HTM
1291 
1292  // force a page break before each group
1293  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1294 
1295  myCout << "\n---+++Phi conversion for muons to HTM phi scale \n" << std::endl;
1296 
1297  size_t lutPhiMuToHtmSize = m_lutPhiMuToHtm.size();
1298  myCout << "Size of look-up table = " << lutPhiMuToHtmSize << "\n" << std::endl;
1299 
1300  myCout << "| *Initial Phi Hardware Index* "
1301  << "|| *Initial Phi Range* ||"
1302  << " *Converted Phi Hardware Index* "
1303  << "|| *Converted Phi Range* ||"
1304  << "\n"
1305  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1306 
1307  for (unsigned int indexToConv = 0; indexToConv < lutPhiMuToHtmSize; ++indexToConv) {
1308  double lowEdgeToConv = m_l1MuTriggerScales->getPhiScale()->getLowEdge(indexToConv);
1309  double highEdgeToConv = m_l1MuTriggerScales->getPhiScale()->getHighEdge(indexToConv);
1310 
1311  unsigned int convIndex = m_lutPhiMuToHtm[indexToConv];
1312 
1313  double convLowEdge = 0.;
1314  double convHighEdge = 0.;
1315 
1316  if (convIndex != badIndex) {
1317  convLowEdge = m_l1CaloGeometry->htSumPhiBinLowEdge(convIndex);
1318  convHighEdge = m_l1CaloGeometry->htSumPhiBinHighEdge(convIndex);
1319  } else {
1320  // badIndex means a bad initialIndex
1321  lowEdgeToConv = 0.;
1322  highEdgeToConv = 0.;
1323  }
1324 
1325  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv << " | " << std::dec << std::setw(3)
1326  << std::left << indexToConv << " |[ " << std::setw(10) << std::left << (rad2deg(lowEdgeToConv)) << ", |"
1327  << std::setw(10) << std::left << (rad2deg(highEdgeToConv)) << " ) | 0x" << std::setw(6) << std::hex
1328  << std::left << convIndex << " | " << std::dec << std::setw(6) << convIndex << " |[ " << std::setw(10)
1329  << std::left << (rad2deg(convLowEdge)) << ", |" << std::setw(10) << std::left << (rad2deg(convHighEdge))
1330  << " ) |" << std::right << std::endl;
1331  }
1332 
1333  // phi ETM -> (*Jet, EG)
1334 
1335  // force a page break before each group
1336  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1337 
1338  myCout << "\n---+++Phi conversion for ETM to jets and e-gamma scale common "
1339  "phi scale \n"
1340  << std::endl;
1341 
1342  size_t lutPhiEtmToJetEgSize = m_lutPhiEtmToJetEg.size();
1343  myCout << "Size of look-up table = " << lutPhiEtmToJetEgSize << "\n" << std::endl;
1344 
1345  myCout << "| *Initial Phi Hardware Index* "
1346  << "|| *Initial Phi Range* ||"
1347  << " *Converted Phi Hardware Index* "
1348  << "|| *Converted Phi Range* ||"
1349  << "\n"
1350  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1351 
1352  for (unsigned int indexToConv = 0; indexToConv < lutPhiEtmToJetEgSize; ++indexToConv) {
1353  double lowEdgeToConv = m_l1CaloGeometry->etSumPhiBinLowEdge(indexToConv);
1354  double highEdgeToConv = m_l1CaloGeometry->etSumPhiBinHighEdge(indexToConv);
1355 
1356  unsigned int convIndex = m_lutPhiEtmToJetEg[indexToConv];
1357 
1358  double convLowEdge = 0.;
1359  double convHighEdge = 0.;
1360 
1361  if (convIndex != badIndex) {
1362  convLowEdge = m_l1CaloGeometry->emJetPhiBinLowEdge(convIndex);
1363  convHighEdge = m_l1CaloGeometry->emJetPhiBinHighEdge(convIndex);
1364  } else {
1365  // badIndex means a bad initialIndex
1366  lowEdgeToConv = 0.;
1367  highEdgeToConv = 0.;
1368  }
1369 
1370  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv << " | " << std::dec << std::setw(3)
1371  << std::left << indexToConv << " |[ " << std::setw(10) << std::left << (rad2deg(lowEdgeToConv)) << ", |"
1372  << std::setw(10) << std::left << (rad2deg(highEdgeToConv)) << " ) | 0x" << std::setw(6) << std::hex
1373  << std::left << convIndex << " | " << std::dec << std::setw(6) << convIndex << " |[ " << std::setw(10)
1374  << std::left << (rad2deg(convLowEdge)) << ", |" << std::setw(10) << std::left << (rad2deg(convHighEdge))
1375  << " ) |" << std::right << std::endl;
1376  }
1377 
1378  // phi ETM -> HTM
1379 
1380  // force a page break before each group
1381  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1382 
1383  myCout << "\n---+++Phi conversion for ETM to HTM phi scale \n" << std::endl;
1384 
1385  size_t lutPhiEtmToHtmSize = m_lutPhiEtmToHtm.size();
1386  myCout << "Size of look-up table = " << lutPhiEtmToHtmSize << "\n" << std::endl;
1387 
1388  myCout << "| *Initial Phi Hardware Index* "
1389  << "|| *Initial Phi Range* ||"
1390  << " *Converted Phi Hardware Index* "
1391  << "|| *Converted Phi Range* ||"
1392  << "\n"
1393  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1394 
1395  for (unsigned int indexToConv = 0; indexToConv < lutPhiEtmToHtmSize; ++indexToConv) {
1396  double lowEdgeToConv = m_l1CaloGeometry->etSumPhiBinLowEdge(indexToConv);
1397  double highEdgeToConv = m_l1CaloGeometry->etSumPhiBinHighEdge(indexToConv);
1398 
1399  unsigned int convIndex = m_lutPhiEtmToHtm[indexToConv];
1400 
1401  double convLowEdge = 0.;
1402  double convHighEdge = 0.;
1403 
1404  if (convIndex != badIndex) {
1405  convLowEdge = m_l1CaloGeometry->htSumPhiBinLowEdge(convIndex);
1406  convHighEdge = m_l1CaloGeometry->htSumPhiBinHighEdge(convIndex);
1407  } else {
1408  // badIndex means a bad initialIndex
1409  lowEdgeToConv = 0.;
1410  highEdgeToConv = 0.;
1411  }
1412 
1413  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv << " | " << std::dec << std::setw(3)
1414  << std::left << indexToConv << " |[ " << std::setw(10) << std::left << (rad2deg(lowEdgeToConv)) << ", |"
1415  << std::setw(10) << std::left << (rad2deg(highEdgeToConv)) << " ) | 0x" << std::setw(6) << std::hex
1416  << std::left << convIndex << " | " << std::dec << std::setw(6) << convIndex << " |[ " << std::setw(10)
1417  << std::left << (rad2deg(convLowEdge)) << ", |" << std::setw(10) << std::left << (rad2deg(convHighEdge))
1418  << " ) |" << std::right << std::endl;
1419  }
1420 
1421  // phi HTM -> (*Jet, EG)
1422 
1423  // force a page break before each group
1424  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1425 
1426  myCout << "\n---+++Phi conversion for HTM to jets and e-gamma scale common "
1427  "phi scale \n"
1428  << std::endl;
1429 
1430  size_t lutPhiHtmToJetEgSize = m_lutPhiHtmToJetEg.size();
1431  myCout << "Size of look-up table = " << lutPhiHtmToJetEgSize << "\n" << std::endl;
1432 
1433  myCout << "| *Initial Phi Hardware Index* "
1434  << "|| *Initial Phi Range* ||"
1435  << " *Converted Phi Hardware Index* "
1436  << "|| *Converted Phi Range* ||"
1437  << "\n"
1438  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1439 
1440  for (unsigned int indexToConv = 0; indexToConv < lutPhiHtmToJetEgSize; ++indexToConv) {
1441  double lowEdgeToConv = m_l1CaloGeometry->htSumPhiBinLowEdge(indexToConv);
1442  double highEdgeToConv = m_l1CaloGeometry->htSumPhiBinHighEdge(indexToConv);
1443 
1444  unsigned int convIndex = m_lutPhiHtmToJetEg[indexToConv];
1445 
1446  double convLowEdge = 0.;
1447  double convHighEdge = 0.;
1448 
1449  if (convIndex != badIndex) {
1450  convLowEdge = m_l1CaloGeometry->emJetPhiBinLowEdge(convIndex);
1451  convHighEdge = m_l1CaloGeometry->emJetPhiBinHighEdge(convIndex);
1452  } else {
1453  // badIndex means a bad initialIndex
1454  lowEdgeToConv = 0.;
1455  highEdgeToConv = 0.;
1456  }
1457 
1458  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv << " | " << std::dec << std::setw(3)
1459  << std::left << indexToConv << " |[ " << std::setw(10) << std::left << (rad2deg(lowEdgeToConv)) << ", |"
1460  << std::setw(10) << std::left << (rad2deg(highEdgeToConv)) << " ) | 0x" << std::setw(6) << std::hex
1461  << std::left << convIndex << " | " << std::dec << std::setw(6) << convIndex << " |[ " << std::setw(10)
1462  << std::left << (rad2deg(convLowEdge)) << ", |" << std::setw(10) << std::left << (rad2deg(convHighEdge))
1463  << " ) |" << std::right << std::endl;
1464  }
1465 
1466  //
1467  // eta conversions
1468  //
1469 
1470  // CenJet/TauJet & IsoEG/NoIsoEG to a common central / forward calorimeter eta
1471  // scale
1472 
1473  // force a page break before each group
1474  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1475 
1476  myCout << "\n---+++Eta conversion for central and tau jets and e-gamma "
1477  "objects to a common central and forward calorimeter eta scale \n"
1478  << std::endl;
1479 
1480  size_t lutEtaCentralToCommonCaloSize = m_lutEtaCentralToCommonCalo.size();
1481  myCout << "Size of look-up table = " << lutEtaCentralToCommonCaloSize << "\n" << std::endl;
1482 
1483  myCout << "| *Initial Eta Hardware Index* "
1484  << "|| *Initial Eta Range* ||"
1485  << " *Converted Eta Hardware Index* "
1486  << "|| *Converted Eta Range* ||"
1487  << "\n"
1488  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1489 
1490  for (unsigned int indexToConv = 0; indexToConv < lutEtaCentralToCommonCaloSize; ++indexToConv) {
1491  double lowEdgeToConv = m_l1CaloGeometry->globalEtaBinLowEdge(
1493  double highEdgeToConv = m_l1CaloGeometry->globalEtaBinLowEdge(
1494  m_l1CaloGeometry->globalEtaIndex(m_l1CaloGeometry->etaBinCenter(indexToConv, true)) + 1);
1495 
1496  unsigned int convIndex = m_lutEtaCentralToCommonCalo[indexToConv];
1497 
1498  double convLowEdge = 0.;
1499  double convHighEdge = 0.;
1500 
1501  if (convIndex != badIndex) {
1502  convLowEdge = m_l1CaloGeometry->globalEtaBinLowEdge(convIndex);
1503  convHighEdge = m_l1CaloGeometry->globalEtaBinLowEdge(convIndex + 1);
1504  } else {
1505  // badIndex means a bad initialIndex
1506  lowEdgeToConv = 0.;
1507  highEdgeToConv = 0.;
1508  }
1509 
1510  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv << " | " << std::dec << std::setw(3)
1511  << std::left << indexToConv << " |[ " << std::setw(10) << std::left << lowEdgeToConv << ", |"
1512  << std::setw(10) << std::left << highEdgeToConv << " ) | 0x" << std::setw(6) << std::hex << std::left
1513  << convIndex << " | " << std::dec << std::setw(6) << convIndex << " |[ " << std::setw(10) << std::left
1514  << convLowEdge << ", |" << std::setw(10) << std::left << convHighEdge << " ) |" << std::right << std::endl;
1515  }
1516 
1517  // ForJet to a common central / forward calorimeter eta scale
1518 
1519  // force a page break before each group
1520  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1521 
1522  myCout << "\n---+++Eta conversion for forward jets to a common central and "
1523  "forward calorimeter eta scale \n"
1524  << std::endl;
1525 
1526  size_t lutEtaForJetToCommonCaloSize = m_lutEtaForJetToCommonCalo.size();
1527  myCout << "Size of look-up table = " << lutEtaForJetToCommonCaloSize << "\n" << std::endl;
1528 
1529  myCout << "| *Initial Eta Hardware Index* "
1530  << "|| *Initial Eta Range* ||"
1531  << " *Converted Eta Hardware Index* "
1532  << "|| *Converted Eta Range* ||"
1533  << "\n"
1534  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1535 
1536  for (unsigned int indexToConv = 0; indexToConv < lutEtaForJetToCommonCaloSize; ++indexToConv) {
1537  double lowEdgeToConv = m_l1CaloGeometry->globalEtaBinLowEdge(
1539  double highEdgeToConv = m_l1CaloGeometry->globalEtaBinLowEdge(
1540  m_l1CaloGeometry->globalEtaIndex(m_l1CaloGeometry->etaBinCenter(indexToConv, false)) + 1);
1541 
1542  unsigned int convIndex = m_lutEtaForJetToCommonCalo[indexToConv];
1543 
1544  double convLowEdge = 0.;
1545  double convHighEdge = 0.;
1546 
1547  if (convIndex != badIndex) {
1548  convLowEdge = m_l1CaloGeometry->globalEtaBinLowEdge(convIndex);
1549  convHighEdge = m_l1CaloGeometry->globalEtaBinLowEdge(convIndex + 1);
1550  } else {
1551  // badIndex means a bad initialIndex
1552  lowEdgeToConv = 0.;
1553  highEdgeToConv = 0.;
1554  }
1555 
1556  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv << " | " << std::dec << std::setw(3)
1557  << std::left << indexToConv << " |[ " << std::setw(10) << std::left << lowEdgeToConv << ", |"
1558  << std::setw(10) << std::left << highEdgeToConv << " ) | 0x" << std::setw(6) << std::hex << std::left
1559  << convIndex << " | " << std::dec << std::setw(6) << convIndex << " |[ " << std::setw(10) << std::left
1560  << convLowEdge << ", |" << std::setw(10) << std::left << convHighEdge << " ) |" << std::right << std::endl;
1561  }
1562 
1563  // Mu to a common central / forward calorimeter eta scale
1564 
1565  // force a page break before each group
1566  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1567 
1568  myCout << "\n---+++Eta conversion for muons to a common central and forward "
1569  "calorimeter eta scale \n"
1570  << std::endl;
1571 
1572  size_t lutEtaMuToCommonCaloSize = m_lutEtaMuToCommonCalo.size();
1573  myCout << "Size of look-up table = " << lutEtaMuToCommonCaloSize << "\n" << std::endl;
1574 
1575  unsigned int nrBinsEtaMuPerHalf = m_l1MuTriggerScales->getGMTEtaScale()->getNBins();
1576 
1577  myCout << "| *Initial Eta Hardware Index* "
1578  << "|| *Initial Eta Range* ||"
1579  << " *Converted Eta Hardware Index* "
1580  << "|| *Converted Eta Range* ||"
1581  << "\n"
1582  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1583 
1584  for (unsigned int indexToConv = 0; indexToConv < lutEtaMuToCommonCaloSize; ++indexToConv) {
1585  // Mu scale defined for positive values only, need to be symmetrized
1586  unsigned int iBinOffset = 0;
1587  double etaSign = 1.;
1588 
1589  if (indexToConv > nrBinsEtaMuPerHalf) {
1590  iBinOffset = nrBinsEtaMuPerHalf + 1;
1591  etaSign = -1.;
1592  }
1593 
1594  double lowEdgeToConv = etaSign * m_l1MuTriggerScales->getGMTEtaScale()->getValue(indexToConv - iBinOffset);
1595  double highEdgeToConv = etaSign * m_l1MuTriggerScales->getGMTEtaScale()->getValue(indexToConv + 1 - iBinOffset);
1596 
1597  unsigned int convIndex = m_lutEtaMuToCommonCalo[indexToConv];
1598 
1599  double convLowEdge = 0.;
1600  double convHighEdge = 0.;
1601 
1602  if (convIndex != badIndex) {
1603  convLowEdge = m_l1CaloGeometry->globalEtaBinLowEdge(convIndex);
1604  convHighEdge = m_l1CaloGeometry->globalEtaBinLowEdge(convIndex + 1);
1605  } else {
1606  // badIndex means a bad initialIndex
1607  lowEdgeToConv = 0.;
1608  highEdgeToConv = 0.;
1609  }
1610 
1611  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv << " | " << std::dec << std::setw(3)
1612  << std::left << indexToConv << " |[ " << std::setw(10) << std::left << lowEdgeToConv << ", |"
1613  << std::setw(10) << std::left << highEdgeToConv << " ) | 0x" << std::setw(6) << std::hex << std::left
1614  << convIndex << " | " << std::dec << std::setw(6) << convIndex << " |[ " << std::setw(10) << std::left
1615  << convLowEdge << ", |" << std::setw(10) << std::left << convHighEdge << " ) |" << std::right << std::endl;
1616  }
1617 }
1618 
1619 // convert phi from rad (-pi, pi] to deg (0, 360)
1620 const double L1GtEtaPhiConversions::rad2deg(const double &phiRad) const {
1621  if (phiRad < 0.) {
1622  return (phiRad * PiConversion) + 360.;
1623  } else {
1624  return (phiRad * PiConversion);
1625  }
1626 }
1627 
1628 // static members
1629 
1630 const unsigned int L1GtEtaPhiConversions::badIndex = 999999;
1631 const double L1GtEtaPhiConversions::PiConversion = 180. / acos(-1.);
const L1CaloGeometry * m_l1CaloGeometry
pointer to calorimetry scales - updated in convertl1Scales method
Definition: L1GtObject.h:38
bool isDebugEnabled()
const L1MuScale * getGMTEtaScale() const
get the GMT eta scale
unsigned int m_nrBinsEtaCommon
number of eta bins for common scale
unsigned int m_nrBinsPhiMu
number of phi bins for muons
double emJetPhiBinHighEdge(unsigned int phiIndex) const
std::vector< unsigned int > m_lutEtaCentralToCommonCalo
std::vector< bool > m_pairConvertPhiFirstGtObject
Definition: L1GtObject.h:36
Definition: L1GtObject.h:29
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
unsigned int m_nrBinsPhiEtm
number of phi bins for ETM
std::vector< const std::vector< unsigned int > * > m_pairPhiConvVec
const L1MuScale * getPhiScale() const
get the phi scale
std::vector< unsigned int > m_lutPhiMuToHtm
phi conversion for Mu to HTM
const double rad2deg(const double &) const
convert phi from rad (-pi, pi] to deg (0, 360)
std::string l1GtObjectEnumToString(const L1GtObject &)
Definition: L1GtObject.cc:69
virtual ~L1GtEtaPhiConversions()
destructor
#define LogTrace(id)
const bool convertPhiIndex(const unsigned int pairIndex, const unsigned int positionPair, const unsigned int initialIndex, unsigned int &convertedIndex) const
const unsigned int gtObjectNrBinsPhi(const L1GtObject &) const
return the number of phi bins for a GT object
const bool convertEtaIndex(const L1GtObject &, const unsigned int initialIndex, unsigned int &convertedIndex) const
unsigned int numberGctEtSumPhiBins() const
std::vector< unsigned int > m_lutEtaForJetToCommonCalo
void convertL1Scales(const L1CaloGeometry *, const L1MuTriggerScales *, const int, const int)
perform all scale conversions
Definition: L1GtObject.h:35
virtual float getHighEdge(unsigned packed) const =0
get the upper edge of bin represented by packed
virtual void print(std::ostream &myCout) const
print all the performed conversions
std::vector< unsigned int > m_lutPhiMuToEtm
phi conversion for Mu to ETM
virtual float getValue(unsigned i) const =0
get value of the underlying vector for bin i
unsigned int numberGctEmJetPhiBins() const
double etSumPhiBinLowEdge(unsigned int phiIndex) const
static const unsigned int badIndex
int m_verbosity
verbosity level
unsigned int globalEtaIndex(const double &etaValue) const
std::vector< std::pair< L1GtObject, L1GtObject > > m_gtObjectPairVec
vector of all L1GtObject pairs
std::vector< const unsigned int * > m_pairNrPhiBinsVec
double globalEtaBinLowEdge(unsigned int globalEtaIndex) const
unsigned int m_nrBinsPhiJetEg
number of phi bins for calorimeter objects (*Jet, *EG)
Log< level::Info, false > LogInfo
static const double PiConversion
std::vector< unsigned int > m_lutPhiMuToJetEg
phi conversion for Mu to (*Jet, EG)
unsigned int m_nrBinsPhiHtm
number of phi bins for HTM
unsigned int numberGctForwardEtaBinsPerHalf() const
bool m_isDebugEnabled
cached edm::isDebugEnabled()
const L1MuTriggerScales * m_l1MuTriggerScales
pointer to muon scales - updated in convertl1Scales method
virtual unsigned getNBins() const =0
get number of bins
double htSumPhiBinLowEdge(unsigned int phiIndex) const
const unsigned int gtObjectPairIndex(const L1GtObject &, const L1GtObject &) const
std::vector< unsigned int > m_lutPhiEtmToHtm
phi conversion for ETM to HTM
HLT enums.
unsigned int numberGctHtSumPhiBins() const
double etaBinCenter(unsigned int etaIndex, bool central=true) const
Definition: L1GtObject.h:37
std::vector< unsigned int > m_lutPhiJetEgToJetEg
unsigned int numberGctCentralEtaBinsPerHalf() const
std::vector< unsigned int > m_lutPhiHtmToJetEg
phi conversion for HTM to (*Jet, EG)
std::vector< unsigned int > m_lutEtaMuToCommonCalo
eta conversion of Mu to the common calorimeter eta scale defined before
double etSumPhiBinHighEdge(unsigned int phiIndex) const
double htSumPhiBinHighEdge(unsigned int phiIndex) const
std::vector< unsigned int > m_lutPhiEtmToJetEg
phi conversion for ETM to (*Jet, EG)
double emJetPhiBinLowEdge(unsigned int phiIndex) const
#define LogDebug(id)