CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
L1GtEtaPhiConversions Class Reference

#include <L1GtEtaPhiConversions.h>

Public Member Functions

const bool convertEtaIndex (const L1GtObject &, const unsigned int initialIndex, unsigned int &convertedIndex) const
 
void convertL1Scales (const L1CaloGeometry *, const L1MuTriggerScales *, const int, const int)
 perform all scale conversions More...
 
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 More...
 
const unsigned int gtObjectNrBinsPhi (const L1GtObject &, const L1GtObject &) const
 
const unsigned int gtObjectNrBinsPhi (const unsigned int) const
 
const unsigned int gtObjectPairIndex (const L1GtObject &, const L1GtObject &) const
 
 L1GtEtaPhiConversions ()
 constructor More...
 
virtual void print (std::ostream &myCout) const
 print all the performed conversions More...
 
void setVerbosity (const int verbosity)
 
virtual ~L1GtEtaPhiConversions ()
 destructor More...
 

Private Member Functions

const double rad2deg (const double &) const
 convert phi from rad (-pi, pi] to deg (0, 360) More...
 

Private Attributes

std::vector< std::pair< L1GtObject, L1GtObject > > m_gtObjectPairVec
 vector of all L1GtObject pairs More...
 
bool m_isDebugEnabled
 cached edm::isDebugEnabled() More...
 
const L1CaloGeometrym_l1CaloGeometry
 pointer to calorimetry scales - updated in convertl1Scales method More...
 
const L1MuTriggerScalesm_l1MuTriggerScales
 pointer to muon scales - updated in convertl1Scales method More...
 
std::vector< unsigned int > m_lutEtaCentralToCommonCalo
 
std::vector< unsigned int > m_lutEtaForJetToCommonCalo
 
std::vector< unsigned int > m_lutEtaMuToCommonCalo
 eta conversion of Mu to the common calorimeter eta scale defined before More...
 
std::vector< unsigned int > m_lutPhiEtmToHtm
 phi conversion for ETM to HTM More...
 
std::vector< unsigned int > m_lutPhiEtmToJetEg
 phi conversion for ETM to (*Jet, EG) More...
 
std::vector< unsigned int > m_lutPhiHtmToJetEg
 phi conversion for HTM to (*Jet, EG) More...
 
std::vector< unsigned int > m_lutPhiJetEgToJetEg
 
std::vector< unsigned int > m_lutPhiMuToEtm
 phi conversion for Mu to ETM More...
 
std::vector< unsigned int > m_lutPhiMuToHtm
 phi conversion for Mu to HTM More...
 
std::vector< unsigned int > m_lutPhiMuToJetEg
 phi conversion for Mu to (*Jet, EG) More...
 
unsigned int m_nrBinsEtaCommon
 number of eta bins for common scale More...
 
unsigned int m_nrBinsPhiEtm
 number of phi bins for ETM More...
 
unsigned int m_nrBinsPhiHtm
 number of phi bins for HTM More...
 
unsigned int m_nrBinsPhiJetEg
 number of phi bins for calorimeter objects (*Jet, *EG) More...
 
unsigned int m_nrBinsPhiMu
 number of phi bins for muons More...
 
std::vector< bool > m_pairConvertPhiFirstGtObject
 
std::vector< const unsigned int * > m_pairNrPhiBinsVec
 
std::vector< const std::vector< unsigned int > * > m_pairPhiConvVec
 
int m_verbosity
 verbosity level More...
 

Static Private Attributes

static const unsigned int badIndex = 999999
 
static const double PiConversion = 180. / acos(-1.)
 

Detailed Description

Description: convert eta and phi between various L1 trigger objects.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 36 of file L1GtEtaPhiConversions.h.

Constructor & Destructor Documentation

◆ L1GtEtaPhiConversions()

L1GtEtaPhiConversions::L1GtEtaPhiConversions ( )

constructor

Definition at line 38 of file L1GtEtaPhiConversions.cc.

References CenJet, ETM, ForJet, HTM, IsoEG, l1GtObjectEnumToString(), LogTrace, m_gtObjectPairVec, m_isDebugEnabled, m_lutPhiEtmToHtm, m_lutPhiEtmToJetEg, m_lutPhiHtmToJetEg, m_lutPhiJetEgToJetEg, m_lutPhiMuToEtm, m_lutPhiMuToHtm, m_lutPhiMuToJetEg, m_nrBinsPhiEtm, m_nrBinsPhiHtm, m_nrBinsPhiJetEg, m_pairConvertPhiFirstGtObject, m_pairNrPhiBinsVec, m_pairPhiConvVec, Mu, NoIsoEG, TauJet, and trackerHitRTTI::vector.

39  : m_nrBinsPhiMu(0),
41  m_nrBinsPhiEtm(0),
42  m_nrBinsPhiHtm(0),
44  m_verbosity(0),
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 }
bool isDebugEnabled()
unsigned int m_nrBinsEtaCommon
number of eta bins for common scale
unsigned int m_nrBinsPhiMu
number of phi bins for muons
Definition: L1GtObject.h:38
std::vector< bool > m_pairConvertPhiFirstGtObject
Definition: L1GtObject.h:35
unsigned int m_nrBinsPhiEtm
number of phi bins for ETM
std::vector< const std::vector< unsigned int > * > m_pairPhiConvVec
std::vector< unsigned int > m_lutPhiMuToHtm
phi conversion for Mu to HTM
std::string l1GtObjectEnumToString(const L1GtObject &)
Definition: L1GtObject.cc:69
#define LogTrace(id)
std::vector< unsigned int > m_lutPhiMuToEtm
phi conversion for Mu to ETM
int m_verbosity
verbosity level
std::vector< std::pair< L1GtObject, L1GtObject > > m_gtObjectPairVec
vector of all L1GtObject pairs
std::vector< const unsigned int * > m_pairNrPhiBinsVec
unsigned int m_nrBinsPhiJetEg
number of phi bins for calorimeter objects (*Jet, *EG)
Definition: L1GtObject.h:29
std::vector< unsigned int > m_lutPhiMuToJetEg
phi conversion for Mu to (*Jet, EG)
unsigned int m_nrBinsPhiHtm
number of phi bins for HTM
bool m_isDebugEnabled
cached edm::isDebugEnabled()
std::vector< unsigned int > m_lutPhiEtmToHtm
phi conversion for ETM to HTM
std::vector< unsigned int > m_lutPhiJetEgToJetEg
std::vector< unsigned int > m_lutPhiHtmToJetEg
phi conversion for HTM to (*Jet, EG)
std::vector< unsigned int > m_lutPhiEtmToJetEg
phi conversion for ETM to (*Jet, EG)

◆ ~L1GtEtaPhiConversions()

L1GtEtaPhiConversions::~L1GtEtaPhiConversions ( )
virtual

destructor

Definition at line 446 of file L1GtEtaPhiConversions.cc.

446  {
447  // do nothing
448 }

Member Function Documentation

◆ convertEtaIndex()

const bool L1GtEtaPhiConversions::convertEtaIndex ( const L1GtObject gtObject,
const unsigned int  initialIndex,
unsigned int &  convertedIndex 
) const

convert the eta index initialIndex for a L1GtObject object to common scale converted index returned by reference method return true, if initial index within scale size otherwise (hardware error), return false

Definition at line 596 of file L1GtEtaPhiConversions.cc.

References badIndex, BPTX, Castor, CenJet, ETM, ETT, ForJet, GtExternal, HfBitCounts, HfRingEtSums, HTM, HTT, IsoEG, JetCounts, l1GtObjectEnumToString(), LogTrace, m_isDebugEnabled, m_lutEtaCentralToCommonCalo, m_lutEtaForJetToCommonCalo, m_lutEtaMuToCommonCalo, m_verbosity, Mu, NoIsoEG, ObjNull, TauJet, and TechTrig.

Referenced by L1GtCorrelationCondition::evaluateCondition().

598  {
599  unsigned int newIndex = badIndex;
600  bool conversionStatus = false;
601 
602  switch (gtObject) {
603  case Mu: {
604  // check if initial index is within the scale size
605  // could be outside the scale size if there are hardware errors
606  // or wrong scale conversions
607  if (initialIndex >= m_lutEtaMuToCommonCalo.size()) {
608  conversionStatus = false;
609 
610  if (m_verbosity && m_isDebugEnabled) {
611  LogTrace("L1GlobalTrigger") << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
612  << " has initial eta index " << initialIndex
613  << " >= " << (m_lutEtaMuToCommonCalo.size()) << " scale size. Conversion failed."
614  << std::endl;
615  }
616  } else {
617  // convert the index
618  newIndex = m_lutEtaMuToCommonCalo[initialIndex];
619 
620  if (newIndex != badIndex) {
621  conversionStatus = true;
622 
623  if (m_verbosity && m_isDebugEnabled) {
624  LogTrace("L1GlobalTrigger") << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
625  << " initial eta index " << initialIndex << " (within scale size "
626  << (m_lutEtaMuToCommonCalo.size()) << ") converted to " << newIndex
627  << std::endl;
628  }
629 
630  } else {
631  conversionStatus = false;
632 
633  if (m_verbosity && m_isDebugEnabled) {
634  LogTrace("L1GlobalTrigger") << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
635  << " initial eta index " << initialIndex << " (within scale size "
636  << (m_lutEtaMuToCommonCalo.size()) << ") converted to badIndex" << newIndex
637  << " Conversion failed." << std::endl;
638  }
639  }
640  }
641 
642  } break;
643 
644  case NoIsoEG:
645  case IsoEG:
646  case CenJet:
647  case TauJet: {
648  // check if initial index is within the scale size
649  // could be outside the scale size if there are hardware errors
650  // or wrong scale conversions
651  if (initialIndex >= m_lutEtaCentralToCommonCalo.size()) {
652  conversionStatus = false;
653 
654  if (m_verbosity && m_isDebugEnabled) {
655  LogTrace("L1GlobalTrigger") << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
656  << " has initial eta index " << initialIndex
657  << " >= " << (m_lutEtaCentralToCommonCalo.size())
658  << " scale size. Conversion failed." << std::endl;
659  }
660  } else {
661  // convert the index
662  newIndex = m_lutEtaCentralToCommonCalo[initialIndex];
663 
664  if (newIndex != badIndex) {
665  conversionStatus = true;
666 
667  if (m_verbosity && m_isDebugEnabled) {
668  LogTrace("L1GlobalTrigger") << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
669  << " initial eta index " << initialIndex << " (within scale size "
670  << (m_lutEtaMuToCommonCalo.size()) << ") converted to " << newIndex
671  << std::endl;
672  }
673 
674  } else {
675  conversionStatus = false;
676 
677  if (m_verbosity && m_isDebugEnabled) {
678  LogTrace("L1GlobalTrigger") << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
679  << " initial eta index " << initialIndex << " (within scale size "
680  << (m_lutEtaCentralToCommonCalo.size()) << ") converted to badIndex" << newIndex
681  << " Conversion failed." << std::endl;
682  }
683  }
684  }
685 
686  } break;
687 
688  case ForJet: {
689  // check if initial index is within the scale size
690  // could be outside the scale size if there are hardware errors
691  // or wrong scale conversions
692  if (initialIndex >= m_lutEtaForJetToCommonCalo.size()) {
693  conversionStatus = false;
694 
695  if (m_verbosity && m_isDebugEnabled) {
696  LogTrace("L1GlobalTrigger") << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
697  << " has initial eta index " << initialIndex
698  << " >= " << (m_lutEtaForJetToCommonCalo.size())
699  << " scale size. Conversion failed." << std::endl;
700  }
701  } else {
702  // convert the index
703  newIndex = m_lutEtaForJetToCommonCalo[initialIndex];
704 
705  if (newIndex != badIndex) {
706  conversionStatus = true;
707 
708  if (m_verbosity && m_isDebugEnabled) {
709  LogTrace("L1GlobalTrigger") << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
710  << " initial eta index " << initialIndex << " (within scale size "
711  << (m_lutEtaMuToCommonCalo.size()) << ") converted to " << newIndex
712  << std::endl;
713  }
714 
715  } else {
716  conversionStatus = false;
717 
718  if (m_verbosity && m_isDebugEnabled) {
719  LogTrace("L1GlobalTrigger") << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
720  << " initial eta index " << initialIndex << " (within scale size "
721  << (m_lutEtaForJetToCommonCalo.size()) << ") converted to badIndex" << newIndex
722  << " Conversion failed." << std::endl;
723  }
724  }
725  }
726  } break;
727 
728  case ETM:
729  case ETT:
730  case HTT:
731  case HTM:
732  case JetCounts:
733  case HfBitCounts:
734  case HfRingEtSums:
735  case TechTrig:
736  case Castor:
737  case BPTX:
738  case GtExternal:
739  case ObjNull: {
740  // no conversions needed, there is no eta quantity for these objects
741  conversionStatus = false;
742  } break;
743 
744  default: {
745  edm::LogInfo("L1GtObject") << "\n '" << (l1GtObjectEnumToString(gtObject))
746  << "' is not a recognized L1GtObject. "
747  << "\n Conversion failed. " << std::endl;
748  conversionStatus = false;
749  } break;
750  }
751 
752  //
753  convertedIndex = newIndex;
754 
755  return conversionStatus;
756 }
Definition: L1GtObject.h:38
std::vector< unsigned int > m_lutEtaCentralToCommonCalo
Definition: L1GtObject.h:35
std::string l1GtObjectEnumToString(const L1GtObject &)
Definition: L1GtObject.cc:69
#define LogTrace(id)
Definition: L1GtObject.h:37
std::vector< unsigned int > m_lutEtaForJetToCommonCalo
static const unsigned int badIndex
int m_verbosity
verbosity level
Log< level::Info, false > LogInfo
Definition: L1GtObject.h:29
bool m_isDebugEnabled
cached edm::isDebugEnabled()
Definition: L1GtObject.h:36
std::vector< unsigned int > m_lutEtaMuToCommonCalo
eta conversion of Mu to the common calorimeter eta scale defined before

◆ convertL1Scales()

void L1GtEtaPhiConversions::convertL1Scales ( const L1CaloGeometry l1CaloGeometry,
const L1MuTriggerScales l1MuTriggerScales,
const int  ifCaloEtaNumberBits,
const int  ifMuEtaNumberBits 
)

perform all scale conversions

Definition at line 841 of file L1GtEtaPhiConversions.cc.

References badIndex, TauDecayModes::dec, L1CaloGeometry::emJetPhiBinHighEdge(), L1CaloGeometry::emJetPhiBinLowEdge(), L1CaloGeometry::etaBinCenter(), L1CaloGeometry::etSumPhiBinHighEdge(), L1CaloGeometry::etSumPhiBinLowEdge(), L1MuTriggerScales::getGMTEtaScale(), L1MuScale::getHighEdge(), L1MuScale::getLowEdge(), L1MuScale::getNBins(), L1MuTriggerScales::getPhiScale(), L1MuScale::getValue(), L1CaloGeometry::globalEtaBinLowEdge(), L1CaloGeometry::globalEtaIndex(), L1CaloGeometry::htSumPhiBinHighEdge(), L1CaloGeometry::htSumPhiBinLowEdge(), l1CaloGeometry_cfi::l1CaloGeometry, LogDebug, LogTrace, m_isDebugEnabled, m_l1CaloGeometry, m_l1MuTriggerScales, m_lutEtaCentralToCommonCalo, m_lutEtaForJetToCommonCalo, m_lutEtaMuToCommonCalo, m_lutPhiEtmToHtm, m_lutPhiEtmToJetEg, m_lutPhiHtmToJetEg, m_lutPhiJetEgToJetEg, m_lutPhiMuToEtm, m_lutPhiMuToHtm, m_lutPhiMuToJetEg, m_nrBinsEtaCommon, m_nrBinsPhiEtm, m_nrBinsPhiHtm, m_nrBinsPhiJetEg, m_nrBinsPhiMu, m_verbosity, L1CaloGeometry::numberGctCentralEtaBinsPerHalf(), L1CaloGeometry::numberGctEmJetPhiBins(), L1CaloGeometry::numberGctEtSumPhiBins(), L1CaloGeometry::numberGctForwardEtaBinsPerHalf(), and L1CaloGeometry::numberGctHtSumPhiBins().

Referenced by L1GlobalTriggerGTL::run().

844  {
845  // no bullet-proof method, depends on binning ...
846  // decide "by hand / by eyes" which object converts to which object
847 
848  // update the scales used
850  m_l1MuTriggerScales = l1MuTriggerScales;
851 
852  // number of bins for all phi scales used
853 
854  m_nrBinsPhiMu = 144; // FIXME ask Ivan for size() ...
855  // m_nrBinsPhiMu = m_l1MuTriggerScales->getPhiScale()->size();
856 
860 
861  //
862  // convert phi scale for muon (finer) to phi scale for (*Jet, EG) / ETM / HTM
863  // (coarser)
864  //
865 
866  m_lutPhiMuToJetEg.clear();
868 
869  m_lutPhiMuToEtm.clear();
871 
872  m_lutPhiMuToHtm.clear();
874 
875  for (unsigned int phiMuInd = 0; phiMuInd < m_nrBinsPhiMu; ++phiMuInd) {
876  double phiMuLowEdge = m_l1MuTriggerScales->getPhiScale()->getLowEdge(phiMuInd);
877  double phiMuHighEdge = m_l1MuTriggerScales->getPhiScale()->getHighEdge(phiMuInd);
878 
879  // to avoid precision problems, add a small quantity to phiMuLowEdge
880  double phiMuLowEdgeSmallShiftRight = phiMuLowEdge + (phiMuHighEdge - phiMuLowEdge) / 100.;
881 
882  // phi Mu -> (*Jet, EG)
883 
884  unsigned int nrBins = m_nrBinsPhiJetEg;
885 
886  for (unsigned int iBin = nrBins;; --iBin) {
887  double phiLowEdge = m_l1CaloGeometry->emJetPhiBinLowEdge(iBin);
888  double phiHighEdge = m_l1CaloGeometry->emJetPhiBinHighEdge(iBin);
889 
890  if (phiMuLowEdgeSmallShiftRight >= phiLowEdge) {
891  m_lutPhiMuToJetEg[phiMuInd] = iBin % nrBins;
892 
893  LogTrace("L1GlobalTrigger") << " phiMuIndex \t" << phiMuInd << " [ " << phiMuLowEdge << " \t, " << phiMuHighEdge
894  << "] \t==>\t phiMuJetEG \t" << m_lutPhiMuToJetEg[phiMuInd] << " [ " << phiLowEdge
895  << "\t, " << phiHighEdge << " ]" << std::endl;
896 
897  break;
898  }
899  }
900 
901  // phi Mu -> ETM
902 
903  nrBins = m_nrBinsPhiEtm;
904 
905  for (unsigned int iBin = nrBins;; --iBin) {
906  double phiLowEdge = m_l1CaloGeometry->etSumPhiBinLowEdge(iBin);
907  double phiHighEdge = m_l1CaloGeometry->etSumPhiBinHighEdge(iBin);
908 
909  if (phiMuLowEdgeSmallShiftRight >= phiLowEdge) {
910  m_lutPhiMuToEtm[phiMuInd] = iBin % nrBins;
911 
912  LogTrace("L1GlobalTrigger") << " phiMuIndex \t" << phiMuInd << " [ " << phiMuLowEdge << " \t, " << phiMuHighEdge
913  << "] \t==>\t phiMuToEtm \t" << m_lutPhiMuToEtm[phiMuInd] << " [ " << phiLowEdge
914  << "\t, " << phiHighEdge << " ]" << std::endl;
915 
916  break;
917  }
918  }
919 
920  // phi Mu -> HTM
921 
922  nrBins = m_nrBinsPhiHtm;
923 
924  for (unsigned int iBin = nrBins;; --iBin) {
925  double phiLowEdge = m_l1CaloGeometry->htSumPhiBinLowEdge(iBin);
926  double phiHighEdge = m_l1CaloGeometry->htSumPhiBinHighEdge(iBin);
927 
928  if (phiMuLowEdgeSmallShiftRight >= phiLowEdge) {
929  m_lutPhiMuToHtm[phiMuInd] = iBin % nrBins;
930 
931  LogTrace("L1GlobalTrigger") << " phiMuIndex \t" << phiMuInd << " [ " << phiMuLowEdge << " \t, " << phiMuHighEdge
932  << "] \t==>\t phiMuToHtm \t" << m_lutPhiMuToHtm[phiMuInd] << " [ " << phiLowEdge
933  << "\t, " << phiHighEdge << " ]" << std::endl;
934 
935  break;
936  }
937  }
938 
939  LogTrace("L1GlobalTrigger") << std::endl;
940  }
941 
942  if (m_verbosity && m_isDebugEnabled) {
943  LogTrace("L1GlobalTrigger") << "Mu phi conversions" << std::endl;
944  for (unsigned int iBin = 0; iBin < m_nrBinsPhiMu; ++iBin) {
945  LogTrace("L1GlobalTrigger") << " Mu phiIndex \t" << iBin << "\t converted to index:"
946  << "\t Jet-EG \t" << m_lutPhiMuToJetEg.at(iBin) << "\t ETM \t"
947  << m_lutPhiMuToEtm.at(iBin) << "\t HTM \t" << m_lutPhiMuToHtm.at(iBin) << std::endl;
948  }
949  LogTrace("L1GlobalTrigger") << std::endl;
950  }
951 
952  //
953  // convert phi scale for ETM to phi scale for (*Jet, EG) / HTM (coarser)
954  //
955 
956  m_lutPhiEtmToJetEg.clear();
958 
959  m_lutPhiEtmToHtm.clear();
961 
962  for (unsigned int phiEtmInd = 0; phiEtmInd < m_nrBinsPhiEtm; ++phiEtmInd) {
963  double phiEtmLowEdge = m_l1CaloGeometry->etSumPhiBinLowEdge(phiEtmInd);
964  double phiEtmHighEdge = m_l1CaloGeometry->etSumPhiBinHighEdge(phiEtmInd);
965 
966  // to avoid precision problems, add a small quantity to phiEtmLowEdge
967  double phiEtmLowEdgeSmallShiftRight = phiEtmLowEdge + (phiEtmHighEdge - phiEtmLowEdge) / 100.;
968 
969  // phi ETM -> (*Jet, EG)
970 
971  unsigned int nrBins = m_nrBinsPhiJetEg;
972 
973  for (unsigned int iBin = nrBins;; --iBin) {
974  double phiLowEdge = m_l1CaloGeometry->emJetPhiBinLowEdge(iBin);
975  double phiHighEdge = m_l1CaloGeometry->emJetPhiBinHighEdge(iBin);
976 
977  if (phiEtmLowEdgeSmallShiftRight >= phiLowEdge) {
978  m_lutPhiEtmToJetEg[phiEtmInd] = iBin % nrBins;
979 
980  LogTrace("L1GlobalTrigger") << " phiEtmIndex \t" << phiEtmInd << " [ " << phiEtmLowEdge << " \t, "
981  << phiEtmHighEdge << "] \t==>\t phiEtmJetEG \t" << m_lutPhiEtmToJetEg[phiEtmInd]
982  << " [ " << phiLowEdge << "\t, " << phiHighEdge << " ]" << std::endl;
983 
984  break;
985  }
986  }
987 
988  // phi ETM -> HTM
989 
990  nrBins = m_nrBinsPhiHtm;
991 
992  for (unsigned int iBin = nrBins;; --iBin) {
993  double phiLowEdge = m_l1CaloGeometry->htSumPhiBinLowEdge(iBin);
994  double phiHighEdge = m_l1CaloGeometry->htSumPhiBinHighEdge(iBin);
995 
996  if (phiEtmLowEdgeSmallShiftRight >= phiLowEdge) {
997  m_lutPhiEtmToHtm[phiEtmInd] = iBin % nrBins;
998 
999  LogTrace("L1GlobalTrigger") << " phiEtmIndex \t" << phiEtmInd << " [ " << phiEtmLowEdge << " \t, "
1000  << phiEtmHighEdge << "] \t==>\t phiEtmToHtm \t" << m_lutPhiEtmToHtm[phiEtmInd]
1001  << " [ " << phiLowEdge << "\t, " << phiHighEdge << " ]" << std::endl;
1002 
1003  break;
1004  }
1005  }
1006 
1007  LogTrace("L1GlobalTrigger") << std::endl;
1008  }
1009 
1010  //
1011  // convert phi scale for HTM to phi scale for (*Jet, EG)
1012  //
1013 
1014  m_lutPhiHtmToJetEg.clear();
1016 
1017  for (unsigned int phiHtmInd = 0; phiHtmInd < m_nrBinsPhiHtm; ++phiHtmInd) {
1018  double phiHtmLowEdge = m_l1CaloGeometry->htSumPhiBinLowEdge(phiHtmInd);
1019  double phiHtmHighEdge = m_l1CaloGeometry->htSumPhiBinHighEdge(phiHtmInd);
1020 
1021  // to avoid precision problems, add a small quantity to phiHtmLowEdge
1022  double phiHtmLowEdgeSmallShiftRight = phiHtmLowEdge + (phiHtmHighEdge - phiHtmLowEdge) / 100.;
1023 
1024  unsigned int nrBins = m_nrBinsPhiJetEg;
1025 
1026  for (unsigned int iBin = nrBins;; --iBin) {
1027  double phiLowEdge = m_l1CaloGeometry->emJetPhiBinLowEdge(iBin);
1028  double phiHighEdge = m_l1CaloGeometry->emJetPhiBinHighEdge(iBin);
1029 
1030  if (phiHtmLowEdgeSmallShiftRight >= phiLowEdge) {
1031  m_lutPhiHtmToJetEg[phiHtmInd] = iBin % nrBins;
1032 
1033  LogTrace("L1GlobalTrigger") << " phiHtmIndex \t" << phiHtmInd << " [ " << phiHtmLowEdge << " \t, "
1034  << phiHtmHighEdge << "] \t==>\t phiHtmJetEG \t" << m_lutPhiHtmToJetEg[phiHtmInd]
1035  << " [ " << phiLowEdge << "\t, " << phiHighEdge << " ]" << std::endl;
1036 
1037  break;
1038  }
1039  }
1040  }
1041 
1042  //
1043  // convert phi scale for (*Jet, EG) to (*Jet, EG)
1044  // dummy - return the same index as the input index
1045 
1046  m_lutPhiJetEgToJetEg.clear();
1048 
1049  for (unsigned int phiInd = 0; phiInd < m_nrBinsPhiJetEg; ++phiInd) {
1050  m_lutPhiJetEgToJetEg[phiInd] = phiInd;
1051  }
1052 
1053  //
1054  // eta conversions
1055  //
1056 
1057  // all objects are converted to a common central / forward calorimeter eta
1058  // scale, built by setting together the forward scale and the central scale
1059  //
1060  // eta is signed, MSB is the sign for all objects - must be taken into
1061  // account in conversion - the common scale is, from 0 to m_nrBinsEtaCommon:
1062  //
1063  // [ForJet negative bins][Central Jet/IsoEG/NoIsoEG negative bins][Central
1064  // Jet/IsoEG/NoIsoEG positive bins][ForJet positive bins]
1065  //
1066 
1067  unsigned int nrGctCentralEtaBinsPerHalf = m_l1CaloGeometry->numberGctCentralEtaBinsPerHalf();
1068 
1069  unsigned int nrGctForwardEtaBinsPerHalf = m_l1CaloGeometry->numberGctForwardEtaBinsPerHalf();
1070 
1071  unsigned int nrGctTotalEtaBinsPerHalf = nrGctCentralEtaBinsPerHalf + nrGctForwardEtaBinsPerHalf;
1072 
1073  m_nrBinsEtaCommon = 2 * nrGctTotalEtaBinsPerHalf;
1074 
1075  //
1076  // convert eta scale for CenJet/TauJet & IsoEG/NoIsoEG to a common
1077  // central / forward calorimeter eta scale
1078  //
1079  // get the sign and the index absolute value
1080 
1081  LogTrace("L1GlobalTrigger") << " \nEta conversion: CenJet/TauJet & "
1082  "IsoEG/NoIsoEG to a common calorimeter scale\n"
1083  << std::endl;
1084 
1086  m_lutEtaCentralToCommonCalo.resize((nrGctCentralEtaBinsPerHalf | (1 << (ifCaloEtaNumberBits - 1))), badIndex);
1087 
1088  for (unsigned int etaInd = 0; etaInd < nrGctCentralEtaBinsPerHalf; ++etaInd) {
1089  // for positive values, the index is etaInd
1090  unsigned int globalIndex = m_l1CaloGeometry->globalEtaIndex(m_l1CaloGeometry->etaBinCenter(etaInd, true));
1091  m_lutEtaCentralToCommonCalo[etaInd] = globalIndex;
1092 
1093  LogTrace("L1GlobalTrigger") << " etaIndex " << etaInd << "\t [hex: " << std::hex << etaInd << "] " << std::dec
1094  << " ==> etaIndexGlobal " << globalIndex << std::endl;
1095 
1096  // for negative values, one adds (binary) 1 as MSB to the index
1097  unsigned int etaIndNeg = etaInd | (1 << (ifCaloEtaNumberBits - 1));
1098  globalIndex = m_l1CaloGeometry->globalEtaIndex(m_l1CaloGeometry->etaBinCenter(etaIndNeg, true));
1099  m_lutEtaCentralToCommonCalo[etaIndNeg] = globalIndex;
1100 
1101  LogTrace("L1GlobalTrigger") << " etaIndex " << etaIndNeg << "\t [hex: " << std::hex << etaIndNeg << "] " << std::dec
1102  << " ==> etaIndexGlobal " << globalIndex << std::endl;
1103  }
1104 
1105  //
1106  // convert eta scale for ForJet to a common
1107  // central / forward calorimeter eta scale
1108  //
1109 
1110  LogTrace("L1GlobalTrigger") << " \nEta conversion: ForJet to a common calorimeter scale\n" << std::endl;
1111 
1113  m_lutEtaForJetToCommonCalo.resize((nrGctForwardEtaBinsPerHalf | (1 << (ifCaloEtaNumberBits - 1))), badIndex);
1114 
1115  for (unsigned int etaInd = 0; etaInd < nrGctForwardEtaBinsPerHalf; ++etaInd) {
1116  // for positive values, the index is etaInd
1117  unsigned int globalIndex = m_l1CaloGeometry->globalEtaIndex(m_l1CaloGeometry->etaBinCenter(etaInd, false));
1118  m_lutEtaForJetToCommonCalo[etaInd] = globalIndex;
1119 
1120  LogTrace("L1GlobalTrigger") << " etaIndex " << etaInd << "\t [hex: " << std::hex << etaInd << "] " << std::dec
1121  << " ==> etaIndexGlobal " << globalIndex << std::endl;
1122 
1123  // for negative values, one adds (binary) 1 as MSB to the index
1124  unsigned int etaIndNeg = etaInd | (1 << (ifCaloEtaNumberBits - 1));
1125  globalIndex = m_l1CaloGeometry->globalEtaIndex(m_l1CaloGeometry->etaBinCenter(etaIndNeg, false));
1126  m_lutEtaForJetToCommonCalo[etaIndNeg] = globalIndex;
1127 
1128  LogTrace("L1GlobalTrigger") << " etaIndex " << etaIndNeg << "\t [hex: " << std::hex << etaIndNeg << "] " << std::dec
1129  << " ==> etaIndexGlobal " << globalIndex << std::endl;
1130  }
1131 
1132  //
1133  // convert eta scale for Mu to a common
1134  // central / forward calorimeter eta scale
1135  //
1136 
1137  LogDebug("L1GlobalTrigger") << " \nEta conversion: Mu to a common calorimeter scale\n" << std::endl;
1138 
1139  // eta scale defined for positive values - need to be symmetrized
1140  unsigned int nrBinsEtaMuPerHalf = m_l1MuTriggerScales->getGMTEtaScale()->getNBins();
1141  LogTrace("L1GlobalTrigger") << " \nnrBinsEtaMuPerHalf = " << nrBinsEtaMuPerHalf << "\n" << std::endl;
1142 
1143  m_lutEtaMuToCommonCalo.clear();
1144  m_lutEtaMuToCommonCalo.resize((nrBinsEtaMuPerHalf | (1 << (ifMuEtaNumberBits - 1))), badIndex);
1145 
1146  for (unsigned int etaMuInd = 0; etaMuInd < nrBinsEtaMuPerHalf; ++etaMuInd) {
1147  double etaMuLowEdge = m_l1MuTriggerScales->getGMTEtaScale()->getValue(etaMuInd);
1148  double etaMuHighEdge = m_l1MuTriggerScales->getGMTEtaScale()->getValue(etaMuInd + 1);
1149 
1150  // to avoid precision problems, add a small quantity to etaMuLowEdge
1151  double etaMuLowEdgeSmallShiftRight = etaMuLowEdge + (etaMuHighEdge - etaMuLowEdge) / 100.;
1152 
1153  // positive values
1154  for (unsigned int iBin = m_nrBinsEtaCommon;; --iBin) {
1155  double etaLowEdge = m_l1CaloGeometry->globalEtaBinLowEdge(iBin);
1156 
1157  double etaHighEdge = 0.0;
1158  if (iBin == m_nrBinsEtaCommon) {
1159  etaHighEdge = etaLowEdge;
1160  } else {
1161  etaHighEdge = m_l1CaloGeometry->globalEtaBinLowEdge(iBin + 1);
1162  }
1163 
1164  if (etaMuLowEdgeSmallShiftRight >= etaLowEdge) {
1165  m_lutEtaMuToCommonCalo[etaMuInd] = iBin % m_nrBinsEtaCommon;
1166 
1167  LogTrace("L1GlobalTrigger") << " etaMuIndex \t" << etaMuInd << "\t [ " << etaMuLowEdge << ", \t"
1168  << etaMuHighEdge << "] ==> etaMuJetEG \t" << m_lutEtaMuToCommonCalo[etaMuInd]
1169  << "\t [ " << etaLowEdge << ", \t" << etaHighEdge << " ]" << std::endl;
1170 
1171  break;
1172  }
1173  }
1174 
1175  // for negative values, one adds (binary) 1 as MSB to the index
1176  unsigned int etaMuIndNeg = etaMuInd | (1 << (ifMuEtaNumberBits - 1));
1177  m_lutEtaMuToCommonCalo[etaMuIndNeg] =
1179 
1180  LogTrace("L1GlobalTrigger") << " etaMuIndexNeg \t" << etaMuIndNeg << "\t [ " << (-1.0 * etaMuLowEdge) << ", \t"
1181  << (-1.0 * etaMuHighEdge) << "] ==> etaMuJetEG \t"
1182  << m_lutEtaMuToCommonCalo[etaMuIndNeg] << "\t [ "
1183  << m_l1CaloGeometry->globalEtaBinLowEdge(m_lutEtaMuToCommonCalo[etaMuIndNeg]) << ", \t"
1185  << " ]" << std::endl;
1186  }
1187 
1188  if (m_verbosity && m_isDebugEnabled) {
1189  LogTrace("L1GlobalTrigger") << std::endl;
1190  LogTrace("L1GlobalTrigger") << std::endl;
1191  }
1192 }
const L1CaloGeometry * m_l1CaloGeometry
pointer to calorimetry scales - updated in convertl1Scales method
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
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
const L1MuScale * getPhiScale() const
get the phi scale
std::vector< unsigned int > m_lutPhiMuToHtm
phi conversion for Mu to HTM
#define LogTrace(id)
unsigned int numberGctEtSumPhiBins() const
std::vector< unsigned int > m_lutEtaForJetToCommonCalo
virtual float getHighEdge(unsigned packed) const =0
get the upper edge of bin represented by packed
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
double globalEtaBinLowEdge(unsigned int globalEtaIndex) const
unsigned int m_nrBinsPhiJetEg
number of phi bins for calorimeter objects (*Jet, *EG)
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
std::vector< unsigned int > m_lutPhiEtmToHtm
phi conversion for ETM to HTM
unsigned int numberGctHtSumPhiBins() const
double etaBinCenter(unsigned int etaIndex, bool central=true) const
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)

◆ convertPhiIndex()

const bool L1GtEtaPhiConversions::convertPhiIndex ( const unsigned int  pairIndex,
const unsigned int  positionPair,
const unsigned int  initialIndex,
unsigned int &  convertedIndex 
) const

convert the phi index initialIndex for an object from pair pairIndex, with position of object in pair positionPair to common scale for the L1GtObject pair converted index returned by reference method return true, if initial index within scale size otherwise (hardware error), return false

Definition at line 481 of file L1GtEtaPhiConversions.cc.

References badIndex, Exception, LogTrace, m_isDebugEnabled, m_pairConvertPhiFirstGtObject, m_pairPhiConvVec, and m_verbosity.

Referenced by L1GtCorrelationCondition::evaluateCondition().

484  {
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  conversionStatus = false;
493 
494  if (m_verbosity && m_isDebugEnabled) {
495  LogTrace("L1GlobalTrigger") << (positionPair ? " Second" : "\n First") << " object from pair " << pairIndex
496  << ": initial phi index " << initialIndex
497  << " >= " << ((*(m_pairPhiConvVec.at(pairIndex))).size()) << " Conversion failed."
498  << std::endl;
499  }
500  } else {
501  if (m_verbosity && m_isDebugEnabled) {
502  LogTrace("L1GlobalTrigger") << (positionPair ? " Second" : "\n First") << " object from pair " << pairIndex
503  << ": initial phi index " << initialIndex << " within scale size "
504  << ((*(m_pairPhiConvVec.at(pairIndex))).size()) << std::endl;
505  }
506  }
507 
508  // convert the index
509  switch (positionPair) {
510  case 0: {
511  if (m_pairConvertPhiFirstGtObject.at(pairIndex)) {
512  newIndex = (*(m_pairPhiConvVec.at(pairIndex))).at(initialIndex);
513 
514  if (newIndex != badIndex) {
515  conversionStatus = true;
516 
517  if (m_verbosity && m_isDebugEnabled) {
518  LogTrace("L1GlobalTrigger") << (positionPair ? " Second" : "\n First") << " object from pair "
519  << pairIndex << ": initial phi index " << initialIndex << " converted to "
520  << newIndex << std::endl;
521  }
522 
523  } else {
524  conversionStatus = false;
525 
526  if (m_verbosity && m_isDebugEnabled) {
527  LogTrace("L1GlobalTrigger") << (positionPair ? " Second" : "\n First") << " object from pair "
528  << pairIndex << ": converted phi index " << newIndex << "is equal to badIndex "
529  << badIndex << " Conversion failed." << std::endl;
530  }
531  }
532 
533  } else {
534  newIndex = initialIndex;
535  conversionStatus = true;
536 
537  if (m_verbosity && m_isDebugEnabled) {
538  LogTrace("L1GlobalTrigger") << (positionPair ? " Second" : "\n First") << " object from pair "
539  << pairIndex << ": initial phi index " << initialIndex
540  << " not requested to be converted, return index " << newIndex << std::endl;
541  }
542  }
543  }
544 
545  break;
546  case 1: {
547  if (m_pairConvertPhiFirstGtObject.at(pairIndex)) {
548  newIndex = initialIndex;
549  conversionStatus = true;
550 
551  if (m_verbosity && m_isDebugEnabled) {
552  LogTrace("L1GlobalTrigger") << (positionPair ? " Second" : "\n First") << " object from pair "
553  << pairIndex << ": initial phi index " << initialIndex
554  << " not requested to be converted, return index, return index " << newIndex
555  << std::endl;
556  }
557  } else {
558  newIndex = (*(m_pairPhiConvVec.at(pairIndex))).at(initialIndex);
559 
560  if (newIndex != badIndex) {
561  conversionStatus = true;
562 
563  if (m_verbosity && m_isDebugEnabled) {
564  LogTrace("L1GlobalTrigger") << (positionPair ? " Second" : "\n First") << " object from pair "
565  << pairIndex << ": initial phi index " << initialIndex << " converted to "
566  << newIndex << std::endl;
567  }
568 
569  } else {
570  conversionStatus = false;
571 
572  if (m_verbosity && m_isDebugEnabled) {
573  LogTrace("L1GlobalTrigger") << (positionPair ? " Second" : "\n First") << " object from pair "
574  << pairIndex << ": converted phi index " << newIndex << "is equal to badIndex "
575  << badIndex << " Conversion failed." << std::endl;
576  }
577  }
578  }
579 
580  }
581 
582  break;
583  default: {
584  // should not happen (programming error)
585  throw cms::Exception("FailModule") << "\n Wrong position in the object pair " << positionPair
586  << "\n Programming error - position must be either 0 or 1..." << std::endl;
587 
588  } break;
589  }
590 
591  //
592  convertedIndex = newIndex;
593  return conversionStatus;
594 }
std::vector< bool > m_pairConvertPhiFirstGtObject
std::vector< const std::vector< unsigned int > * > m_pairPhiConvVec
#define LogTrace(id)
static const unsigned int badIndex
int m_verbosity
verbosity level
bool m_isDebugEnabled
cached edm::isDebugEnabled()

◆ gtObjectNrBinsPhi() [1/3]

const unsigned int L1GtEtaPhiConversions::gtObjectNrBinsPhi ( const L1GtObject gtObject) const

return the number of phi bins for a GT object

Definition at line 758 of file L1GtEtaPhiConversions.cc.

References BPTX, Castor, CenJet, ETM, ETT, ForJet, GtExternal, HfBitCounts, HfRingEtSums, HTM, HTT, IsoEG, JetCounts, l1GtObjectEnumToString(), m_nrBinsPhiEtm, m_nrBinsPhiHtm, m_nrBinsPhiJetEg, m_nrBinsPhiMu, Mu, NoIsoEG, ObjNull, TauJet, and TechTrig.

Referenced by L1GtCorrelationCondition::evaluateCondition(), and L1GlobalTriggerGTL::run().

758  {
759  switch (gtObject) {
760  case Mu: {
761  return m_nrBinsPhiMu;
762  } break;
763 
764  case NoIsoEG:
765  case IsoEG:
766  case CenJet:
767  case ForJet:
768  case TauJet: {
769  return m_nrBinsPhiJetEg;
770  } break;
771 
772  case ETM: {
773  return m_nrBinsPhiEtm;
774  } break;
775 
776  case ETT:
777  case HTT: {
778  return 0;
779  } break;
780 
781  case HTM: {
782  return m_nrBinsPhiHtm;
783  } break;
784 
785  case JetCounts:
786  case HfBitCounts:
787  case HfRingEtSums:
788  case TechTrig:
789  case Castor:
790  case BPTX:
791  case GtExternal:
792  case ObjNull: {
793  return 0;
794  } break;
795 
796  default: {
797  edm::LogInfo("L1GtObject") << "\n '" << (l1GtObjectEnumToString(gtObject))
798  << "' is not a recognized L1GtObject. "
799  << "\n Return 0 bins.";
800  return 0;
801  } break;
802  }
803 }
unsigned int m_nrBinsPhiMu
number of phi bins for muons
Definition: L1GtObject.h:38
Definition: L1GtObject.h:35
unsigned int m_nrBinsPhiEtm
number of phi bins for ETM
std::string l1GtObjectEnumToString(const L1GtObject &)
Definition: L1GtObject.cc:69
Definition: L1GtObject.h:37
unsigned int m_nrBinsPhiJetEg
number of phi bins for calorimeter objects (*Jet, *EG)
Log< level::Info, false > LogInfo
Definition: L1GtObject.h:29
unsigned int m_nrBinsPhiHtm
number of phi bins for HTM
Definition: L1GtObject.h:36

◆ gtObjectNrBinsPhi() [2/3]

const unsigned int L1GtEtaPhiConversions::gtObjectNrBinsPhi ( const L1GtObject obj0,
const L1GtObject obj1 
) const

return the number of phi bins for a pair of GT objects, according to conversion rules

Definition at line 805 of file L1GtEtaPhiConversions.cc.

References l1GtObjectEnumToString(), LogTrace, m_gtObjectPairVec, m_pairNrPhiBinsVec, and trackerHitRTTI::vector.

805  {
806  std::pair<L1GtObject, L1GtObject> gtObjPair;
807  gtObjPair = std::make_pair(obj0, obj1);
808 
809  // LogTrace("L1GlobalTrigger") << "\nCompute gtObjectNrBinsPhi ["
810  // << (l1GtObjectEnumToString(obj0)) << ", "
811  // << (l1GtObjectEnumToString(obj1)) << "]\n" << std::endl;
812 
813  int iPair = 0;
814  for (std::vector<std::pair<L1GtObject, L1GtObject>>::const_iterator cIter = m_gtObjectPairVec.begin();
815  cIter != m_gtObjectPairVec.end();
816  ++cIter) {
817  if (*cIter == gtObjPair) {
818  LogTrace("L1GlobalTrigger") << "\n gtObjectNrBinsPhi [" << l1GtObjectEnumToString(obj0) << ", "
819  << l1GtObjectEnumToString(obj1) << "] = " << (*(m_pairNrPhiBinsVec.at(iPair)))
820  << std::endl;
821 
822  return *(m_pairNrPhiBinsVec.at(iPair));
823  }
824 
825  iPair++;
826  }
827 
828  return 0;
829 }
std::string l1GtObjectEnumToString(const L1GtObject &)
Definition: L1GtObject.cc:69
#define LogTrace(id)
std::vector< std::pair< L1GtObject, L1GtObject > > m_gtObjectPairVec
vector of all L1GtObject pairs
std::vector< const unsigned int * > m_pairNrPhiBinsVec

◆ gtObjectNrBinsPhi() [3/3]

const unsigned int L1GtEtaPhiConversions::gtObjectNrBinsPhi ( const unsigned int  pairIndex) const

return the number of phi bins for a pair of GT objects, according to conversion rules, when the index of the pair is used

Definition at line 831 of file L1GtEtaPhiConversions.cc.

References LogTrace, m_isDebugEnabled, m_pairNrPhiBinsVec, and m_verbosity.

831  {
832  if (m_verbosity && m_isDebugEnabled) {
833  LogTrace("L1GlobalTrigger") << "\n gtObjectNrBinsPhi for L1 GT object pair index " << pairIndex << " = "
834  << (*(m_pairNrPhiBinsVec.at(pairIndex))) << std::endl;
835  }
836 
837  return *(m_pairNrPhiBinsVec.at(pairIndex));
838 }
#define LogTrace(id)
int m_verbosity
verbosity level
std::vector< const unsigned int * > m_pairNrPhiBinsVec
bool m_isDebugEnabled
cached edm::isDebugEnabled()

◆ gtObjectPairIndex()

const unsigned int L1GtEtaPhiConversions::gtObjectPairIndex ( const L1GtObject obj0,
const L1GtObject obj1 
) const

return the index of a pair in the vector m_gtObjectPairVec, to be used to extract the number of phi bins, the conversion of the indices, etc

Definition at line 452 of file L1GtEtaPhiConversions.cc.

References l1GtObjectEnumToString(), LogTrace, m_gtObjectPairVec, and trackerHitRTTI::vector.

Referenced by L1GtCorrelationCondition::evaluateCondition().

452  {
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 }
std::string l1GtObjectEnumToString(const L1GtObject &)
Definition: L1GtObject.cc:69
#define LogTrace(id)
std::vector< std::pair< L1GtObject, L1GtObject > > m_gtObjectPairVec
vector of all L1GtObject pairs

◆ print()

void L1GtEtaPhiConversions::print ( std::ostream &  myCout) const
virtual

print all the performed conversions

Definition at line 1195 of file L1GtEtaPhiConversions.cc.

References badIndex, TauDecayModes::dec, L1CaloGeometry::emJetPhiBinHighEdge(), L1CaloGeometry::emJetPhiBinLowEdge(), L1CaloGeometry::etaBinCenter(), L1CaloGeometry::etSumPhiBinHighEdge(), L1CaloGeometry::etSumPhiBinLowEdge(), L1MuTriggerScales::getGMTEtaScale(), L1MuScale::getHighEdge(), L1MuScale::getLowEdge(), L1MuScale::getNBins(), L1MuTriggerScales::getPhiScale(), L1MuScale::getValue(), L1CaloGeometry::globalEtaBinLowEdge(), L1CaloGeometry::globalEtaIndex(), L1CaloGeometry::htSumPhiBinHighEdge(), L1CaloGeometry::htSumPhiBinLowEdge(), m_l1CaloGeometry, m_l1MuTriggerScales, m_lutEtaCentralToCommonCalo, m_lutEtaForJetToCommonCalo, m_lutEtaMuToCommonCalo, m_lutPhiEtmToHtm, m_lutPhiEtmToJetEg, m_lutPhiHtmToJetEg, m_lutPhiMuToEtm, m_lutPhiMuToHtm, m_lutPhiMuToJetEg, and rad2deg().

Referenced by L1GlobalTriggerGTL::run().

1195  {
1196  // force a page break before each group
1197  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1198 
1199  myCout << "\n---++Conversion tables for phi and eta variables of the trigger "
1200  "objects used in correlation conditions \n"
1201  << std::endl;
1202 
1203  //
1204  // phi conversions
1205  //
1206 
1207  // phi Mu -> (*Jet, EG)
1208 
1209  myCout << "\n---+++Phi conversion for muons to jets and e-gamma common phi "
1210  "scale \n"
1211  << std::endl;
1212 
1213  size_t lutPhiMuToJetEgSize = m_lutPhiMuToJetEg.size();
1214  myCout << "Size of look-up table = " << lutPhiMuToJetEgSize << "\n" << std::endl;
1215 
1216  myCout << "| *Initial Phi Hardware Index* "
1217  << "|| *Initial Phi Range* ||"
1218  << " *Converted Phi Hardware Index* "
1219  << "|| *Converted Phi Range* ||"
1220  << "\n"
1221  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1222 
1223  for (unsigned int indexToConv = 0; indexToConv < lutPhiMuToJetEgSize; ++indexToConv) {
1224  double lowEdgeToConv = m_l1MuTriggerScales->getPhiScale()->getLowEdge(indexToConv);
1225  double highEdgeToConv = m_l1MuTriggerScales->getPhiScale()->getHighEdge(indexToConv);
1226 
1227  unsigned int convIndex = m_lutPhiMuToJetEg[indexToConv];
1228 
1229  double convLowEdge = 0.;
1230  double convHighEdge = 0.;
1231 
1232  if (convIndex != badIndex) {
1233  convLowEdge = m_l1CaloGeometry->emJetPhiBinLowEdge(convIndex);
1234  convHighEdge = m_l1CaloGeometry->emJetPhiBinHighEdge(convIndex);
1235  } else {
1236  // badIndex means a bad initialIndex
1237  lowEdgeToConv = 0.;
1238  highEdgeToConv = 0.;
1239  }
1240 
1241  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv << " | " << std::dec << std::setw(3)
1242  << std::left << indexToConv << " |[ " << std::setw(10) << std::left << (rad2deg(lowEdgeToConv)) << ", |"
1243  << std::setw(10) << std::left << (rad2deg(highEdgeToConv)) << " ) | 0x" << std::setw(6) << std::hex
1244  << std::left << convIndex << " | " << std::dec << std::setw(6) << convIndex << " |[ " << std::setw(10)
1245  << std::left << (rad2deg(convLowEdge)) << ", |" << std::setw(10) << std::left << (rad2deg(convHighEdge))
1246  << " ) |" << std::right << std::endl;
1247  }
1248 
1249  // phi Mu -> ETM
1250 
1251  // force a page break before each group
1252  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1253 
1254  myCout << "\n---+++Phi conversion for muons to ETM phi scale \n" << std::endl;
1255 
1256  size_t lutPhiMuToEtmSize = m_lutPhiMuToEtm.size();
1257  myCout << "Size of look-up table = " << lutPhiMuToEtmSize << "\n" << std::endl;
1258 
1259  myCout << "| *Initial Phi Hardware Index* "
1260  << "|| *Initial Phi Range* ||"
1261  << " *Converted Phi Hardware Index* "
1262  << "|| *Converted Phi Range* ||"
1263  << "\n"
1264  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1265 
1266  for (unsigned int indexToConv = 0; indexToConv < lutPhiMuToEtmSize; ++indexToConv) {
1267  double lowEdgeToConv = m_l1MuTriggerScales->getPhiScale()->getLowEdge(indexToConv);
1268  double highEdgeToConv = m_l1MuTriggerScales->getPhiScale()->getHighEdge(indexToConv);
1269 
1270  unsigned int convIndex = m_lutPhiMuToEtm[indexToConv];
1271 
1272  double convLowEdge = 0.;
1273  double convHighEdge = 0.;
1274 
1275  if (convIndex != badIndex) {
1276  convLowEdge = m_l1CaloGeometry->etSumPhiBinLowEdge(convIndex);
1277  convHighEdge = m_l1CaloGeometry->etSumPhiBinHighEdge(convIndex);
1278  } else {
1279  // badIndex means a bad initialIndex
1280  lowEdgeToConv = 0.;
1281  highEdgeToConv = 0.;
1282  }
1283 
1284  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv << " | " << std::dec << std::setw(3)
1285  << std::left << indexToConv << " |[ " << std::setw(10) << std::left << (rad2deg(lowEdgeToConv)) << ", |"
1286  << std::setw(10) << std::left << (rad2deg(highEdgeToConv)) << " ) | 0x" << std::setw(6) << std::hex
1287  << std::left << convIndex << " | " << std::dec << std::setw(6) << convIndex << " |[ " << std::setw(10)
1288  << std::left << (rad2deg(convLowEdge)) << ", |" << std::setw(10) << std::left << (rad2deg(convHighEdge))
1289  << " ) |" << std::right << std::endl;
1290  }
1291 
1292  // phi Mu -> HTM
1293 
1294  // force a page break before each group
1295  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1296 
1297  myCout << "\n---+++Phi conversion for muons to HTM phi scale \n" << std::endl;
1298 
1299  size_t lutPhiMuToHtmSize = m_lutPhiMuToHtm.size();
1300  myCout << "Size of look-up table = " << lutPhiMuToHtmSize << "\n" << std::endl;
1301 
1302  myCout << "| *Initial Phi Hardware Index* "
1303  << "|| *Initial Phi Range* ||"
1304  << " *Converted Phi Hardware Index* "
1305  << "|| *Converted Phi Range* ||"
1306  << "\n"
1307  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1308 
1309  for (unsigned int indexToConv = 0; indexToConv < lutPhiMuToHtmSize; ++indexToConv) {
1310  double lowEdgeToConv = m_l1MuTriggerScales->getPhiScale()->getLowEdge(indexToConv);
1311  double highEdgeToConv = m_l1MuTriggerScales->getPhiScale()->getHighEdge(indexToConv);
1312 
1313  unsigned int convIndex = m_lutPhiMuToHtm[indexToConv];
1314 
1315  double convLowEdge = 0.;
1316  double convHighEdge = 0.;
1317 
1318  if (convIndex != badIndex) {
1319  convLowEdge = m_l1CaloGeometry->htSumPhiBinLowEdge(convIndex);
1320  convHighEdge = m_l1CaloGeometry->htSumPhiBinHighEdge(convIndex);
1321  } else {
1322  // badIndex means a bad initialIndex
1323  lowEdgeToConv = 0.;
1324  highEdgeToConv = 0.;
1325  }
1326 
1327  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv << " | " << std::dec << std::setw(3)
1328  << std::left << indexToConv << " |[ " << std::setw(10) << std::left << (rad2deg(lowEdgeToConv)) << ", |"
1329  << std::setw(10) << std::left << (rad2deg(highEdgeToConv)) << " ) | 0x" << std::setw(6) << std::hex
1330  << std::left << convIndex << " | " << std::dec << std::setw(6) << convIndex << " |[ " << std::setw(10)
1331  << std::left << (rad2deg(convLowEdge)) << ", |" << std::setw(10) << std::left << (rad2deg(convHighEdge))
1332  << " ) |" << std::right << std::endl;
1333  }
1334 
1335  // phi ETM -> (*Jet, EG)
1336 
1337  // force a page break before each group
1338  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1339 
1340  myCout << "\n---+++Phi conversion for ETM to jets and e-gamma scale common "
1341  "phi scale \n"
1342  << std::endl;
1343 
1344  size_t lutPhiEtmToJetEgSize = m_lutPhiEtmToJetEg.size();
1345  myCout << "Size of look-up table = " << lutPhiEtmToJetEgSize << "\n" << std::endl;
1346 
1347  myCout << "| *Initial Phi Hardware Index* "
1348  << "|| *Initial Phi Range* ||"
1349  << " *Converted Phi Hardware Index* "
1350  << "|| *Converted Phi Range* ||"
1351  << "\n"
1352  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1353 
1354  for (unsigned int indexToConv = 0; indexToConv < lutPhiEtmToJetEgSize; ++indexToConv) {
1355  double lowEdgeToConv = m_l1CaloGeometry->etSumPhiBinLowEdge(indexToConv);
1356  double highEdgeToConv = m_l1CaloGeometry->etSumPhiBinHighEdge(indexToConv);
1357 
1358  unsigned int convIndex = m_lutPhiEtmToJetEg[indexToConv];
1359 
1360  double convLowEdge = 0.;
1361  double convHighEdge = 0.;
1362 
1363  if (convIndex != badIndex) {
1364  convLowEdge = m_l1CaloGeometry->emJetPhiBinLowEdge(convIndex);
1365  convHighEdge = m_l1CaloGeometry->emJetPhiBinHighEdge(convIndex);
1366  } else {
1367  // badIndex means a bad initialIndex
1368  lowEdgeToConv = 0.;
1369  highEdgeToConv = 0.;
1370  }
1371 
1372  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv << " | " << std::dec << std::setw(3)
1373  << std::left << indexToConv << " |[ " << std::setw(10) << std::left << (rad2deg(lowEdgeToConv)) << ", |"
1374  << std::setw(10) << std::left << (rad2deg(highEdgeToConv)) << " ) | 0x" << std::setw(6) << std::hex
1375  << std::left << convIndex << " | " << std::dec << std::setw(6) << convIndex << " |[ " << std::setw(10)
1376  << std::left << (rad2deg(convLowEdge)) << ", |" << std::setw(10) << std::left << (rad2deg(convHighEdge))
1377  << " ) |" << std::right << std::endl;
1378  }
1379 
1380  // phi ETM -> HTM
1381 
1382  // force a page break before each group
1383  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1384 
1385  myCout << "\n---+++Phi conversion for ETM to HTM phi scale \n" << std::endl;
1386 
1387  size_t lutPhiEtmToHtmSize = m_lutPhiEtmToHtm.size();
1388  myCout << "Size of look-up table = " << lutPhiEtmToHtmSize << "\n" << std::endl;
1389 
1390  myCout << "| *Initial Phi Hardware Index* "
1391  << "|| *Initial Phi Range* ||"
1392  << " *Converted Phi Hardware Index* "
1393  << "|| *Converted Phi Range* ||"
1394  << "\n"
1395  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1396 
1397  for (unsigned int indexToConv = 0; indexToConv < lutPhiEtmToHtmSize; ++indexToConv) {
1398  double lowEdgeToConv = m_l1CaloGeometry->etSumPhiBinLowEdge(indexToConv);
1399  double highEdgeToConv = m_l1CaloGeometry->etSumPhiBinHighEdge(indexToConv);
1400 
1401  unsigned int convIndex = m_lutPhiEtmToHtm[indexToConv];
1402 
1403  double convLowEdge = 0.;
1404  double convHighEdge = 0.;
1405 
1406  if (convIndex != badIndex) {
1407  convLowEdge = m_l1CaloGeometry->htSumPhiBinLowEdge(convIndex);
1408  convHighEdge = m_l1CaloGeometry->htSumPhiBinHighEdge(convIndex);
1409  } else {
1410  // badIndex means a bad initialIndex
1411  lowEdgeToConv = 0.;
1412  highEdgeToConv = 0.;
1413  }
1414 
1415  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv << " | " << std::dec << std::setw(3)
1416  << std::left << indexToConv << " |[ " << std::setw(10) << std::left << (rad2deg(lowEdgeToConv)) << ", |"
1417  << std::setw(10) << std::left << (rad2deg(highEdgeToConv)) << " ) | 0x" << std::setw(6) << std::hex
1418  << std::left << convIndex << " | " << std::dec << std::setw(6) << convIndex << " |[ " << std::setw(10)
1419  << std::left << (rad2deg(convLowEdge)) << ", |" << std::setw(10) << std::left << (rad2deg(convHighEdge))
1420  << " ) |" << std::right << std::endl;
1421  }
1422 
1423  // phi HTM -> (*Jet, EG)
1424 
1425  // force a page break before each group
1426  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1427 
1428  myCout << "\n---+++Phi conversion for HTM to jets and e-gamma scale common "
1429  "phi scale \n"
1430  << std::endl;
1431 
1432  size_t lutPhiHtmToJetEgSize = m_lutPhiHtmToJetEg.size();
1433  myCout << "Size of look-up table = " << lutPhiHtmToJetEgSize << "\n" << std::endl;
1434 
1435  myCout << "| *Initial Phi Hardware Index* "
1436  << "|| *Initial Phi Range* ||"
1437  << " *Converted Phi Hardware Index* "
1438  << "|| *Converted Phi Range* ||"
1439  << "\n"
1440  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1441 
1442  for (unsigned int indexToConv = 0; indexToConv < lutPhiHtmToJetEgSize; ++indexToConv) {
1443  double lowEdgeToConv = m_l1CaloGeometry->htSumPhiBinLowEdge(indexToConv);
1444  double highEdgeToConv = m_l1CaloGeometry->htSumPhiBinHighEdge(indexToConv);
1445 
1446  unsigned int convIndex = m_lutPhiHtmToJetEg[indexToConv];
1447 
1448  double convLowEdge = 0.;
1449  double convHighEdge = 0.;
1450 
1451  if (convIndex != badIndex) {
1452  convLowEdge = m_l1CaloGeometry->emJetPhiBinLowEdge(convIndex);
1453  convHighEdge = m_l1CaloGeometry->emJetPhiBinHighEdge(convIndex);
1454  } else {
1455  // badIndex means a bad initialIndex
1456  lowEdgeToConv = 0.;
1457  highEdgeToConv = 0.;
1458  }
1459 
1460  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv << " | " << std::dec << std::setw(3)
1461  << std::left << indexToConv << " |[ " << std::setw(10) << std::left << (rad2deg(lowEdgeToConv)) << ", |"
1462  << std::setw(10) << std::left << (rad2deg(highEdgeToConv)) << " ) | 0x" << std::setw(6) << std::hex
1463  << std::left << convIndex << " | " << std::dec << std::setw(6) << convIndex << " |[ " << std::setw(10)
1464  << std::left << (rad2deg(convLowEdge)) << ", |" << std::setw(10) << std::left << (rad2deg(convHighEdge))
1465  << " ) |" << std::right << std::endl;
1466  }
1467 
1468  //
1469  // eta conversions
1470  //
1471 
1472  // CenJet/TauJet & IsoEG/NoIsoEG to a common central / forward calorimeter eta
1473  // scale
1474 
1475  // force a page break before each group
1476  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1477 
1478  myCout << "\n---+++Eta conversion for central and tau jets and e-gamma "
1479  "objects to a common central and forward calorimeter eta scale \n"
1480  << std::endl;
1481 
1482  size_t lutEtaCentralToCommonCaloSize = m_lutEtaCentralToCommonCalo.size();
1483  myCout << "Size of look-up table = " << lutEtaCentralToCommonCaloSize << "\n" << std::endl;
1484 
1485  myCout << "| *Initial Eta Hardware Index* "
1486  << "|| *Initial Eta Range* ||"
1487  << " *Converted Eta Hardware Index* "
1488  << "|| *Converted Eta Range* ||"
1489  << "\n"
1490  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1491 
1492  for (unsigned int indexToConv = 0; indexToConv < lutEtaCentralToCommonCaloSize; ++indexToConv) {
1493  double lowEdgeToConv = m_l1CaloGeometry->globalEtaBinLowEdge(
1495  double highEdgeToConv = m_l1CaloGeometry->globalEtaBinLowEdge(
1496  m_l1CaloGeometry->globalEtaIndex(m_l1CaloGeometry->etaBinCenter(indexToConv, true)) + 1);
1497 
1498  unsigned int convIndex = m_lutEtaCentralToCommonCalo[indexToConv];
1499 
1500  double convLowEdge = 0.;
1501  double convHighEdge = 0.;
1502 
1503  if (convIndex != badIndex) {
1504  convLowEdge = m_l1CaloGeometry->globalEtaBinLowEdge(convIndex);
1505  convHighEdge = m_l1CaloGeometry->globalEtaBinLowEdge(convIndex + 1);
1506  } else {
1507  // badIndex means a bad initialIndex
1508  lowEdgeToConv = 0.;
1509  highEdgeToConv = 0.;
1510  }
1511 
1512  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv << " | " << std::dec << std::setw(3)
1513  << std::left << indexToConv << " |[ " << std::setw(10) << std::left << lowEdgeToConv << ", |"
1514  << std::setw(10) << std::left << highEdgeToConv << " ) | 0x" << std::setw(6) << std::hex << std::left
1515  << convIndex << " | " << std::dec << std::setw(6) << convIndex << " |[ " << std::setw(10) << std::left
1516  << convLowEdge << ", |" << std::setw(10) << std::left << convHighEdge << " ) |" << std::right << std::endl;
1517  }
1518 
1519  // ForJet to a common central / forward calorimeter eta scale
1520 
1521  // force a page break before each group
1522  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1523 
1524  myCout << "\n---+++Eta conversion for forward jets to a common central and "
1525  "forward calorimeter eta scale \n"
1526  << std::endl;
1527 
1528  size_t lutEtaForJetToCommonCaloSize = m_lutEtaForJetToCommonCalo.size();
1529  myCout << "Size of look-up table = " << lutEtaForJetToCommonCaloSize << "\n" << std::endl;
1530 
1531  myCout << "| *Initial Eta Hardware Index* "
1532  << "|| *Initial Eta Range* ||"
1533  << " *Converted Eta Hardware Index* "
1534  << "|| *Converted Eta Range* ||"
1535  << "\n"
1536  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1537 
1538  for (unsigned int indexToConv = 0; indexToConv < lutEtaForJetToCommonCaloSize; ++indexToConv) {
1539  double lowEdgeToConv = m_l1CaloGeometry->globalEtaBinLowEdge(
1541  double highEdgeToConv = m_l1CaloGeometry->globalEtaBinLowEdge(
1542  m_l1CaloGeometry->globalEtaIndex(m_l1CaloGeometry->etaBinCenter(indexToConv, false)) + 1);
1543 
1544  unsigned int convIndex = m_lutEtaForJetToCommonCalo[indexToConv];
1545 
1546  double convLowEdge = 0.;
1547  double convHighEdge = 0.;
1548 
1549  if (convIndex != badIndex) {
1550  convLowEdge = m_l1CaloGeometry->globalEtaBinLowEdge(convIndex);
1551  convHighEdge = m_l1CaloGeometry->globalEtaBinLowEdge(convIndex + 1);
1552  } else {
1553  // badIndex means a bad initialIndex
1554  lowEdgeToConv = 0.;
1555  highEdgeToConv = 0.;
1556  }
1557 
1558  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv << " | " << std::dec << std::setw(3)
1559  << std::left << indexToConv << " |[ " << std::setw(10) << std::left << lowEdgeToConv << ", |"
1560  << std::setw(10) << std::left << highEdgeToConv << " ) | 0x" << std::setw(6) << std::hex << std::left
1561  << convIndex << " | " << std::dec << std::setw(6) << convIndex << " |[ " << std::setw(10) << std::left
1562  << convLowEdge << ", |" << std::setw(10) << std::left << convHighEdge << " ) |" << std::right << std::endl;
1563  }
1564 
1565  // Mu to a common central / forward calorimeter eta scale
1566 
1567  // force a page break before each group
1568  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1569 
1570  myCout << "\n---+++Eta conversion for muons to a common central and forward "
1571  "calorimeter eta scale \n"
1572  << std::endl;
1573 
1574  size_t lutEtaMuToCommonCaloSize = m_lutEtaMuToCommonCalo.size();
1575  myCout << "Size of look-up table = " << lutEtaMuToCommonCaloSize << "\n" << std::endl;
1576 
1577  unsigned int nrBinsEtaMuPerHalf = m_l1MuTriggerScales->getGMTEtaScale()->getNBins();
1578 
1579  myCout << "| *Initial Eta Hardware Index* "
1580  << "|| *Initial Eta Range* ||"
1581  << " *Converted Eta Hardware Index* "
1582  << "|| *Converted Eta Range* ||"
1583  << "\n"
1584  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1585 
1586  for (unsigned int indexToConv = 0; indexToConv < lutEtaMuToCommonCaloSize; ++indexToConv) {
1587  // Mu scale defined for positive values only, need to be symmetrized
1588  unsigned int iBinOffset = 0;
1589  double etaSign = 1.;
1590 
1591  if (indexToConv > nrBinsEtaMuPerHalf) {
1592  iBinOffset = nrBinsEtaMuPerHalf + 1;
1593  etaSign = -1.;
1594  }
1595 
1596  double lowEdgeToConv = etaSign * m_l1MuTriggerScales->getGMTEtaScale()->getValue(indexToConv - iBinOffset);
1597  double highEdgeToConv = etaSign * m_l1MuTriggerScales->getGMTEtaScale()->getValue(indexToConv + 1 - iBinOffset);
1598 
1599  unsigned int convIndex = m_lutEtaMuToCommonCalo[indexToConv];
1600 
1601  double convLowEdge = 0.;
1602  double convHighEdge = 0.;
1603 
1604  if (convIndex != badIndex) {
1605  convLowEdge = m_l1CaloGeometry->globalEtaBinLowEdge(convIndex);
1606  convHighEdge = m_l1CaloGeometry->globalEtaBinLowEdge(convIndex + 1);
1607  } else {
1608  // badIndex means a bad initialIndex
1609  lowEdgeToConv = 0.;
1610  highEdgeToConv = 0.;
1611  }
1612 
1613  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv << " | " << std::dec << std::setw(3)
1614  << std::left << indexToConv << " |[ " << std::setw(10) << std::left << lowEdgeToConv << ", |"
1615  << std::setw(10) << std::left << highEdgeToConv << " ) | 0x" << std::setw(6) << std::hex << std::left
1616  << convIndex << " | " << std::dec << std::setw(6) << convIndex << " |[ " << std::setw(10) << std::left
1617  << convLowEdge << ", |" << std::setw(10) << std::left << convHighEdge << " ) |" << std::right << std::endl;
1618  }
1619 }
const L1CaloGeometry * m_l1CaloGeometry
pointer to calorimetry scales - updated in convertl1Scales method
const L1MuScale * getGMTEtaScale() const
get the GMT eta scale
double emJetPhiBinHighEdge(unsigned int phiIndex) const
std::vector< unsigned int > m_lutEtaCentralToCommonCalo
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
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::vector< unsigned int > m_lutEtaForJetToCommonCalo
virtual float getHighEdge(unsigned packed) const =0
get the upper edge of bin represented by packed
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
double etSumPhiBinLowEdge(unsigned int phiIndex) const
static const unsigned int badIndex
unsigned int globalEtaIndex(const double &etaValue) const
double globalEtaBinLowEdge(unsigned int globalEtaIndex) const
std::vector< unsigned int > m_lutPhiMuToJetEg
phi conversion for Mu to (*Jet, EG)
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
std::vector< unsigned int > m_lutPhiEtmToHtm
phi conversion for ETM to HTM
double etaBinCenter(unsigned int etaIndex, bool central=true) 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

◆ rad2deg()

const double L1GtEtaPhiConversions::rad2deg ( const double &  phiRad) const
private

convert phi from rad (-pi, pi] to deg (0, 360)

Definition at line 1622 of file L1GtEtaPhiConversions.cc.

References PiConversion.

Referenced by print().

1622  {
1623  if (phiRad < 0.) {
1624  return (phiRad * PiConversion) + 360.;
1625  } else {
1626  return (phiRad * PiConversion);
1627  }
1628 }
static const double PiConversion

◆ setVerbosity()

void L1GtEtaPhiConversions::setVerbosity ( const int  verbosity)
inline

Definition at line 78 of file L1GtEtaPhiConversions.h.

References m_verbosity, and verbosity.

Referenced by L1GlobalTriggerGTL::L1GlobalTriggerGTL(), and L1GlobalTriggerGTL::run().

int m_verbosity
verbosity level
const int verbosity

Member Data Documentation

◆ badIndex

const unsigned int L1GtEtaPhiConversions::badIndex = 999999
staticprivate

a bad index value, treated specially when performing the conversions or printing the conversion vectors

Definition at line 86 of file L1GtEtaPhiConversions.h.

Referenced by convertEtaIndex(), convertL1Scales(), convertPhiIndex(), and print().

◆ m_gtObjectPairVec

std::vector<std::pair<L1GtObject, L1GtObject> > L1GtEtaPhiConversions::m_gtObjectPairVec
private

vector of all L1GtObject pairs

Definition at line 96 of file L1GtEtaPhiConversions.h.

Referenced by gtObjectNrBinsPhi(), gtObjectPairIndex(), and L1GtEtaPhiConversions().

◆ m_isDebugEnabled

bool L1GtEtaPhiConversions::m_isDebugEnabled
private

◆ m_l1CaloGeometry

const L1CaloGeometry* L1GtEtaPhiConversions::m_l1CaloGeometry
private

pointer to calorimetry scales - updated in convertl1Scales method

Definition at line 118 of file L1GtEtaPhiConversions.h.

Referenced by convertL1Scales(), and print().

◆ m_l1MuTriggerScales

const L1MuTriggerScales* L1GtEtaPhiConversions::m_l1MuTriggerScales
private

pointer to muon scales - updated in convertl1Scales method

Definition at line 121 of file L1GtEtaPhiConversions.h.

Referenced by convertL1Scales(), and print().

◆ m_lutEtaCentralToCommonCalo

std::vector<unsigned int> L1GtEtaPhiConversions::m_lutEtaCentralToCommonCalo
private

eta conversion of CenJet/TauJet & IsoEG/NoIsoEG to a common calorimeter eta scale

Definition at line 166 of file L1GtEtaPhiConversions.h.

Referenced by convertEtaIndex(), convertL1Scales(), and print().

◆ m_lutEtaForJetToCommonCalo

std::vector<unsigned int> L1GtEtaPhiConversions::m_lutEtaForJetToCommonCalo
private

eta conversion of ForJet to the common calorimeter eta scale defined before

Definition at line 170 of file L1GtEtaPhiConversions.h.

Referenced by convertEtaIndex(), convertL1Scales(), and print().

◆ m_lutEtaMuToCommonCalo

std::vector<unsigned int> L1GtEtaPhiConversions::m_lutEtaMuToCommonCalo
private

eta conversion of Mu to the common calorimeter eta scale defined before

Definition at line 173 of file L1GtEtaPhiConversions.h.

Referenced by convertEtaIndex(), convertL1Scales(), and print().

◆ m_lutPhiEtmToHtm

std::vector<unsigned int> L1GtEtaPhiConversions::m_lutPhiEtmToHtm
private

phi conversion for ETM to HTM

Definition at line 153 of file L1GtEtaPhiConversions.h.

Referenced by convertL1Scales(), L1GtEtaPhiConversions(), and print().

◆ m_lutPhiEtmToJetEg

std::vector<unsigned int> L1GtEtaPhiConversions::m_lutPhiEtmToJetEg
private

phi conversion for ETM to (*Jet, EG)

Definition at line 150 of file L1GtEtaPhiConversions.h.

Referenced by convertL1Scales(), L1GtEtaPhiConversions(), and print().

◆ m_lutPhiHtmToJetEg

std::vector<unsigned int> L1GtEtaPhiConversions::m_lutPhiHtmToJetEg
private

phi conversion for HTM to (*Jet, EG)

Definition at line 156 of file L1GtEtaPhiConversions.h.

Referenced by convertL1Scales(), L1GtEtaPhiConversions(), and print().

◆ m_lutPhiJetEgToJetEg

std::vector<unsigned int> L1GtEtaPhiConversions::m_lutPhiJetEgToJetEg
private

phi conversion for (*Jet, EG) to (*Jet, EG) return the same index as the input index, introduced only to simplify convertPhiIndex

Definition at line 161 of file L1GtEtaPhiConversions.h.

Referenced by convertL1Scales(), and L1GtEtaPhiConversions().

◆ m_lutPhiMuToEtm

std::vector<unsigned int> L1GtEtaPhiConversions::m_lutPhiMuToEtm
private

phi conversion for Mu to ETM

Definition at line 144 of file L1GtEtaPhiConversions.h.

Referenced by convertL1Scales(), L1GtEtaPhiConversions(), and print().

◆ m_lutPhiMuToHtm

std::vector<unsigned int> L1GtEtaPhiConversions::m_lutPhiMuToHtm
private

phi conversion for Mu to HTM

Definition at line 147 of file L1GtEtaPhiConversions.h.

Referenced by convertL1Scales(), L1GtEtaPhiConversions(), and print().

◆ m_lutPhiMuToJetEg

std::vector<unsigned int> L1GtEtaPhiConversions::m_lutPhiMuToJetEg
private

phi conversion for Mu to (*Jet, EG)

Definition at line 141 of file L1GtEtaPhiConversions.h.

Referenced by convertL1Scales(), L1GtEtaPhiConversions(), and print().

◆ m_nrBinsEtaCommon

unsigned int L1GtEtaPhiConversions::m_nrBinsEtaCommon
private

number of eta bins for common scale

Definition at line 137 of file L1GtEtaPhiConversions.h.

Referenced by convertL1Scales().

◆ m_nrBinsPhiEtm

unsigned int L1GtEtaPhiConversions::m_nrBinsPhiEtm
private

number of phi bins for ETM

Definition at line 131 of file L1GtEtaPhiConversions.h.

Referenced by convertL1Scales(), gtObjectNrBinsPhi(), and L1GtEtaPhiConversions().

◆ m_nrBinsPhiHtm

unsigned int L1GtEtaPhiConversions::m_nrBinsPhiHtm
private

number of phi bins for HTM

Definition at line 134 of file L1GtEtaPhiConversions.h.

Referenced by convertL1Scales(), gtObjectNrBinsPhi(), and L1GtEtaPhiConversions().

◆ m_nrBinsPhiJetEg

unsigned int L1GtEtaPhiConversions::m_nrBinsPhiJetEg
private

number of phi bins for calorimeter objects (*Jet, *EG)

Definition at line 128 of file L1GtEtaPhiConversions.h.

Referenced by convertL1Scales(), gtObjectNrBinsPhi(), and L1GtEtaPhiConversions().

◆ m_nrBinsPhiMu

unsigned int L1GtEtaPhiConversions::m_nrBinsPhiMu
private

number of phi bins for muons

Definition at line 125 of file L1GtEtaPhiConversions.h.

Referenced by convertL1Scales(), and gtObjectNrBinsPhi().

◆ m_pairConvertPhiFirstGtObject

std::vector<bool> L1GtEtaPhiConversions::m_pairConvertPhiFirstGtObject
private

decide which object to convert: if m_pairConvertPhiFirstGtObject true, convert pair.first and do not convert pair.second if m_pairConvertPhiFirstGtObject false, do not convert pair.first and convert pair.second

Definition at line 102 of file L1GtEtaPhiConversions.h.

Referenced by convertPhiIndex(), and L1GtEtaPhiConversions().

◆ m_pairNrPhiBinsVec

std::vector<const unsigned int *> L1GtEtaPhiConversions::m_pairNrPhiBinsVec
private

number of phi bins for each L1GtObject pair in the scale used for that pair it is filled correlated with m_gtObjectPairVec, so the index of the pair in m_gtObjectPairVec is the index of the m_pairNrPhiBinsVec element containing the number of phi bins

Definition at line 108 of file L1GtEtaPhiConversions.h.

Referenced by gtObjectNrBinsPhi(), and L1GtEtaPhiConversions().

◆ m_pairPhiConvVec

std::vector<const std::vector<unsigned int> *> L1GtEtaPhiConversions::m_pairPhiConvVec
private

constant references to conversion LUT for a given L1GtObject pair it is filled correlated with m_gtObjectPairVec, so the index of the pair in m_gtObjectPairVec is the index of the m_pairPhiConvVec element containing the reference

Definition at line 114 of file L1GtEtaPhiConversions.h.

Referenced by convertPhiIndex(), and L1GtEtaPhiConversions().

◆ m_verbosity

int L1GtEtaPhiConversions::m_verbosity
private

verbosity level

Definition at line 177 of file L1GtEtaPhiConversions.h.

Referenced by convertEtaIndex(), convertL1Scales(), convertPhiIndex(), gtObjectNrBinsPhi(), and setVerbosity().

◆ PiConversion

const double L1GtEtaPhiConversions::PiConversion = 180. / acos(-1.)
staticprivate

Definition at line 89 of file L1GtEtaPhiConversions.h.

Referenced by rad2deg().