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 ( )

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, and TauJet.

42 
43  // prepare the pairs of L1GtObjects, reserve (by hand) memory for vectors
44  // the index of the pair in m_gtObjectPairVec is used to extract
45  // the information from the other vectors, so the push_back must be done
46  // coherently
47 
48  std::pair<L1GtObject, L1GtObject> gtObjPair;
49  m_gtObjectPairVec.reserve(56);
51  m_pairNrPhiBinsVec.reserve(56);
52  m_pairPhiConvVec.reserve(56);
53 
54  // Mu -> Jet & EG & ETM & HTM
55  //
56  gtObjPair = std::make_pair(Mu, CenJet);
57  m_gtObjectPairVec.push_back(gtObjPair);
58  m_pairConvertPhiFirstGtObject.push_back(true);
61 
62  gtObjPair = std::make_pair(CenJet, Mu);
63  m_gtObjectPairVec.push_back(gtObjPair);
64  m_pairConvertPhiFirstGtObject.push_back(false);
67 
68  //
69  gtObjPair = std::make_pair(Mu, ForJet);
70  m_gtObjectPairVec.push_back(gtObjPair);
71  m_pairConvertPhiFirstGtObject.push_back(true);
74 
75  gtObjPair = std::make_pair(ForJet, Mu);
76  m_gtObjectPairVec.push_back(gtObjPair);
77  m_pairConvertPhiFirstGtObject.push_back(false);
80 
81  //
82  gtObjPair = std::make_pair(Mu, TauJet);
83  m_gtObjectPairVec.push_back(gtObjPair);
84  m_pairConvertPhiFirstGtObject.push_back(true);
87 
88  gtObjPair = std::make_pair(TauJet, Mu);
89  m_gtObjectPairVec.push_back(gtObjPair);
90  m_pairConvertPhiFirstGtObject.push_back(false);
93 
94  //
95  gtObjPair = std::make_pair(Mu, NoIsoEG);
96  m_gtObjectPairVec.push_back(gtObjPair);
97  m_pairConvertPhiFirstGtObject.push_back(true);
100 
101  gtObjPair = std::make_pair(NoIsoEG, Mu);
102  m_gtObjectPairVec.push_back(gtObjPair);
103  m_pairConvertPhiFirstGtObject.push_back(false);
106 
107  //
108  gtObjPair = std::make_pair(Mu, IsoEG);
109  m_gtObjectPairVec.push_back(gtObjPair);
110  m_pairConvertPhiFirstGtObject.push_back(true);
113 
114  gtObjPair = std::make_pair(IsoEG, Mu);
115  m_gtObjectPairVec.push_back(gtObjPair);
116  m_pairConvertPhiFirstGtObject.push_back(false);
119 
120  //
121  gtObjPair = std::make_pair(Mu, ETM);
122  m_gtObjectPairVec.push_back(gtObjPair);
123  m_pairConvertPhiFirstGtObject.push_back(true);
125  m_pairPhiConvVec.push_back(&m_lutPhiMuToEtm);
126 
127  gtObjPair = std::make_pair(ETM, Mu);
128  m_gtObjectPairVec.push_back(gtObjPair);
129  m_pairConvertPhiFirstGtObject.push_back(false);
131  m_pairPhiConvVec.push_back(&m_lutPhiMuToEtm);
132 
133  //
134  gtObjPair = std::make_pair(Mu, HTM);
135  m_gtObjectPairVec.push_back(gtObjPair);
136  m_pairConvertPhiFirstGtObject.push_back(true);
138  m_pairPhiConvVec.push_back(&m_lutPhiMuToHtm);
139 
140  gtObjPair = std::make_pair(HTM, Mu);
141  m_gtObjectPairVec.push_back(gtObjPair);
142  m_pairConvertPhiFirstGtObject.push_back(false);
144  m_pairPhiConvVec.push_back(&m_lutPhiMuToHtm);
145 
146  // ETM -> Jet & EG
147  //
148  gtObjPair = std::make_pair(ETM, CenJet);
149  m_gtObjectPairVec.push_back(gtObjPair);
150  m_pairConvertPhiFirstGtObject.push_back(true);
153 
154  gtObjPair = std::make_pair(CenJet, ETM);
155  m_gtObjectPairVec.push_back(gtObjPair);
156  m_pairConvertPhiFirstGtObject.push_back(false);
159 
160  //
161  gtObjPair = std::make_pair(ETM, ForJet);
162  m_gtObjectPairVec.push_back(gtObjPair);
163  m_pairConvertPhiFirstGtObject.push_back(true);
166 
167  gtObjPair = std::make_pair(ForJet, ETM);
168  m_gtObjectPairVec.push_back(gtObjPair);
169  m_pairConvertPhiFirstGtObject.push_back(false);
172 
173  //
174  gtObjPair = std::make_pair(ETM, TauJet);
175  m_gtObjectPairVec.push_back(gtObjPair);
176  m_pairConvertPhiFirstGtObject.push_back(true);
179 
180  gtObjPair = std::make_pair(TauJet, ETM);
181  m_gtObjectPairVec.push_back(gtObjPair);
182  m_pairConvertPhiFirstGtObject.push_back(false);
185 
186  //
187  gtObjPair = std::make_pair(ETM, NoIsoEG);
188  m_gtObjectPairVec.push_back(gtObjPair);
189  m_pairConvertPhiFirstGtObject.push_back(true);
192 
193  gtObjPair = std::make_pair(NoIsoEG, ETM);
194  m_gtObjectPairVec.push_back(gtObjPair);
195  m_pairConvertPhiFirstGtObject.push_back(false);
198 
199  //
200  gtObjPair = std::make_pair(ETM, IsoEG);
201  m_gtObjectPairVec.push_back(gtObjPair);
202  m_pairConvertPhiFirstGtObject.push_back(true);
205 
206  gtObjPair = std::make_pair(IsoEG, ETM);
207  m_gtObjectPairVec.push_back(gtObjPair);
208  m_pairConvertPhiFirstGtObject.push_back(false);
211 
212  // HTM -> Jet & EG
213  //
214  gtObjPair = std::make_pair(HTM, CenJet);
215  m_gtObjectPairVec.push_back(gtObjPair);
216  m_pairConvertPhiFirstGtObject.push_back(true);
219 
220  gtObjPair = std::make_pair(CenJet, HTM);
221  m_gtObjectPairVec.push_back(gtObjPair);
222  m_pairConvertPhiFirstGtObject.push_back(false);
225 
226  //
227  gtObjPair = std::make_pair(HTM, ForJet);
228  m_gtObjectPairVec.push_back(gtObjPair);
229  m_pairConvertPhiFirstGtObject.push_back(true);
232 
233  gtObjPair = std::make_pair(ForJet, HTM);
234  m_gtObjectPairVec.push_back(gtObjPair);
235  m_pairConvertPhiFirstGtObject.push_back(false);
238 
239  //
240  gtObjPair = std::make_pair(HTM, TauJet);
241  m_gtObjectPairVec.push_back(gtObjPair);
242  m_pairConvertPhiFirstGtObject.push_back(true);
245 
246  gtObjPair = std::make_pair(TauJet, HTM);
247  m_gtObjectPairVec.push_back(gtObjPair);
248  m_pairConvertPhiFirstGtObject.push_back(false);
251 
252  //
253  gtObjPair = std::make_pair(HTM, NoIsoEG);
254  m_gtObjectPairVec.push_back(gtObjPair);
256  m_pairConvertPhiFirstGtObject.push_back(true);
258 
259  gtObjPair = std::make_pair(NoIsoEG, HTM);
260  m_gtObjectPairVec.push_back(gtObjPair);
261  m_pairConvertPhiFirstGtObject.push_back(false);
264 
265  //
266  gtObjPair = std::make_pair(HTM, IsoEG);
267  m_gtObjectPairVec.push_back(gtObjPair);
268  m_pairConvertPhiFirstGtObject.push_back(true);
271 
272  gtObjPair = std::make_pair(IsoEG, HTM);
273  m_gtObjectPairVec.push_back(gtObjPair);
274  m_pairConvertPhiFirstGtObject.push_back(false);
277 
278  // ETM -> HTM
279  //
280  gtObjPair = std::make_pair(ETM, HTM);
281  m_gtObjectPairVec.push_back(gtObjPair);
282  m_pairConvertPhiFirstGtObject.push_back(true);
285 
286  gtObjPair = std::make_pair(HTM, ETM);
287  m_gtObjectPairVec.push_back(gtObjPair);
288  m_pairConvertPhiFirstGtObject.push_back(false);
291 
292  // Jet & EG -> Jet & EG
293  //
294  gtObjPair = std::make_pair(CenJet, ForJet);
295  m_gtObjectPairVec.push_back(gtObjPair);
296  m_pairConvertPhiFirstGtObject.push_back(true);
299 
300  gtObjPair = std::make_pair(ForJet, CenJet);
301  m_gtObjectPairVec.push_back(gtObjPair);
302  m_pairConvertPhiFirstGtObject.push_back(false);
305 
306  //
307  gtObjPair = std::make_pair(CenJet, TauJet);
308  m_gtObjectPairVec.push_back(gtObjPair);
309  m_pairConvertPhiFirstGtObject.push_back(true);
312 
313  gtObjPair = std::make_pair(TauJet, CenJet);
314  m_gtObjectPairVec.push_back(gtObjPair);
315  m_pairConvertPhiFirstGtObject.push_back(false);
318 
319  //
320  gtObjPair = std::make_pair(CenJet, NoIsoEG);
321  m_gtObjectPairVec.push_back(gtObjPair);
322  m_pairConvertPhiFirstGtObject.push_back(true);
325 
326  gtObjPair = std::make_pair(NoIsoEG, CenJet);
327  m_gtObjectPairVec.push_back(gtObjPair);
328  m_pairConvertPhiFirstGtObject.push_back(false);
331 
332  //
333  gtObjPair = std::make_pair(CenJet, IsoEG);
334  m_gtObjectPairVec.push_back(gtObjPair);
335  m_pairConvertPhiFirstGtObject.push_back(true);
338 
339  gtObjPair = std::make_pair(IsoEG, CenJet);
340  m_gtObjectPairVec.push_back(gtObjPair);
341  m_pairConvertPhiFirstGtObject.push_back(false);
344 
345  //
346  gtObjPair = std::make_pair(ForJet, TauJet);
347  m_gtObjectPairVec.push_back(gtObjPair);
348  m_pairConvertPhiFirstGtObject.push_back(true);
351 
352  gtObjPair = std::make_pair(TauJet, ForJet);
353  m_gtObjectPairVec.push_back(gtObjPair);
354  m_pairConvertPhiFirstGtObject.push_back(false);
357 
358  //
359  gtObjPair = std::make_pair(ForJet, NoIsoEG);
360  m_gtObjectPairVec.push_back(gtObjPair);
361  m_pairConvertPhiFirstGtObject.push_back(true);
364 
365  gtObjPair = std::make_pair(NoIsoEG, ForJet);
366  m_gtObjectPairVec.push_back(gtObjPair);
367  m_pairConvertPhiFirstGtObject.push_back(false);
370 
371  //
372  gtObjPair = std::make_pair(ForJet, IsoEG);
373  m_gtObjectPairVec.push_back(gtObjPair);
374  m_pairConvertPhiFirstGtObject.push_back(true);
377 
378  gtObjPair = std::make_pair(IsoEG, ForJet);
379  m_gtObjectPairVec.push_back(gtObjPair);
380  m_pairConvertPhiFirstGtObject.push_back(false);
383 
384  //
385  gtObjPair = std::make_pair(TauJet, NoIsoEG);
386  m_gtObjectPairVec.push_back(gtObjPair);
387  m_pairConvertPhiFirstGtObject.push_back(true);
390 
391  gtObjPair = std::make_pair(NoIsoEG, TauJet);
392  m_gtObjectPairVec.push_back(gtObjPair);
393  m_pairConvertPhiFirstGtObject.push_back(false);
396 
397  //
398  gtObjPair = std::make_pair(TauJet, IsoEG);
399  m_gtObjectPairVec.push_back(gtObjPair);
400  m_pairConvertPhiFirstGtObject.push_back(true);
403 
404  gtObjPair = std::make_pair(IsoEG, TauJet);
405  m_gtObjectPairVec.push_back(gtObjPair);
406  m_pairConvertPhiFirstGtObject.push_back(false);
409 
410  //
411  gtObjPair = std::make_pair(NoIsoEG, IsoEG);
412  m_gtObjectPairVec.push_back(gtObjPair);
413  m_pairConvertPhiFirstGtObject.push_back(true);
416 
417  gtObjPair = std::make_pair(IsoEG, NoIsoEG);
418  m_gtObjectPairVec.push_back(gtObjPair);
419  m_pairConvertPhiFirstGtObject.push_back(false);
422 
423  // m_verbosity can not be used here, as L1GtEtaPhiConversions is called
424  // in L1GlobalTriggerGTL constructor, where m_verbosity is not yet set
425  if (m_isDebugEnabled) {
426  LogTrace("L1GlobalTrigger")
427  << "\nm_gtObjectPairVec size: " << (m_gtObjectPairVec.size())
428  << std::endl;
429 
430  unsigned int iPair = 0;
431 
432  for (std::vector<std::pair<L1GtObject, L1GtObject>>::const_iterator cIter =
433  m_gtObjectPairVec.begin();
434  cIter != m_gtObjectPairVec.end(); ++cIter) {
435  LogTrace("L1GlobalTrigger")
436  << "m_gtObjectPairVec vector element ["
437  << l1GtObjectEnumToString((*cIter).first) << ", "
438  << l1GtObjectEnumToString((*cIter).second)
439  << "], \t\tpair index = " << iPair << std::endl;
440 
441  iPair++;
442  }
443  }
444 }
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:39
std::vector< bool > m_pairConvertPhiFirstGtObject
Definition: L1GtObject.h:36
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:74
std::vector< unsigned int > m_lutPhiMuToEtm
phi conversion for Mu to ETM
int m_verbosity
verbosity level
#define LogTrace(id)
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:30
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 ( )
virtual

destructor

Definition at line 447 of file L1GtEtaPhiConversions.cc.

447  {
448 
449  // do nothing
450 }

Member Function Documentation

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 628 of file L1GtEtaPhiConversions.cc.

References badIndex, BPTX, 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().

630  {
631 
632  unsigned int newIndex = badIndex;
633  bool conversionStatus = false;
634 
635  switch (gtObject) {
636 
637  case Mu: {
638 
639  // check if initial index is within the scale size
640  // could be outside the scale size if there are hardware errors
641  // or wrong scale conversions
642  if (initialIndex >= m_lutEtaMuToCommonCalo.size()) {
643 
644  conversionStatus = false;
645 
646  if (m_verbosity && m_isDebugEnabled) {
647  LogTrace("L1GlobalTrigger")
648  << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
649  << " has initial eta index " << initialIndex
650  << " >= " << (m_lutEtaMuToCommonCalo.size())
651  << " scale size. Conversion failed." << std::endl;
652  }
653  } else {
654 
655  // convert the index
656  newIndex = m_lutEtaMuToCommonCalo[initialIndex];
657 
658  if (newIndex != badIndex) {
659 
660  conversionStatus = true;
661 
662  if (m_verbosity && m_isDebugEnabled) {
663  LogTrace("L1GlobalTrigger")
664  << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
665  << " initial eta index " << initialIndex << " (within scale size "
666  << (m_lutEtaMuToCommonCalo.size()) << ") converted to "
667  << newIndex << std::endl;
668  }
669 
670  } else {
671 
672  conversionStatus = false;
673 
674  if (m_verbosity && m_isDebugEnabled) {
675  LogTrace("L1GlobalTrigger")
676  << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
677  << " initial eta index " << initialIndex << " (within scale size "
678  << (m_lutEtaMuToCommonCalo.size()) << ") converted to badIndex"
679  << newIndex << " Conversion failed." << std::endl;
680  }
681  }
682  }
683 
684  } break;
685 
686  case NoIsoEG:
687  case IsoEG:
688  case CenJet:
689  case TauJet: {
690 
691  // check if initial index is within the scale size
692  // could be outside the scale size if there are hardware errors
693  // or wrong scale conversions
694  if (initialIndex >= m_lutEtaCentralToCommonCalo.size()) {
695 
696  conversionStatus = false;
697 
698  if (m_verbosity && m_isDebugEnabled) {
699  LogTrace("L1GlobalTrigger")
700  << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
701  << " has initial eta index " << initialIndex
702  << " >= " << (m_lutEtaCentralToCommonCalo.size())
703  << " scale size. Conversion failed." << std::endl;
704  }
705  } else {
706 
707  // convert the index
708  newIndex = m_lutEtaCentralToCommonCalo[initialIndex];
709 
710  if (newIndex != badIndex) {
711 
712  conversionStatus = true;
713 
714  if (m_verbosity && m_isDebugEnabled) {
715  LogTrace("L1GlobalTrigger")
716  << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
717  << " initial eta index " << initialIndex << " (within scale size "
718  << (m_lutEtaMuToCommonCalo.size()) << ") converted to "
719  << newIndex << std::endl;
720  }
721 
722  } else {
723 
724  conversionStatus = false;
725 
726  if (m_verbosity && m_isDebugEnabled) {
727  LogTrace("L1GlobalTrigger")
728  << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
729  << " initial eta index " << initialIndex << " (within scale size "
730  << (m_lutEtaCentralToCommonCalo.size())
731  << ") converted to badIndex" << newIndex << " Conversion failed."
732  << std::endl;
733  }
734  }
735  }
736 
737  } break;
738 
739  case ForJet: {
740 
741  // check if initial index is within the scale size
742  // could be outside the scale size if there are hardware errors
743  // or wrong scale conversions
744  if (initialIndex >= m_lutEtaForJetToCommonCalo.size()) {
745 
746  conversionStatus = false;
747 
748  if (m_verbosity && m_isDebugEnabled) {
749  LogTrace("L1GlobalTrigger")
750  << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
751  << " has initial eta index " << initialIndex
752  << " >= " << (m_lutEtaForJetToCommonCalo.size())
753  << " scale size. Conversion failed." << std::endl;
754  }
755  } else {
756 
757  // convert the index
758  newIndex = m_lutEtaForJetToCommonCalo[initialIndex];
759 
760  if (newIndex != badIndex) {
761 
762  conversionStatus = true;
763 
764  if (m_verbosity && m_isDebugEnabled) {
765  LogTrace("L1GlobalTrigger")
766  << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
767  << " initial eta index " << initialIndex << " (within scale size "
768  << (m_lutEtaMuToCommonCalo.size()) << ") converted to "
769  << newIndex << std::endl;
770  }
771 
772  } else {
773 
774  conversionStatus = false;
775 
776  if (m_verbosity && m_isDebugEnabled) {
777  LogTrace("L1GlobalTrigger")
778  << " L1 GT object " << (l1GtObjectEnumToString(gtObject))
779  << " initial eta index " << initialIndex << " (within scale size "
780  << (m_lutEtaForJetToCommonCalo.size())
781  << ") converted to badIndex" << newIndex << " Conversion failed."
782  << std::endl;
783  }
784  }
785  }
786  } break;
787 
788  case ETM:
789  case ETT:
790  case HTT:
791  case HTM:
792  case JetCounts:
793  case HfBitCounts:
794  case HfRingEtSums:
795  case TechTrig:
796  case Castor:
797  case BPTX:
798  case GtExternal:
799  case ObjNull: {
800 
801  // no conversions needed, there is no eta quantity for these objects
802  conversionStatus = false;
803  } break;
804 
805  default: {
806  edm::LogInfo("L1GtObject") << "\n '" << (l1GtObjectEnumToString(gtObject))
807  << "' is not a recognized L1GtObject. "
808  << "\n Conversion failed. " << std::endl;
809  conversionStatus = false;
810  } break;
811  }
812 
813  //
814  convertedIndex = newIndex;
815 
816  return conversionStatus;
817 }
Definition: L1GtObject.h:39
std::vector< unsigned int > m_lutEtaCentralToCommonCalo
Definition: L1GtObject.h:36
std::string l1GtObjectEnumToString(const L1GtObject &)
Definition: L1GtObject.cc:74
Definition: L1GtObject.h:38
std::vector< unsigned int > m_lutEtaForJetToCommonCalo
static const unsigned int badIndex
int m_verbosity
verbosity level
#define LogTrace(id)
Definition: L1GtObject.h:30
bool m_isDebugEnabled
cached edm::isDebugEnabled()
Definition: L1GtObject.h:37
std::vector< unsigned int > m_lutEtaMuToCommonCalo
eta conversion of Mu to the common calorimeter eta scale defined before
void L1GtEtaPhiConversions::convertL1Scales ( const L1CaloGeometry l1CaloGeometry,
const L1MuTriggerScales l1MuTriggerScales,
const int  ifCaloEtaNumberBits,
const int  ifMuEtaNumberBits 
)

perform all scale conversions

Definition at line 913 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(), 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().

916  {
917 
918  // no bullet-proof method, depends on binning ...
919  // decide "by hand / by eyes" which object converts to which object
920 
921  // update the scales used
922  m_l1CaloGeometry = l1CaloGeometry;
923  m_l1MuTriggerScales = l1MuTriggerScales;
924 
925  // number of bins for all phi scales used
926 
927  m_nrBinsPhiMu = 144; // FIXME ask Ivan for size() ...
928  // m_nrBinsPhiMu = m_l1MuTriggerScales->getPhiScale()->size();
929 
933 
934  //
935  // convert phi scale for muon (finer) to phi scale for (*Jet, EG) / ETM / HTM
936  // (coarser)
937  //
938 
939  m_lutPhiMuToJetEg.clear();
941 
942  m_lutPhiMuToEtm.clear();
944 
945  m_lutPhiMuToHtm.clear();
947 
948  for (unsigned int phiMuInd = 0; phiMuInd < m_nrBinsPhiMu; ++phiMuInd) {
949 
950  double phiMuLowEdge =
952  double phiMuHighEdge =
954 
955  // to avoid precision problems, add a small quantity to phiMuLowEdge
956  double phiMuLowEdgeSmallShiftRight =
957  phiMuLowEdge + (phiMuHighEdge - phiMuLowEdge) / 100.;
958 
959  // phi Mu -> (*Jet, EG)
960 
961  unsigned int nrBins = m_nrBinsPhiJetEg;
962 
963  for (unsigned int iBin = nrBins;; --iBin) {
964 
965  double phiLowEdge = m_l1CaloGeometry->emJetPhiBinLowEdge(iBin);
966  double phiHighEdge = m_l1CaloGeometry->emJetPhiBinHighEdge(iBin);
967 
968  if (phiMuLowEdgeSmallShiftRight >= phiLowEdge) {
969  m_lutPhiMuToJetEg[phiMuInd] = iBin % nrBins;
970 
971  LogTrace("L1GlobalTrigger")
972  << " phiMuIndex \t" << phiMuInd << " [ " << phiMuLowEdge << " \t, "
973  << phiMuHighEdge << "] \t==>\t phiMuJetEG \t"
974  << m_lutPhiMuToJetEg[phiMuInd] << " [ " << phiLowEdge << "\t, "
975  << phiHighEdge << " ]" << std::endl;
976 
977  break;
978  }
979  }
980 
981  // phi Mu -> ETM
982 
983  nrBins = m_nrBinsPhiEtm;
984 
985  for (unsigned int iBin = nrBins;; --iBin) {
986 
987  double phiLowEdge = m_l1CaloGeometry->etSumPhiBinLowEdge(iBin);
988  double phiHighEdge = m_l1CaloGeometry->etSumPhiBinHighEdge(iBin);
989 
990  if (phiMuLowEdgeSmallShiftRight >= phiLowEdge) {
991  m_lutPhiMuToEtm[phiMuInd] = iBin % nrBins;
992 
993  LogTrace("L1GlobalTrigger")
994  << " phiMuIndex \t" << phiMuInd << " [ " << phiMuLowEdge << " \t, "
995  << phiMuHighEdge << "] \t==>\t phiMuToEtm \t"
996  << m_lutPhiMuToEtm[phiMuInd] << " [ " << phiLowEdge << "\t, "
997  << phiHighEdge << " ]" << std::endl;
998 
999  break;
1000  }
1001  }
1002 
1003  // phi Mu -> HTM
1004 
1005  nrBins = m_nrBinsPhiHtm;
1006 
1007  for (unsigned int iBin = nrBins;; --iBin) {
1008 
1009  double phiLowEdge = m_l1CaloGeometry->htSumPhiBinLowEdge(iBin);
1010  double phiHighEdge = m_l1CaloGeometry->htSumPhiBinHighEdge(iBin);
1011 
1012  if (phiMuLowEdgeSmallShiftRight >= phiLowEdge) {
1013  m_lutPhiMuToHtm[phiMuInd] = iBin % nrBins;
1014 
1015  LogTrace("L1GlobalTrigger")
1016  << " phiMuIndex \t" << phiMuInd << " [ " << phiMuLowEdge << " \t, "
1017  << phiMuHighEdge << "] \t==>\t phiMuToHtm \t"
1018  << m_lutPhiMuToHtm[phiMuInd] << " [ " << phiLowEdge << "\t, "
1019  << phiHighEdge << " ]" << std::endl;
1020 
1021  break;
1022  }
1023  }
1024 
1025  LogTrace("L1GlobalTrigger") << std::endl;
1026  }
1027 
1028  if (m_verbosity && m_isDebugEnabled) {
1029  LogTrace("L1GlobalTrigger") << "Mu phi conversions" << std::endl;
1030  for (unsigned int iBin = 0; iBin < m_nrBinsPhiMu; ++iBin) {
1031  LogTrace("L1GlobalTrigger")
1032  << " Mu phiIndex \t" << iBin << "\t converted to index:"
1033  << "\t Jet-EG \t" << m_lutPhiMuToJetEg.at(iBin) << "\t ETM \t"
1034  << m_lutPhiMuToEtm.at(iBin) << "\t HTM \t" << m_lutPhiMuToHtm.at(iBin)
1035  << std::endl;
1036  }
1037  LogTrace("L1GlobalTrigger") << std::endl;
1038  }
1039 
1040  //
1041  // convert phi scale for ETM to phi scale for (*Jet, EG) / HTM (coarser)
1042  //
1043 
1044  m_lutPhiEtmToJetEg.clear();
1046 
1047  m_lutPhiEtmToHtm.clear();
1049 
1050  for (unsigned int phiEtmInd = 0; phiEtmInd < m_nrBinsPhiEtm; ++phiEtmInd) {
1051 
1052  double phiEtmLowEdge = m_l1CaloGeometry->etSumPhiBinLowEdge(phiEtmInd);
1053  double phiEtmHighEdge = m_l1CaloGeometry->etSumPhiBinHighEdge(phiEtmInd);
1054 
1055  // to avoid precision problems, add a small quantity to phiEtmLowEdge
1056  double phiEtmLowEdgeSmallShiftRight =
1057  phiEtmLowEdge + (phiEtmHighEdge - phiEtmLowEdge) / 100.;
1058 
1059  // phi ETM -> (*Jet, EG)
1060 
1061  unsigned int nrBins = m_nrBinsPhiJetEg;
1062 
1063  for (unsigned int iBin = nrBins;; --iBin) {
1064 
1065  double phiLowEdge = m_l1CaloGeometry->emJetPhiBinLowEdge(iBin);
1066  double phiHighEdge = m_l1CaloGeometry->emJetPhiBinHighEdge(iBin);
1067 
1068  if (phiEtmLowEdgeSmallShiftRight >= phiLowEdge) {
1069  m_lutPhiEtmToJetEg[phiEtmInd] = iBin % nrBins;
1070 
1071  LogTrace("L1GlobalTrigger")
1072  << " phiEtmIndex \t" << phiEtmInd << " [ " << phiEtmLowEdge
1073  << " \t, " << phiEtmHighEdge << "] \t==>\t phiEtmJetEG \t"
1074  << m_lutPhiEtmToJetEg[phiEtmInd] << " [ " << phiLowEdge << "\t, "
1075  << phiHighEdge << " ]" << std::endl;
1076 
1077  break;
1078  }
1079  }
1080 
1081  // phi ETM -> HTM
1082 
1083  nrBins = m_nrBinsPhiHtm;
1084 
1085  for (unsigned int iBin = nrBins;; --iBin) {
1086 
1087  double phiLowEdge = m_l1CaloGeometry->htSumPhiBinLowEdge(iBin);
1088  double phiHighEdge = m_l1CaloGeometry->htSumPhiBinHighEdge(iBin);
1089 
1090  if (phiEtmLowEdgeSmallShiftRight >= phiLowEdge) {
1091  m_lutPhiEtmToHtm[phiEtmInd] = iBin % nrBins;
1092 
1093  LogTrace("L1GlobalTrigger")
1094  << " phiEtmIndex \t" << phiEtmInd << " [ " << phiEtmLowEdge
1095  << " \t, " << phiEtmHighEdge << "] \t==>\t phiEtmToHtm \t"
1096  << m_lutPhiEtmToHtm[phiEtmInd] << " [ " << phiLowEdge << "\t, "
1097  << phiHighEdge << " ]" << std::endl;
1098 
1099  break;
1100  }
1101  }
1102 
1103  LogTrace("L1GlobalTrigger") << std::endl;
1104  }
1105 
1106  //
1107  // convert phi scale for HTM to phi scale for (*Jet, EG)
1108  //
1109 
1110  m_lutPhiHtmToJetEg.clear();
1112 
1113  for (unsigned int phiHtmInd = 0; phiHtmInd < m_nrBinsPhiHtm; ++phiHtmInd) {
1114 
1115  double phiHtmLowEdge = m_l1CaloGeometry->htSumPhiBinLowEdge(phiHtmInd);
1116  double phiHtmHighEdge = m_l1CaloGeometry->htSumPhiBinHighEdge(phiHtmInd);
1117 
1118  // to avoid precision problems, add a small quantity to phiHtmLowEdge
1119  double phiHtmLowEdgeSmallShiftRight =
1120  phiHtmLowEdge + (phiHtmHighEdge - phiHtmLowEdge) / 100.;
1121 
1122  unsigned int nrBins = m_nrBinsPhiJetEg;
1123 
1124  for (unsigned int iBin = nrBins;; --iBin) {
1125 
1126  double phiLowEdge = m_l1CaloGeometry->emJetPhiBinLowEdge(iBin);
1127  double phiHighEdge = m_l1CaloGeometry->emJetPhiBinHighEdge(iBin);
1128 
1129  if (phiHtmLowEdgeSmallShiftRight >= phiLowEdge) {
1130  m_lutPhiHtmToJetEg[phiHtmInd] = iBin % nrBins;
1131 
1132  LogTrace("L1GlobalTrigger")
1133  << " phiHtmIndex \t" << phiHtmInd << " [ " << phiHtmLowEdge
1134  << " \t, " << phiHtmHighEdge << "] \t==>\t phiHtmJetEG \t"
1135  << m_lutPhiHtmToJetEg[phiHtmInd] << " [ " << phiLowEdge << "\t, "
1136  << phiHighEdge << " ]" << std::endl;
1137 
1138  break;
1139  }
1140  }
1141  }
1142 
1143  //
1144  // convert phi scale for (*Jet, EG) to (*Jet, EG)
1145  // dummy - return the same index as the input index
1146 
1147  m_lutPhiJetEgToJetEg.clear();
1149 
1150  for (unsigned int phiInd = 0; phiInd < m_nrBinsPhiJetEg; ++phiInd) {
1151  m_lutPhiJetEgToJetEg[phiInd] = phiInd;
1152  }
1153 
1154  //
1155  // eta conversions
1156  //
1157 
1158  // all objects are converted to a common central / forward calorimeter eta
1159  // scale, built by setting together the forward scale and the central scale
1160  //
1161  // eta is signed, MSB is the sign for all objects - must be taken into
1162  // account in conversion - the common scale is, from 0 to m_nrBinsEtaCommon:
1163  //
1164  // [ForJet negative bins][Central Jet/IsoEG/NoIsoEG negative bins][Central
1165  // Jet/IsoEG/NoIsoEG positive bins][ForJet positive bins]
1166  //
1167 
1168  unsigned int nrGctCentralEtaBinsPerHalf =
1170 
1171  unsigned int nrGctForwardEtaBinsPerHalf =
1173 
1174  unsigned int nrGctTotalEtaBinsPerHalf =
1175  nrGctCentralEtaBinsPerHalf + nrGctForwardEtaBinsPerHalf;
1176 
1177  m_nrBinsEtaCommon = 2 * nrGctTotalEtaBinsPerHalf;
1178 
1179  //
1180  // convert eta scale for CenJet/TauJet & IsoEG/NoIsoEG to a common
1181  // central / forward calorimeter eta scale
1182  //
1183  // get the sign and the index absolute value
1184 
1185  LogTrace("L1GlobalTrigger") << " \nEta conversion: CenJet/TauJet & "
1186  "IsoEG/NoIsoEG to a common calorimeter scale\n"
1187  << std::endl;
1188 
1191  (nrGctCentralEtaBinsPerHalf | (1 << (ifCaloEtaNumberBits - 1))),
1192  badIndex);
1193 
1194  for (unsigned int etaInd = 0; etaInd < nrGctCentralEtaBinsPerHalf; ++etaInd) {
1195 
1196  // for positive values, the index is etaInd
1197  unsigned int globalIndex = m_l1CaloGeometry->globalEtaIndex(
1198  m_l1CaloGeometry->etaBinCenter(etaInd, true));
1199  m_lutEtaCentralToCommonCalo[etaInd] = globalIndex;
1200 
1201  LogTrace("L1GlobalTrigger")
1202  << " etaIndex " << etaInd << "\t [hex: " << std::hex << etaInd << "] "
1203  << std::dec << " ==> etaIndexGlobal " << globalIndex << std::endl;
1204 
1205  // for negative values, one adds (binary) 1 as MSB to the index
1206  unsigned int etaIndNeg = etaInd | (1 << (ifCaloEtaNumberBits - 1));
1207  globalIndex = m_l1CaloGeometry->globalEtaIndex(
1208  m_l1CaloGeometry->etaBinCenter(etaIndNeg, true));
1209  m_lutEtaCentralToCommonCalo[etaIndNeg] = globalIndex;
1210 
1211  LogTrace("L1GlobalTrigger")
1212  << " etaIndex " << etaIndNeg << "\t [hex: " << std::hex << etaIndNeg
1213  << "] " << std::dec << " ==> etaIndexGlobal " << globalIndex
1214  << std::endl;
1215  }
1216 
1217  //
1218  // convert eta scale for ForJet to a common
1219  // central / forward calorimeter eta scale
1220  //
1221 
1222  LogTrace("L1GlobalTrigger")
1223  << " \nEta conversion: ForJet to a common calorimeter scale\n"
1224  << std::endl;
1225 
1228  (nrGctForwardEtaBinsPerHalf | (1 << (ifCaloEtaNumberBits - 1))),
1229  badIndex);
1230 
1231  for (unsigned int etaInd = 0; etaInd < nrGctForwardEtaBinsPerHalf; ++etaInd) {
1232 
1233  // for positive values, the index is etaInd
1234  unsigned int globalIndex = m_l1CaloGeometry->globalEtaIndex(
1235  m_l1CaloGeometry->etaBinCenter(etaInd, false));
1236  m_lutEtaForJetToCommonCalo[etaInd] = globalIndex;
1237 
1238  LogTrace("L1GlobalTrigger")
1239  << " etaIndex " << etaInd << "\t [hex: " << std::hex << etaInd << "] "
1240  << std::dec << " ==> etaIndexGlobal " << globalIndex << std::endl;
1241 
1242  // for negative values, one adds (binary) 1 as MSB to the index
1243  unsigned int etaIndNeg = etaInd | (1 << (ifCaloEtaNumberBits - 1));
1244  globalIndex = m_l1CaloGeometry->globalEtaIndex(
1245  m_l1CaloGeometry->etaBinCenter(etaIndNeg, false));
1246  m_lutEtaForJetToCommonCalo[etaIndNeg] = globalIndex;
1247 
1248  LogTrace("L1GlobalTrigger")
1249  << " etaIndex " << etaIndNeg << "\t [hex: " << std::hex << etaIndNeg
1250  << "] " << std::dec << " ==> etaIndexGlobal " << globalIndex
1251  << std::endl;
1252  }
1253 
1254  //
1255  // convert eta scale for Mu to a common
1256  // central / forward calorimeter eta scale
1257  //
1258 
1259  LogDebug("L1GlobalTrigger")
1260  << " \nEta conversion: Mu to a common calorimeter scale\n"
1261  << std::endl;
1262 
1263  // eta scale defined for positive values - need to be symmetrized
1264  unsigned int nrBinsEtaMuPerHalf =
1266  LogTrace("L1GlobalTrigger")
1267  << " \nnrBinsEtaMuPerHalf = " << nrBinsEtaMuPerHalf << "\n"
1268  << std::endl;
1269 
1270  m_lutEtaMuToCommonCalo.clear();
1271  m_lutEtaMuToCommonCalo.resize(
1272  (nrBinsEtaMuPerHalf | (1 << (ifMuEtaNumberBits - 1))), badIndex);
1273 
1274  for (unsigned int etaMuInd = 0; etaMuInd < nrBinsEtaMuPerHalf; ++etaMuInd) {
1275 
1276  double etaMuLowEdge =
1278  double etaMuHighEdge =
1279  m_l1MuTriggerScales->getGMTEtaScale()->getValue(etaMuInd + 1);
1280 
1281  // to avoid precision problems, add a small quantity to etaMuLowEdge
1282  double etaMuLowEdgeSmallShiftRight =
1283  etaMuLowEdge + (etaMuHighEdge - etaMuLowEdge) / 100.;
1284 
1285  // positive values
1286  for (unsigned int iBin = m_nrBinsEtaCommon;; --iBin) {
1287 
1288  double etaLowEdge = m_l1CaloGeometry->globalEtaBinLowEdge(iBin);
1289 
1290  double etaHighEdge = 0.0;
1291  if (iBin == m_nrBinsEtaCommon) {
1292  etaHighEdge = etaLowEdge;
1293  } else {
1294  etaHighEdge = m_l1CaloGeometry->globalEtaBinLowEdge(iBin + 1);
1295  }
1296 
1297  if (etaMuLowEdgeSmallShiftRight >= etaLowEdge) {
1298  m_lutEtaMuToCommonCalo[etaMuInd] = iBin % m_nrBinsEtaCommon;
1299 
1300  LogTrace("L1GlobalTrigger")
1301  << " etaMuIndex \t" << etaMuInd << "\t [ " << etaMuLowEdge << ", \t"
1302  << etaMuHighEdge << "] ==> etaMuJetEG \t"
1303  << m_lutEtaMuToCommonCalo[etaMuInd] << "\t [ " << etaLowEdge
1304  << ", \t" << etaHighEdge << " ]" << std::endl;
1305 
1306  break;
1307  }
1308  }
1309 
1310  // for negative values, one adds (binary) 1 as MSB to the index
1311  unsigned int etaMuIndNeg = etaMuInd | (1 << (ifMuEtaNumberBits - 1));
1312  m_lutEtaMuToCommonCalo[etaMuIndNeg] =
1314  (m_lutEtaMuToCommonCalo[etaMuInd] - m_lutEtaMuToCommonCalo[0] + 1);
1315 
1316  LogTrace("L1GlobalTrigger")
1317  << " etaMuIndexNeg \t" << etaMuIndNeg << "\t [ "
1318  << (-1.0 * etaMuLowEdge) << ", \t" << (-1.0 * etaMuHighEdge)
1319  << "] ==> etaMuJetEG \t" << m_lutEtaMuToCommonCalo[etaMuIndNeg]
1320  << "\t [ "
1322  m_lutEtaMuToCommonCalo[etaMuIndNeg])
1323  << ", \t"
1325  m_lutEtaMuToCommonCalo[etaMuIndNeg] + 1)
1326  << " ]" << std::endl;
1327  }
1328 
1329  if (m_verbosity && m_isDebugEnabled) {
1330  LogTrace("L1GlobalTrigger") << std::endl;
1331  LogTrace("L1GlobalTrigger") << std::endl;
1332  }
1333 }
#define LogDebug(id)
const L1CaloGeometry * m_l1CaloGeometry
pointer to calorimetry scales - updated in convertl1Scales method
double globalEtaBinLowEdge(unsigned int globalEtaIndex) const
unsigned int numberGctForwardEtaBinsPerHalf() const
unsigned int m_nrBinsEtaCommon
number of eta bins for common scale
unsigned int m_nrBinsPhiMu
number of phi bins for muons
std::vector< unsigned int > m_lutEtaCentralToCommonCalo
unsigned int numberGctHtSumPhiBins() const
double htSumPhiBinLowEdge(unsigned int phiIndex) const
unsigned int numberGctEtSumPhiBins() const
unsigned int m_nrBinsPhiEtm
number of phi bins for ETM
unsigned int numberGctEmJetPhiBins() const
std::vector< unsigned int > m_lutPhiMuToHtm
phi conversion for Mu to HTM
double etaBinCenter(unsigned int etaIndex, bool central=true) const
unsigned int numberGctCentralEtaBinsPerHalf() const
virtual float getHighEdge(unsigned packed) const =0
get the upper edge of bin represented by packed
std::vector< unsigned int > m_lutEtaForJetToCommonCalo
const L1MuScale * getPhiScale() const
get the phi scale
std::vector< unsigned int > m_lutPhiMuToEtm
phi conversion for Mu to ETM
static const unsigned int badIndex
virtual unsigned getNBins() const =0
get number of bins
int m_verbosity
verbosity level
#define LogTrace(id)
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
bool m_isDebugEnabled
cached edm::isDebugEnabled()
const L1MuTriggerScales * m_l1MuTriggerScales
pointer to muon scales - updated in convertl1Scales method
double etSumPhiBinLowEdge(unsigned int phiIndex) const
std::vector< unsigned int > m_lutPhiEtmToHtm
phi conversion for ETM to HTM
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
const L1MuScale * getGMTEtaScale() const
get the GMT eta scale
double emJetPhiBinLowEdge(unsigned int phiIndex) const
double htSumPhiBinHighEdge(unsigned int phiIndex) const
std::vector< unsigned int > m_lutPhiJetEgToJetEg
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
unsigned int globalEtaIndex(const double &etaValue) const
std::vector< unsigned int > m_lutPhiEtmToJetEg
phi conversion for ETM to (*Jet, EG)
virtual float getValue(unsigned i) const =0
get value of the underlying vector for bin i
double emJetPhiBinHighEdge(unsigned int phiIndex) const
double etSumPhiBinHighEdge(unsigned int phiIndex) const
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 488 of file L1GtEtaPhiConversions.cc.

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

Referenced by L1GtCorrelationCondition::evaluateCondition().

490  {
491 
492  unsigned int newIndex = badIndex;
493  bool conversionStatus = false;
494 
495  // check if initial index is within the scale size
496  // could be outside the scale size if there are hardware errors
497  // or wrong scale conversions
498  if (initialIndex >= (*(m_pairPhiConvVec.at(pairIndex))).size()) {
499 
500  conversionStatus = false;
501 
502  if (m_verbosity && m_isDebugEnabled) {
503  LogTrace("L1GlobalTrigger")
504  << (positionPair ? " Second" : "\n First") << " object from pair "
505  << pairIndex << ": initial phi index " << initialIndex
506  << " >= " << ((*(m_pairPhiConvVec.at(pairIndex))).size())
507  << " Conversion failed." << std::endl;
508  }
509  } else {
510  if (m_verbosity && m_isDebugEnabled) {
511  LogTrace("L1GlobalTrigger")
512  << (positionPair ? " Second" : "\n First") << " object from pair "
513  << pairIndex << ": initial phi index " << initialIndex
514  << " within scale size "
515  << ((*(m_pairPhiConvVec.at(pairIndex))).size()) << std::endl;
516  }
517  }
518 
519  // convert the index
520  switch (positionPair) {
521  case 0: {
522  if (m_pairConvertPhiFirstGtObject.at(pairIndex)) {
523 
524  newIndex = (*(m_pairPhiConvVec.at(pairIndex))).at(initialIndex);
525 
526  if (newIndex != badIndex) {
527 
528  conversionStatus = true;
529 
530  if (m_verbosity && m_isDebugEnabled) {
531  LogTrace("L1GlobalTrigger")
532  << (positionPair ? " Second" : "\n First")
533  << " object from pair " << pairIndex << ": initial phi index "
534  << initialIndex << " converted to " << newIndex << std::endl;
535  }
536 
537  } else {
538 
539  conversionStatus = false;
540 
541  if (m_verbosity && m_isDebugEnabled) {
542  LogTrace("L1GlobalTrigger")
543  << (positionPair ? " Second" : "\n First")
544  << " object from pair " << pairIndex << ": converted phi index "
545  << newIndex << "is equal to badIndex " << badIndex
546  << " Conversion failed." << std::endl;
547  }
548  }
549 
550  } else {
551  newIndex = initialIndex;
552  conversionStatus = true;
553 
554  if (m_verbosity && m_isDebugEnabled) {
555  LogTrace("L1GlobalTrigger")
556  << (positionPair ? " Second" : "\n First")
557  << " object from pair " << pairIndex << ": initial phi index "
558  << initialIndex << " not requested to be converted, return index "
559  << newIndex << std::endl;
560  }
561  }
562  }
563 
564  break;
565  case 1: {
566  if (m_pairConvertPhiFirstGtObject.at(pairIndex)) {
567 
568  newIndex = initialIndex;
569  conversionStatus = true;
570 
571  if (m_verbosity && m_isDebugEnabled) {
572  LogTrace("L1GlobalTrigger")
573  << (positionPair ? " Second" : "\n First")
574  << " object from pair " << pairIndex << ": initial phi index "
575  << initialIndex
576  << " not requested to be converted, return index, return index "
577  << newIndex << std::endl;
578  }
579  } else {
580 
581  newIndex = (*(m_pairPhiConvVec.at(pairIndex))).at(initialIndex);
582 
583  if (newIndex != badIndex) {
584 
585  conversionStatus = true;
586 
587  if (m_verbosity && m_isDebugEnabled) {
588  LogTrace("L1GlobalTrigger")
589  << (positionPair ? " Second" : "\n First")
590  << " object from pair " << pairIndex << ": initial phi index "
591  << initialIndex << " converted to " << newIndex << std::endl;
592  }
593 
594  } else {
595 
596  conversionStatus = false;
597 
598  if (m_verbosity && m_isDebugEnabled) {
599  LogTrace("L1GlobalTrigger")
600  << (positionPair ? " Second" : "\n First")
601  << " object from pair " << pairIndex << ": converted phi index "
602  << newIndex << "is equal to badIndex " << badIndex
603  << " Conversion failed." << std::endl;
604  }
605  }
606  }
607 
608  }
609 
610  break;
611  default: {
612 
613  // should not happen (programming error)
614  throw cms::Exception("FailModule")
615  << "\n Wrong position in the object pair " << positionPair
616  << "\n Programming error - position must be either 0 or 1..."
617  << std::endl;
618 
619  } break;
620  }
621 
622  //
623  convertedIndex = newIndex;
624  return conversionStatus;
625 }
std::vector< bool > m_pairConvertPhiFirstGtObject
std::vector< const std::vector< unsigned int > * > m_pairPhiConvVec
static const unsigned int badIndex
int m_verbosity
verbosity level
#define LogTrace(id)
bool m_isDebugEnabled
cached edm::isDebugEnabled()
const unsigned int L1GtEtaPhiConversions::gtObjectNrBinsPhi ( const L1GtObject gtObject) const

return the number of phi bins for a GT object

Definition at line 820 of file L1GtEtaPhiConversions.cc.

References BPTX, 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().

820  {
821 
822  switch (gtObject) {
823 
824  case Mu: {
825  return m_nrBinsPhiMu;
826  } break;
827 
828  case NoIsoEG:
829  case IsoEG:
830  case CenJet:
831  case ForJet:
832  case TauJet: {
833  return m_nrBinsPhiJetEg;
834  } break;
835 
836  case ETM: {
837  return m_nrBinsPhiEtm;
838  } break;
839 
840  case ETT:
841  case HTT: {
842  return 0;
843  } break;
844 
845  case HTM: {
846  return m_nrBinsPhiHtm;
847  } break;
848 
849  case JetCounts:
850  case HfBitCounts:
851  case HfRingEtSums:
852  case TechTrig:
853  case Castor:
854  case BPTX:
855  case GtExternal:
856  case ObjNull: {
857  return 0;
858  } break;
859 
860  default: {
861  edm::LogInfo("L1GtObject") << "\n '" << (l1GtObjectEnumToString(gtObject))
862  << "' is not a recognized L1GtObject. "
863  << "\n Return 0 bins.";
864  return 0;
865  } break;
866  }
867 }
unsigned int m_nrBinsPhiMu
number of phi bins for muons
Definition: L1GtObject.h:39
Definition: L1GtObject.h:36
unsigned int m_nrBinsPhiEtm
number of phi bins for ETM
std::string l1GtObjectEnumToString(const L1GtObject &)
Definition: L1GtObject.cc:74
Definition: L1GtObject.h:38
unsigned int m_nrBinsPhiJetEg
number of phi bins for calorimeter objects (*Jet, *EG)
Definition: L1GtObject.h:30
unsigned int m_nrBinsPhiHtm
number of phi bins for HTM
Definition: L1GtObject.h:37
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 870 of file L1GtEtaPhiConversions.cc.

References l1GtObjectEnumToString(), LogTrace, m_gtObjectPairVec, and m_pairNrPhiBinsVec.

871  {
872 
873  std::pair<L1GtObject, L1GtObject> gtObjPair;
874  gtObjPair = std::make_pair(obj0, obj1);
875 
876  // LogTrace("L1GlobalTrigger") << "\nCompute gtObjectNrBinsPhi ["
877  // << (l1GtObjectEnumToString(obj0)) << ", "
878  // << (l1GtObjectEnumToString(obj1)) << "]\n" << std::endl;
879 
880  int iPair = 0;
881  for (std::vector<std::pair<L1GtObject, L1GtObject>>::const_iterator cIter =
882  m_gtObjectPairVec.begin();
883  cIter != m_gtObjectPairVec.end(); ++cIter) {
884 
885  if (*cIter == gtObjPair) {
886  LogTrace("L1GlobalTrigger")
887  << "\n gtObjectNrBinsPhi [" << l1GtObjectEnumToString(obj0) << ", "
888  << l1GtObjectEnumToString(obj1)
889  << "] = " << (*(m_pairNrPhiBinsVec.at(iPair))) << std::endl;
890 
891  return *(m_pairNrPhiBinsVec.at(iPair));
892  }
893 
894  iPair++;
895  }
896 
897  return 0;
898 }
std::string l1GtObjectEnumToString(const L1GtObject &)
Definition: L1GtObject.cc:74
#define LogTrace(id)
std::vector< std::pair< L1GtObject, L1GtObject > > m_gtObjectPairVec
vector of all L1GtObject pairs
std::vector< const unsigned int * > m_pairNrPhiBinsVec
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 901 of file L1GtEtaPhiConversions.cc.

References LogTrace, m_isDebugEnabled, m_pairNrPhiBinsVec, and m_verbosity.

901  {
902 
903  if (m_verbosity && m_isDebugEnabled) {
904  LogTrace("L1GlobalTrigger")
905  << "\n gtObjectNrBinsPhi for L1 GT object pair index " << pairIndex
906  << " = " << (*(m_pairNrPhiBinsVec.at(pairIndex))) << std::endl;
907  }
908 
909  return *(m_pairNrPhiBinsVec.at(pairIndex));
910 }
int m_verbosity
verbosity level
#define LogTrace(id)
std::vector< const unsigned int * > m_pairNrPhiBinsVec
bool m_isDebugEnabled
cached edm::isDebugEnabled()
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 455 of file L1GtEtaPhiConversions.cc.

References l1GtObjectEnumToString(), LogTrace, and m_gtObjectPairVec.

Referenced by L1GtCorrelationCondition::evaluateCondition().

456  {
457 
458  std::pair<L1GtObject, L1GtObject> gtObjPair;
459  gtObjPair = std::make_pair(obj0, obj1);
460 
461  // LogTrace("L1GlobalTrigger") << "\nCompute index for pair ["
462  // << (l1GtObjectEnumToString(obj0)) << ", "
463  // << (l1GtObjectEnumToString(obj1)) << "]\n" << std::endl;
464 
465  unsigned int iPair = 0;
466  for (std::vector<std::pair<L1GtObject, L1GtObject>>::const_iterator cIter =
467  m_gtObjectPairVec.begin();
468  cIter != m_gtObjectPairVec.end(); ++cIter) {
469 
470  if (*cIter == gtObjPair) {
471  LogTrace("L1GlobalTrigger")
472  << "\n Index for pair [" << l1GtObjectEnumToString(obj0) << ", "
473  << l1GtObjectEnumToString(obj1) << "] = " << iPair << std::endl;
474 
475  return iPair;
476  }
477 
478  iPair++;
479  }
480 
481  // if the pair was not found, return index outside vector size
482  // it should never happen, except due to programming error
483  // by using .at one gets an exception when using index outside vector size,
484  // due to the programming error...
485  return m_gtObjectPairVec.size();
486 }
std::string l1GtObjectEnumToString(const L1GtObject &)
Definition: L1GtObject.cc:74
#define LogTrace(id)
std::vector< std::pair< L1GtObject, L1GtObject > > m_gtObjectPairVec
vector of all L1GtObject pairs
void L1GtEtaPhiConversions::print ( std::ostream &  myCout) const
virtual

print all the performed conversions

Definition at line 1336 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(), and setVerbosity().

1336  {
1337 
1338  // force a page break before each group
1339  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1340 
1341  myCout << "\n---++Conversion tables for phi and eta variables of the trigger "
1342  "objects used in correlation conditions \n"
1343  << std::endl;
1344 
1345  //
1346  // phi conversions
1347  //
1348 
1349  // phi Mu -> (*Jet, EG)
1350 
1351  myCout << "\n---+++Phi conversion for muons to jets and e-gamma common phi "
1352  "scale \n"
1353  << std::endl;
1354 
1355  size_t lutPhiMuToJetEgSize = m_lutPhiMuToJetEg.size();
1356  myCout << "Size of look-up table = " << lutPhiMuToJetEgSize << "\n"
1357  << std::endl;
1358 
1359  myCout << "| *Initial Phi Hardware Index* "
1360  << "|| *Initial Phi Range* ||"
1361  << " *Converted Phi Hardware Index* "
1362  << "|| *Converted Phi Range* ||"
1363  << "\n"
1364  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1365 
1366  for (unsigned int indexToConv = 0; indexToConv < lutPhiMuToJetEgSize;
1367  ++indexToConv) {
1368 
1369  double lowEdgeToConv =
1370  m_l1MuTriggerScales->getPhiScale()->getLowEdge(indexToConv);
1371  double highEdgeToConv =
1372  m_l1MuTriggerScales->getPhiScale()->getHighEdge(indexToConv);
1373 
1374  unsigned int convIndex = m_lutPhiMuToJetEg[indexToConv];
1375 
1376  double convLowEdge = 0.;
1377  double convHighEdge = 0.;
1378 
1379  if (convIndex != badIndex) {
1380  convLowEdge = m_l1CaloGeometry->emJetPhiBinLowEdge(convIndex);
1381  convHighEdge = m_l1CaloGeometry->emJetPhiBinHighEdge(convIndex);
1382  } else {
1383  // badIndex means a bad initialIndex
1384  lowEdgeToConv = 0.;
1385  highEdgeToConv = 0.;
1386  }
1387 
1388  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv
1389  << " | " << std::dec << std::setw(3) << std::left << indexToConv
1390  << " |[ " << std::setw(10) << std::left << (rad2deg(lowEdgeToConv))
1391  << ", |" << std::setw(10) << std::left << (rad2deg(highEdgeToConv))
1392  << " ) | 0x" << std::setw(6) << std::hex << std::left << convIndex
1393  << " | " << std::dec << std::setw(6) << convIndex << " |[ "
1394  << std::setw(10) << std::left << (rad2deg(convLowEdge)) << ", |"
1395  << std::setw(10) << std::left << (rad2deg(convHighEdge)) << " ) |"
1396  << std::right << std::endl;
1397  }
1398 
1399  // phi Mu -> ETM
1400 
1401  // force a page break before each group
1402  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1403 
1404  myCout << "\n---+++Phi conversion for muons to ETM phi scale \n" << std::endl;
1405 
1406  size_t lutPhiMuToEtmSize = m_lutPhiMuToEtm.size();
1407  myCout << "Size of look-up table = " << lutPhiMuToEtmSize << "\n"
1408  << std::endl;
1409 
1410  myCout << "| *Initial Phi Hardware Index* "
1411  << "|| *Initial Phi Range* ||"
1412  << " *Converted Phi Hardware Index* "
1413  << "|| *Converted Phi Range* ||"
1414  << "\n"
1415  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1416 
1417  for (unsigned int indexToConv = 0; indexToConv < lutPhiMuToEtmSize;
1418  ++indexToConv) {
1419 
1420  double lowEdgeToConv =
1421  m_l1MuTriggerScales->getPhiScale()->getLowEdge(indexToConv);
1422  double highEdgeToConv =
1423  m_l1MuTriggerScales->getPhiScale()->getHighEdge(indexToConv);
1424 
1425  unsigned int convIndex = m_lutPhiMuToEtm[indexToConv];
1426 
1427  double convLowEdge = 0.;
1428  double convHighEdge = 0.;
1429 
1430  if (convIndex != badIndex) {
1431  convLowEdge = m_l1CaloGeometry->etSumPhiBinLowEdge(convIndex);
1432  convHighEdge = m_l1CaloGeometry->etSumPhiBinHighEdge(convIndex);
1433  } else {
1434  // badIndex means a bad initialIndex
1435  lowEdgeToConv = 0.;
1436  highEdgeToConv = 0.;
1437  }
1438 
1439  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv
1440  << " | " << std::dec << std::setw(3) << std::left << indexToConv
1441  << " |[ " << std::setw(10) << std::left << (rad2deg(lowEdgeToConv))
1442  << ", |" << std::setw(10) << std::left << (rad2deg(highEdgeToConv))
1443  << " ) | 0x" << std::setw(6) << std::hex << std::left << convIndex
1444  << " | " << std::dec << std::setw(6) << convIndex << " |[ "
1445  << std::setw(10) << std::left << (rad2deg(convLowEdge)) << ", |"
1446  << std::setw(10) << std::left << (rad2deg(convHighEdge)) << " ) |"
1447  << std::right << std::endl;
1448  }
1449 
1450  // phi Mu -> HTM
1451 
1452  // force a page break before each group
1453  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1454 
1455  myCout << "\n---+++Phi conversion for muons to HTM phi scale \n" << std::endl;
1456 
1457  size_t lutPhiMuToHtmSize = m_lutPhiMuToHtm.size();
1458  myCout << "Size of look-up table = " << lutPhiMuToHtmSize << "\n"
1459  << std::endl;
1460 
1461  myCout << "| *Initial Phi Hardware Index* "
1462  << "|| *Initial Phi Range* ||"
1463  << " *Converted Phi Hardware Index* "
1464  << "|| *Converted Phi Range* ||"
1465  << "\n"
1466  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1467 
1468  for (unsigned int indexToConv = 0; indexToConv < lutPhiMuToHtmSize;
1469  ++indexToConv) {
1470 
1471  double lowEdgeToConv =
1472  m_l1MuTriggerScales->getPhiScale()->getLowEdge(indexToConv);
1473  double highEdgeToConv =
1474  m_l1MuTriggerScales->getPhiScale()->getHighEdge(indexToConv);
1475 
1476  unsigned int convIndex = m_lutPhiMuToHtm[indexToConv];
1477 
1478  double convLowEdge = 0.;
1479  double convHighEdge = 0.;
1480 
1481  if (convIndex != badIndex) {
1482  convLowEdge = m_l1CaloGeometry->htSumPhiBinLowEdge(convIndex);
1483  convHighEdge = m_l1CaloGeometry->htSumPhiBinHighEdge(convIndex);
1484  } else {
1485  // badIndex means a bad initialIndex
1486  lowEdgeToConv = 0.;
1487  highEdgeToConv = 0.;
1488  }
1489 
1490  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv
1491  << " | " << std::dec << std::setw(3) << std::left << indexToConv
1492  << " |[ " << std::setw(10) << std::left << (rad2deg(lowEdgeToConv))
1493  << ", |" << std::setw(10) << std::left << (rad2deg(highEdgeToConv))
1494  << " ) | 0x" << std::setw(6) << std::hex << std::left << convIndex
1495  << " | " << std::dec << std::setw(6) << convIndex << " |[ "
1496  << std::setw(10) << std::left << (rad2deg(convLowEdge)) << ", |"
1497  << std::setw(10) << std::left << (rad2deg(convHighEdge)) << " ) |"
1498  << std::right << std::endl;
1499  }
1500 
1501  // phi ETM -> (*Jet, EG)
1502 
1503  // force a page break before each group
1504  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1505 
1506  myCout << "\n---+++Phi conversion for ETM to jets and e-gamma scale common "
1507  "phi scale \n"
1508  << std::endl;
1509 
1510  size_t lutPhiEtmToJetEgSize = m_lutPhiEtmToJetEg.size();
1511  myCout << "Size of look-up table = " << lutPhiEtmToJetEgSize << "\n"
1512  << std::endl;
1513 
1514  myCout << "| *Initial Phi Hardware Index* "
1515  << "|| *Initial Phi Range* ||"
1516  << " *Converted Phi Hardware Index* "
1517  << "|| *Converted Phi Range* ||"
1518  << "\n"
1519  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1520 
1521  for (unsigned int indexToConv = 0; indexToConv < lutPhiEtmToJetEgSize;
1522  ++indexToConv) {
1523 
1524  double lowEdgeToConv = m_l1CaloGeometry->etSumPhiBinLowEdge(indexToConv);
1525  double highEdgeToConv = m_l1CaloGeometry->etSumPhiBinHighEdge(indexToConv);
1526 
1527  unsigned int convIndex = m_lutPhiEtmToJetEg[indexToConv];
1528 
1529  double convLowEdge = 0.;
1530  double convHighEdge = 0.;
1531 
1532  if (convIndex != badIndex) {
1533  convLowEdge = m_l1CaloGeometry->emJetPhiBinLowEdge(convIndex);
1534  convHighEdge = m_l1CaloGeometry->emJetPhiBinHighEdge(convIndex);
1535  } else {
1536  // badIndex means a bad initialIndex
1537  lowEdgeToConv = 0.;
1538  highEdgeToConv = 0.;
1539  }
1540 
1541  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv
1542  << " | " << std::dec << std::setw(3) << std::left << indexToConv
1543  << " |[ " << std::setw(10) << std::left << (rad2deg(lowEdgeToConv))
1544  << ", |" << std::setw(10) << std::left << (rad2deg(highEdgeToConv))
1545  << " ) | 0x" << std::setw(6) << std::hex << std::left << convIndex
1546  << " | " << std::dec << std::setw(6) << convIndex << " |[ "
1547  << std::setw(10) << std::left << (rad2deg(convLowEdge)) << ", |"
1548  << std::setw(10) << std::left << (rad2deg(convHighEdge)) << " ) |"
1549  << std::right << std::endl;
1550  }
1551 
1552  // phi ETM -> HTM
1553 
1554  // force a page break before each group
1555  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1556 
1557  myCout << "\n---+++Phi conversion for ETM to HTM phi scale \n" << std::endl;
1558 
1559  size_t lutPhiEtmToHtmSize = m_lutPhiEtmToHtm.size();
1560  myCout << "Size of look-up table = " << lutPhiEtmToHtmSize << "\n"
1561  << std::endl;
1562 
1563  myCout << "| *Initial Phi Hardware Index* "
1564  << "|| *Initial Phi Range* ||"
1565  << " *Converted Phi Hardware Index* "
1566  << "|| *Converted Phi Range* ||"
1567  << "\n"
1568  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1569 
1570  for (unsigned int indexToConv = 0; indexToConv < lutPhiEtmToHtmSize;
1571  ++indexToConv) {
1572 
1573  double lowEdgeToConv = m_l1CaloGeometry->etSumPhiBinLowEdge(indexToConv);
1574  double highEdgeToConv = m_l1CaloGeometry->etSumPhiBinHighEdge(indexToConv);
1575 
1576  unsigned int convIndex = m_lutPhiEtmToHtm[indexToConv];
1577 
1578  double convLowEdge = 0.;
1579  double convHighEdge = 0.;
1580 
1581  if (convIndex != badIndex) {
1582  convLowEdge = m_l1CaloGeometry->htSumPhiBinLowEdge(convIndex);
1583  convHighEdge = m_l1CaloGeometry->htSumPhiBinHighEdge(convIndex);
1584  } else {
1585  // badIndex means a bad initialIndex
1586  lowEdgeToConv = 0.;
1587  highEdgeToConv = 0.;
1588  }
1589 
1590  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv
1591  << " | " << std::dec << std::setw(3) << std::left << indexToConv
1592  << " |[ " << std::setw(10) << std::left << (rad2deg(lowEdgeToConv))
1593  << ", |" << std::setw(10) << std::left << (rad2deg(highEdgeToConv))
1594  << " ) | 0x" << std::setw(6) << std::hex << std::left << convIndex
1595  << " | " << std::dec << std::setw(6) << convIndex << " |[ "
1596  << std::setw(10) << std::left << (rad2deg(convLowEdge)) << ", |"
1597  << std::setw(10) << std::left << (rad2deg(convHighEdge)) << " ) |"
1598  << std::right << std::endl;
1599  }
1600 
1601  // phi HTM -> (*Jet, EG)
1602 
1603  // force a page break before each group
1604  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1605 
1606  myCout << "\n---+++Phi conversion for HTM to jets and e-gamma scale common "
1607  "phi scale \n"
1608  << std::endl;
1609 
1610  size_t lutPhiHtmToJetEgSize = m_lutPhiHtmToJetEg.size();
1611  myCout << "Size of look-up table = " << lutPhiHtmToJetEgSize << "\n"
1612  << std::endl;
1613 
1614  myCout << "| *Initial Phi Hardware Index* "
1615  << "|| *Initial Phi Range* ||"
1616  << " *Converted Phi Hardware Index* "
1617  << "|| *Converted Phi Range* ||"
1618  << "\n"
1619  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1620 
1621  for (unsigned int indexToConv = 0; indexToConv < lutPhiHtmToJetEgSize;
1622  ++indexToConv) {
1623 
1624  double lowEdgeToConv = m_l1CaloGeometry->htSumPhiBinLowEdge(indexToConv);
1625  double highEdgeToConv = m_l1CaloGeometry->htSumPhiBinHighEdge(indexToConv);
1626 
1627  unsigned int convIndex = m_lutPhiHtmToJetEg[indexToConv];
1628 
1629  double convLowEdge = 0.;
1630  double convHighEdge = 0.;
1631 
1632  if (convIndex != badIndex) {
1633  convLowEdge = m_l1CaloGeometry->emJetPhiBinLowEdge(convIndex);
1634  convHighEdge = m_l1CaloGeometry->emJetPhiBinHighEdge(convIndex);
1635  } else {
1636  // badIndex means a bad initialIndex
1637  lowEdgeToConv = 0.;
1638  highEdgeToConv = 0.;
1639  }
1640 
1641  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv
1642  << " | " << std::dec << std::setw(3) << std::left << indexToConv
1643  << " |[ " << std::setw(10) << std::left << (rad2deg(lowEdgeToConv))
1644  << ", |" << std::setw(10) << std::left << (rad2deg(highEdgeToConv))
1645  << " ) | 0x" << std::setw(6) << std::hex << std::left << convIndex
1646  << " | " << std::dec << std::setw(6) << convIndex << " |[ "
1647  << std::setw(10) << std::left << (rad2deg(convLowEdge)) << ", |"
1648  << std::setw(10) << std::left << (rad2deg(convHighEdge)) << " ) |"
1649  << std::right << std::endl;
1650  }
1651 
1652  //
1653  // eta conversions
1654  //
1655 
1656  // CenJet/TauJet & IsoEG/NoIsoEG to a common central / forward calorimeter eta
1657  // scale
1658 
1659  // force a page break before each group
1660  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1661 
1662  myCout << "\n---+++Eta conversion for central and tau jets and e-gamma "
1663  "objects to a common central and forward calorimeter eta scale \n"
1664  << std::endl;
1665 
1666  size_t lutEtaCentralToCommonCaloSize = m_lutEtaCentralToCommonCalo.size();
1667  myCout << "Size of look-up table = " << lutEtaCentralToCommonCaloSize << "\n"
1668  << std::endl;
1669 
1670  myCout << "| *Initial Eta Hardware Index* "
1671  << "|| *Initial Eta Range* ||"
1672  << " *Converted Eta Hardware Index* "
1673  << "|| *Converted Eta Range* ||"
1674  << "\n"
1675  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1676 
1677  for (unsigned int indexToConv = 0;
1678  indexToConv < lutEtaCentralToCommonCaloSize; ++indexToConv) {
1679 
1680  double lowEdgeToConv =
1682  m_l1CaloGeometry->etaBinCenter(indexToConv, true)));
1683  double highEdgeToConv = m_l1CaloGeometry->globalEtaBinLowEdge(
1685  m_l1CaloGeometry->etaBinCenter(indexToConv, true)) +
1686  1);
1687 
1688  unsigned int convIndex = m_lutEtaCentralToCommonCalo[indexToConv];
1689 
1690  double convLowEdge = 0.;
1691  double convHighEdge = 0.;
1692 
1693  if (convIndex != badIndex) {
1694  convLowEdge = m_l1CaloGeometry->globalEtaBinLowEdge(convIndex);
1695  convHighEdge = m_l1CaloGeometry->globalEtaBinLowEdge(convIndex + 1);
1696  } else {
1697  // badIndex means a bad initialIndex
1698  lowEdgeToConv = 0.;
1699  highEdgeToConv = 0.;
1700  }
1701 
1702  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv
1703  << " | " << std::dec << std::setw(3) << std::left << indexToConv
1704  << " |[ " << std::setw(10) << std::left << lowEdgeToConv << ", |"
1705  << std::setw(10) << std::left << highEdgeToConv << " ) | 0x"
1706  << std::setw(6) << std::hex << std::left << convIndex << " | "
1707  << std::dec << std::setw(6) << convIndex << " |[ " << std::setw(10)
1708  << std::left << convLowEdge << ", |" << std::setw(10) << std::left
1709  << convHighEdge << " ) |" << std::right << std::endl;
1710  }
1711 
1712  // ForJet to a common central / forward calorimeter eta scale
1713 
1714  // force a page break before each group
1715  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1716 
1717  myCout << "\n---+++Eta conversion for forward jets to a common central and "
1718  "forward calorimeter eta scale \n"
1719  << std::endl;
1720 
1721  size_t lutEtaForJetToCommonCaloSize = m_lutEtaForJetToCommonCalo.size();
1722  myCout << "Size of look-up table = " << lutEtaForJetToCommonCaloSize << "\n"
1723  << std::endl;
1724 
1725  myCout << "| *Initial Eta Hardware Index* "
1726  << "|| *Initial Eta Range* ||"
1727  << " *Converted Eta Hardware Index* "
1728  << "|| *Converted Eta Range* ||"
1729  << "\n"
1730  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1731 
1732  for (unsigned int indexToConv = 0; indexToConv < lutEtaForJetToCommonCaloSize;
1733  ++indexToConv) {
1734 
1735  double lowEdgeToConv =
1737  m_l1CaloGeometry->etaBinCenter(indexToConv, false)));
1738  double highEdgeToConv = m_l1CaloGeometry->globalEtaBinLowEdge(
1740  m_l1CaloGeometry->etaBinCenter(indexToConv, false)) +
1741  1);
1742 
1743  unsigned int convIndex = m_lutEtaForJetToCommonCalo[indexToConv];
1744 
1745  double convLowEdge = 0.;
1746  double convHighEdge = 0.;
1747 
1748  if (convIndex != badIndex) {
1749  convLowEdge = m_l1CaloGeometry->globalEtaBinLowEdge(convIndex);
1750  convHighEdge = m_l1CaloGeometry->globalEtaBinLowEdge(convIndex + 1);
1751  } else {
1752  // badIndex means a bad initialIndex
1753  lowEdgeToConv = 0.;
1754  highEdgeToConv = 0.;
1755  }
1756 
1757  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv
1758  << " | " << std::dec << std::setw(3) << std::left << indexToConv
1759  << " |[ " << std::setw(10) << std::left << lowEdgeToConv << ", |"
1760  << std::setw(10) << std::left << highEdgeToConv << " ) | 0x"
1761  << std::setw(6) << std::hex << std::left << convIndex << " | "
1762  << std::dec << std::setw(6) << convIndex << " |[ " << std::setw(10)
1763  << std::left << convLowEdge << ", |" << std::setw(10) << std::left
1764  << convHighEdge << " ) |" << std::right << std::endl;
1765  }
1766 
1767  // Mu to a common central / forward calorimeter eta scale
1768 
1769  // force a page break before each group
1770  myCout << "<p style=\"page-break-before: always\">&nbsp;</p>";
1771 
1772  myCout << "\n---+++Eta conversion for muons to a common central and forward "
1773  "calorimeter eta scale \n"
1774  << std::endl;
1775 
1776  size_t lutEtaMuToCommonCaloSize = m_lutEtaMuToCommonCalo.size();
1777  myCout << "Size of look-up table = " << lutEtaMuToCommonCaloSize << "\n"
1778  << std::endl;
1779 
1780  unsigned int nrBinsEtaMuPerHalf =
1782 
1783  myCout << "| *Initial Eta Hardware Index* "
1784  << "|| *Initial Eta Range* ||"
1785  << " *Converted Eta Hardware Index* "
1786  << "|| *Converted Eta Range* ||"
1787  << "\n"
1788  << "| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1789 
1790  for (unsigned int indexToConv = 0; indexToConv < lutEtaMuToCommonCaloSize;
1791  ++indexToConv) {
1792 
1793  // Mu scale defined for positive values only, need to be symmetrized
1794  unsigned int iBinOffset = 0;
1795  double etaSign = 1.;
1796 
1797  if (indexToConv > nrBinsEtaMuPerHalf) {
1798  iBinOffset = nrBinsEtaMuPerHalf + 1;
1799  etaSign = -1.;
1800  }
1801 
1802  double lowEdgeToConv =
1803  etaSign * m_l1MuTriggerScales->getGMTEtaScale()->getValue(indexToConv -
1804  iBinOffset);
1805  double highEdgeToConv =
1807  indexToConv + 1 - iBinOffset);
1808 
1809  unsigned int convIndex = m_lutEtaMuToCommonCalo[indexToConv];
1810 
1811  double convLowEdge = 0.;
1812  double convHighEdge = 0.;
1813 
1814  if (convIndex != badIndex) {
1815  convLowEdge = m_l1CaloGeometry->globalEtaBinLowEdge(convIndex);
1816  convHighEdge = m_l1CaloGeometry->globalEtaBinLowEdge(convIndex + 1);
1817  } else {
1818  // badIndex means a bad initialIndex
1819  lowEdgeToConv = 0.;
1820  highEdgeToConv = 0.;
1821  }
1822 
1823  myCout << "| 0x" << std::setw(3) << std::hex << std::left << indexToConv
1824  << " | " << std::dec << std::setw(3) << std::left << indexToConv
1825  << " |[ " << std::setw(10) << std::left << lowEdgeToConv << ", |"
1826  << std::setw(10) << std::left << highEdgeToConv << " ) | 0x"
1827  << std::setw(6) << std::hex << std::left << convIndex << " | "
1828  << std::dec << std::setw(6) << convIndex << " |[ " << std::setw(10)
1829  << std::left << convLowEdge << ", |" << std::setw(10) << std::left
1830  << convHighEdge << " ) |" << std::right << std::endl;
1831  }
1832 }
const L1CaloGeometry * m_l1CaloGeometry
pointer to calorimetry scales - updated in convertl1Scales method
double globalEtaBinLowEdge(unsigned int globalEtaIndex) const
const double rad2deg(const double &) const
convert phi from rad (-pi, pi] to deg (0, 360)
std::vector< unsigned int > m_lutEtaCentralToCommonCalo
double htSumPhiBinLowEdge(unsigned int phiIndex) const
std::vector< unsigned int > m_lutPhiMuToHtm
phi conversion for Mu to HTM
double etaBinCenter(unsigned int etaIndex, bool central=true) const
virtual float getHighEdge(unsigned packed) const =0
get the upper edge of bin represented by packed
std::vector< unsigned int > m_lutEtaForJetToCommonCalo
const L1MuScale * getPhiScale() const
get the phi scale
std::vector< unsigned int > m_lutPhiMuToEtm
phi conversion for Mu to ETM
static const unsigned int badIndex
virtual unsigned getNBins() const =0
get number of bins
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
double etSumPhiBinLowEdge(unsigned int phiIndex) const
std::vector< unsigned int > m_lutPhiEtmToHtm
phi conversion for ETM to HTM
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
const L1MuScale * getGMTEtaScale() const
get the GMT eta scale
double emJetPhiBinLowEdge(unsigned int phiIndex) const
double htSumPhiBinHighEdge(unsigned int phiIndex) 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
unsigned int globalEtaIndex(const double &etaValue) const
std::vector< unsigned int > m_lutPhiEtmToJetEg
phi conversion for ETM to (*Jet, EG)
virtual float getValue(unsigned i) const =0
get value of the underlying vector for bin i
double emJetPhiBinHighEdge(unsigned int phiIndex) const
double etSumPhiBinHighEdge(unsigned int phiIndex) const
const double L1GtEtaPhiConversions::rad2deg ( const double &  phiRad) const
private

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

Definition at line 1835 of file L1GtEtaPhiConversions.cc.

References badIndex, and PiConversion.

Referenced by print().

1835  {
1836 
1837  if (phiRad < 0.) {
1838  return (phiRad * PiConversion) + 360.;
1839  } else {
1840  return (phiRad * PiConversion);
1841  }
1842 }
static const double PiConversion
void L1GtEtaPhiConversions::setVerbosity ( const int  verbosity)
inline

Member Data Documentation

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 92 of file L1GtEtaPhiConversions.h.

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

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

vector of all L1GtObject pairs

Definition at line 102 of file L1GtEtaPhiConversions.h.

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

bool L1GtEtaPhiConversions::m_isDebugEnabled
private
const L1CaloGeometry* L1GtEtaPhiConversions::m_l1CaloGeometry
private

pointer to calorimetry scales - updated in convertl1Scales method

Definition at line 124 of file L1GtEtaPhiConversions.h.

Referenced by convertL1Scales(), and print().

const L1MuTriggerScales* L1GtEtaPhiConversions::m_l1MuTriggerScales
private

pointer to muon scales - updated in convertl1Scales method

Definition at line 127 of file L1GtEtaPhiConversions.h.

Referenced by convertL1Scales(), and print().

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

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

Definition at line 172 of file L1GtEtaPhiConversions.h.

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

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

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

Definition at line 176 of file L1GtEtaPhiConversions.h.

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

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

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

Definition at line 179 of file L1GtEtaPhiConversions.h.

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

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

phi conversion for ETM to HTM

Definition at line 159 of file L1GtEtaPhiConversions.h.

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

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

phi conversion for ETM to (*Jet, EG)

Definition at line 156 of file L1GtEtaPhiConversions.h.

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

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

phi conversion for HTM to (*Jet, EG)

Definition at line 162 of file L1GtEtaPhiConversions.h.

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

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 167 of file L1GtEtaPhiConversions.h.

Referenced by convertL1Scales(), and L1GtEtaPhiConversions().

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

phi conversion for Mu to ETM

Definition at line 150 of file L1GtEtaPhiConversions.h.

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

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

phi conversion for Mu to HTM

Definition at line 153 of file L1GtEtaPhiConversions.h.

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

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

phi conversion for Mu to (*Jet, EG)

Definition at line 147 of file L1GtEtaPhiConversions.h.

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

unsigned int L1GtEtaPhiConversions::m_nrBinsEtaCommon
private

number of eta bins for common scale

Definition at line 143 of file L1GtEtaPhiConversions.h.

Referenced by convertL1Scales().

unsigned int L1GtEtaPhiConversions::m_nrBinsPhiEtm
private

number of phi bins for ETM

Definition at line 137 of file L1GtEtaPhiConversions.h.

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

unsigned int L1GtEtaPhiConversions::m_nrBinsPhiHtm
private

number of phi bins for HTM

Definition at line 140 of file L1GtEtaPhiConversions.h.

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

unsigned int L1GtEtaPhiConversions::m_nrBinsPhiJetEg
private

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

Definition at line 134 of file L1GtEtaPhiConversions.h.

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

unsigned int L1GtEtaPhiConversions::m_nrBinsPhiMu
private

number of phi bins for muons

Definition at line 131 of file L1GtEtaPhiConversions.h.

Referenced by convertL1Scales(), and gtObjectNrBinsPhi().

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 108 of file L1GtEtaPhiConversions.h.

Referenced by convertPhiIndex(), and L1GtEtaPhiConversions().

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 114 of file L1GtEtaPhiConversions.h.

Referenced by gtObjectNrBinsPhi(), and L1GtEtaPhiConversions().

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 120 of file L1GtEtaPhiConversions.h.

Referenced by convertPhiIndex(), and L1GtEtaPhiConversions().

int L1GtEtaPhiConversions::m_verbosity
private

verbosity level

Definition at line 183 of file L1GtEtaPhiConversions.h.

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

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

Definition at line 95 of file L1GtEtaPhiConversions.h.

Referenced by rad2deg().