test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 return the number of phi bins for a pair of GT objects, according to conversion rules More...
 
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
 eta conversion of ForJet to the common calorimeter eta scale defined before More...
 
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.

38  :
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 
55  // Mu -> Jet & EG & ETM & HTM
56  //
57  gtObjPair = std::make_pair(Mu, CenJet);
58  m_gtObjectPairVec.push_back(gtObjPair);
59  m_pairConvertPhiFirstGtObject.push_back(true);
62 
63  gtObjPair = std::make_pair(CenJet, Mu);
64  m_gtObjectPairVec.push_back(gtObjPair);
65  m_pairConvertPhiFirstGtObject.push_back(false);
68 
69  //
70  gtObjPair = std::make_pair(Mu, ForJet);
71  m_gtObjectPairVec.push_back(gtObjPair);
72  m_pairConvertPhiFirstGtObject.push_back(true);
75 
76  gtObjPair = std::make_pair(ForJet, Mu);
77  m_gtObjectPairVec.push_back(gtObjPair);
78  m_pairConvertPhiFirstGtObject.push_back(false);
81 
82  //
83  gtObjPair = std::make_pair(Mu, TauJet);
84  m_gtObjectPairVec.push_back(gtObjPair);
85  m_pairConvertPhiFirstGtObject.push_back(true);
88 
89  gtObjPair = std::make_pair(TauJet, Mu);
90  m_gtObjectPairVec.push_back(gtObjPair);
91  m_pairConvertPhiFirstGtObject.push_back(false);
94 
95  //
96  gtObjPair = std::make_pair(Mu, NoIsoEG);
97  m_gtObjectPairVec.push_back(gtObjPair);
98  m_pairConvertPhiFirstGtObject.push_back(true);
101 
102  gtObjPair = std::make_pair(NoIsoEG, Mu);
103  m_gtObjectPairVec.push_back(gtObjPair);
104  m_pairConvertPhiFirstGtObject.push_back(false);
107 
108  //
109  gtObjPair = std::make_pair(Mu, IsoEG);
110  m_gtObjectPairVec.push_back(gtObjPair);
111  m_pairConvertPhiFirstGtObject.push_back(true);
114 
115  gtObjPair = std::make_pair(IsoEG, Mu);
116  m_gtObjectPairVec.push_back(gtObjPair);
117  m_pairConvertPhiFirstGtObject.push_back(false);
120 
121  //
122  gtObjPair = std::make_pair(Mu, ETM);
123  m_gtObjectPairVec.push_back(gtObjPair);
124  m_pairConvertPhiFirstGtObject.push_back(true);
126  m_pairPhiConvVec.push_back(&m_lutPhiMuToEtm);
127 
128  gtObjPair = std::make_pair(ETM, Mu);
129  m_gtObjectPairVec.push_back(gtObjPair);
130  m_pairConvertPhiFirstGtObject.push_back(false);
132  m_pairPhiConvVec.push_back(&m_lutPhiMuToEtm);
133 
134  //
135  gtObjPair = std::make_pair(Mu, HTM);
136  m_gtObjectPairVec.push_back(gtObjPair);
137  m_pairConvertPhiFirstGtObject.push_back(true);
139  m_pairPhiConvVec.push_back(&m_lutPhiMuToHtm);
140 
141  gtObjPair = std::make_pair(HTM, Mu);
142  m_gtObjectPairVec.push_back(gtObjPair);
143  m_pairConvertPhiFirstGtObject.push_back(false);
145  m_pairPhiConvVec.push_back(&m_lutPhiMuToHtm);
146 
147  // ETM -> Jet & EG
148  //
149  gtObjPair = std::make_pair(ETM, CenJet);
150  m_gtObjectPairVec.push_back(gtObjPair);
151  m_pairConvertPhiFirstGtObject.push_back(true);
154 
155  gtObjPair = std::make_pair(CenJet, ETM);
156  m_gtObjectPairVec.push_back(gtObjPair);
157  m_pairConvertPhiFirstGtObject.push_back(false);
160 
161  //
162  gtObjPair = std::make_pair(ETM, ForJet);
163  m_gtObjectPairVec.push_back(gtObjPair);
164  m_pairConvertPhiFirstGtObject.push_back(true);
167 
168  gtObjPair = std::make_pair(ForJet, ETM);
169  m_gtObjectPairVec.push_back(gtObjPair);
170  m_pairConvertPhiFirstGtObject.push_back(false);
173 
174  //
175  gtObjPair = std::make_pair(ETM, TauJet);
176  m_gtObjectPairVec.push_back(gtObjPair);
177  m_pairConvertPhiFirstGtObject.push_back(true);
180 
181  gtObjPair = std::make_pair(TauJet, ETM);
182  m_gtObjectPairVec.push_back(gtObjPair);
183  m_pairConvertPhiFirstGtObject.push_back(false);
186 
187  //
188  gtObjPair = std::make_pair(ETM, NoIsoEG);
189  m_gtObjectPairVec.push_back(gtObjPair);
190  m_pairConvertPhiFirstGtObject.push_back(true);
193 
194  gtObjPair = std::make_pair(NoIsoEG, ETM);
195  m_gtObjectPairVec.push_back(gtObjPair);
196  m_pairConvertPhiFirstGtObject.push_back(false);
199 
200  //
201  gtObjPair = std::make_pair(ETM, IsoEG);
202  m_gtObjectPairVec.push_back(gtObjPair);
203  m_pairConvertPhiFirstGtObject.push_back(true);
206 
207  gtObjPair = std::make_pair(IsoEG, ETM);
208  m_gtObjectPairVec.push_back(gtObjPair);
209  m_pairConvertPhiFirstGtObject.push_back(false);
212 
213  // HTM -> Jet & EG
214  //
215  gtObjPair = std::make_pair(HTM, CenJet);
216  m_gtObjectPairVec.push_back(gtObjPair);
217  m_pairConvertPhiFirstGtObject.push_back(true);
220 
221  gtObjPair = std::make_pair(CenJet, HTM);
222  m_gtObjectPairVec.push_back(gtObjPair);
223  m_pairConvertPhiFirstGtObject.push_back(false);
226 
227  //
228  gtObjPair = std::make_pair(HTM, ForJet);
229  m_gtObjectPairVec.push_back(gtObjPair);
230  m_pairConvertPhiFirstGtObject.push_back(true);
233 
234  gtObjPair = std::make_pair(ForJet, HTM);
235  m_gtObjectPairVec.push_back(gtObjPair);
236  m_pairConvertPhiFirstGtObject.push_back(false);
239 
240  //
241  gtObjPair = std::make_pair(HTM, TauJet);
242  m_gtObjectPairVec.push_back(gtObjPair);
243  m_pairConvertPhiFirstGtObject.push_back(true);
246 
247  gtObjPair = std::make_pair(TauJet, HTM);
248  m_gtObjectPairVec.push_back(gtObjPair);
249  m_pairConvertPhiFirstGtObject.push_back(false);
252 
253  //
254  gtObjPair = std::make_pair(HTM, NoIsoEG);
255  m_gtObjectPairVec.push_back(gtObjPair);
257  m_pairConvertPhiFirstGtObject.push_back(true);
259 
260  gtObjPair = std::make_pair(NoIsoEG, HTM);
261  m_gtObjectPairVec.push_back(gtObjPair);
262  m_pairConvertPhiFirstGtObject.push_back(false);
265 
266  //
267  gtObjPair = std::make_pair(HTM, IsoEG);
268  m_gtObjectPairVec.push_back(gtObjPair);
269  m_pairConvertPhiFirstGtObject.push_back(true);
272 
273  gtObjPair = std::make_pair(IsoEG, HTM);
274  m_gtObjectPairVec.push_back(gtObjPair);
275  m_pairConvertPhiFirstGtObject.push_back(false);
278 
279 
280  // ETM -> HTM
281  //
282  gtObjPair = std::make_pair(ETM, HTM);
283  m_gtObjectPairVec.push_back(gtObjPair);
284  m_pairConvertPhiFirstGtObject.push_back(true);
287 
288  gtObjPair = std::make_pair(HTM, ETM);
289  m_gtObjectPairVec.push_back(gtObjPair);
290  m_pairConvertPhiFirstGtObject.push_back(false);
293 
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: "
430  << (m_gtObjectPairVec.size()) << std::endl;
431 
432  unsigned int iPair = 0;
433 
434  for (std::vector<std::pair<L1GtObject, L1GtObject> >::const_iterator
435  cIter = m_gtObjectPairVec.begin();
436  cIter != m_gtObjectPairVec.end(); ++cIter) {
437  LogTrace("L1GlobalTrigger") << "m_gtObjectPairVec vector element ["
438  << l1GtObjectEnumToString((*cIter).first) << ", "
439  << l1GtObjectEnumToString((*cIter).second)
440  << "], \t\tpair index = " << iPair << std::endl;
441 
442  iPair++;
443 
444  }
445  }
446 
447 }
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< const std::vector< unsigned int > * > m_pairPhiConvVec
std::vector< const unsigned int * > m_pairNrPhiBinsVec
std::vector< bool > m_pairConvertPhiFirstGtObject
Definition: L1GtObject.h:36
unsigned int m_nrBinsPhiEtm
number of phi bins for ETM
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
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 450 of file L1GtEtaPhiConversions.cc.

450  {
451 
452  // do nothing
453 
454 }

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

639  {
640 
641  unsigned int newIndex = badIndex;
642  bool conversionStatus = false;
643 
644  switch (gtObject) {
645 
646  case Mu: {
647 
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_lutEtaMuToCommonCalo.size()) {
652 
653  conversionStatus = false;
654 
655  if (m_verbosity && m_isDebugEnabled) {
656  LogTrace("L1GlobalTrigger") << " L1 GT object "
657  << (l1GtObjectEnumToString(gtObject))
658  << " has initial eta index " << initialIndex
659  << " >= " << (m_lutEtaMuToCommonCalo.size())
660  << " scale size. Conversion failed." << std::endl;
661  }
662  } else {
663 
664  // convert the index
665  newIndex = m_lutEtaMuToCommonCalo[initialIndex];
666 
667  if (newIndex != badIndex) {
668 
669  conversionStatus = true;
670 
671  if (m_verbosity && m_isDebugEnabled) {
672  LogTrace("L1GlobalTrigger") << " L1 GT object "
673  << (l1GtObjectEnumToString(gtObject))
674  << " initial eta index " << initialIndex
675  << " (within scale size "
676  << (m_lutEtaMuToCommonCalo.size())
677  << ") converted to " << newIndex << std::endl;
678  }
679 
680  } else {
681 
682  conversionStatus = false;
683 
684  if (m_verbosity && m_isDebugEnabled) {
685  LogTrace("L1GlobalTrigger") << " L1 GT object "
686  << (l1GtObjectEnumToString(gtObject))
687  << " initial eta index " << initialIndex
688  << " (within scale size "
689  << (m_lutEtaMuToCommonCalo.size())
690  << ") converted to badIndex" << newIndex
691  << " Conversion failed." << std::endl;
692  }
693  }
694 
695  }
696 
697  }
698  break;
699 
700  case NoIsoEG:
701  case IsoEG:
702  case CenJet:
703  case TauJet: {
704 
705  // check if initial index is within the scale size
706  // could be outside the scale size if there are hardware errors
707  // or wrong scale conversions
708  if (initialIndex >= m_lutEtaCentralToCommonCalo.size()) {
709 
710  conversionStatus = false;
711 
712  if (m_verbosity && m_isDebugEnabled) {
713  LogTrace("L1GlobalTrigger") << " L1 GT object "
714  << (l1GtObjectEnumToString(gtObject))
715  << " has initial eta index " << initialIndex
716  << " >= " << (m_lutEtaCentralToCommonCalo.size())
717  << " scale size. Conversion failed." << std::endl;
718  }
719  } else {
720 
721  // convert the index
722  newIndex = m_lutEtaCentralToCommonCalo[initialIndex];
723 
724  if (newIndex != badIndex) {
725 
726  conversionStatus = true;
727 
728  if (m_verbosity && m_isDebugEnabled) {
729  LogTrace("L1GlobalTrigger") << " L1 GT object "
730  << (l1GtObjectEnumToString(gtObject))
731  << " initial eta index " << initialIndex
732  << " (within scale size "
733  << (m_lutEtaMuToCommonCalo.size())
734  << ") converted to " << newIndex << std::endl;
735  }
736 
737  } else {
738 
739  conversionStatus = false;
740 
741  if (m_verbosity && m_isDebugEnabled) {
742  LogTrace("L1GlobalTrigger") << " L1 GT object "
743  << (l1GtObjectEnumToString(gtObject))
744  << " initial eta index " << initialIndex
745  << " (within scale size "
746  << (m_lutEtaCentralToCommonCalo.size())
747  << ") converted to badIndex" << newIndex
748  << " Conversion failed." << std::endl;
749  }
750  }
751 
752  }
753 
754  }
755  break;
756 
757  case ForJet: {
758 
759  // check if initial index is within the scale size
760  // could be outside the scale size if there are hardware errors
761  // or wrong scale conversions
762  if (initialIndex >= m_lutEtaForJetToCommonCalo.size()) {
763 
764  conversionStatus = false;
765 
766  if (m_verbosity && m_isDebugEnabled) {
767  LogTrace("L1GlobalTrigger") << " L1 GT object "
768  << (l1GtObjectEnumToString(gtObject))
769  << " has initial eta index " << initialIndex
770  << " >= " << (m_lutEtaForJetToCommonCalo.size())
771  << " scale size. Conversion failed." << std::endl;
772  }
773  } else {
774 
775  // convert the index
776  newIndex = m_lutEtaForJetToCommonCalo[initialIndex];
777 
778  if (newIndex != badIndex) {
779 
780  conversionStatus = true;
781 
782  if (m_verbosity && m_isDebugEnabled) {
783  LogTrace("L1GlobalTrigger") << " L1 GT object "
784  << (l1GtObjectEnumToString(gtObject))
785  << " initial eta index " << initialIndex
786  << " (within scale size "
787  << (m_lutEtaMuToCommonCalo.size())
788  << ") converted to " << newIndex << std::endl;
789  }
790 
791  } else {
792 
793  conversionStatus = false;
794 
795  if (m_verbosity && m_isDebugEnabled) {
796  LogTrace("L1GlobalTrigger") << " L1 GT object "
797  << (l1GtObjectEnumToString(gtObject))
798  << " initial eta index " << initialIndex
799  << " (within scale size "
800  << (m_lutEtaForJetToCommonCalo.size())
801  << ") converted to badIndex" << newIndex
802  << " Conversion failed." << std::endl;
803  }
804  }
805 
806  }
807  }
808  break;
809 
810  case ETM:
811  case ETT:
812  case HTT:
813  case HTM:
814  case JetCounts:
815  case HfBitCounts:
816  case HfRingEtSums:
817  case TechTrig:
818  case Castor:
819  case BPTX:
820  case GtExternal:
821  case ObjNull: {
822 
823  //no conversions needed, there is no eta quantity for these objects
824  conversionStatus = false;
825  }
826  break;
827 
828  default: {
829  edm::LogInfo("L1GtObject") << "\n '" << (l1GtObjectEnumToString(
830  gtObject)) << "' is not a recognized L1GtObject. "
831  << "\n Conversion failed. " << std::endl;
832  conversionStatus = false;
833  }
834  break;
835  }
836 
837  //
838  convertedIndex = newIndex;
839 
840  return conversionStatus;
841 
842 }
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
eta conversion of ForJet to the common calorimeter eta scale defined before
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 948 of file L1GtEtaPhiConversions.cc.

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

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

References badIndex, edm::hlt::Exception, LogTrace, m_isDebugEnabled, m_pairConvertPhiFirstGtObject, m_pairPhiConvVec, and m_verbosity.

Referenced by L1GtCorrelationCondition::evaluateCondition().

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

845  {
846 
847  switch (gtObject) {
848 
849  case Mu: {
850  return m_nrBinsPhiMu;
851  }
852  break;
853 
854  case NoIsoEG:
855  case IsoEG:
856  case CenJet:
857  case ForJet:
858  case TauJet: {
859  return m_nrBinsPhiJetEg;
860  }
861  break;
862 
863  case ETM: {
864  return m_nrBinsPhiEtm;
865  }
866  break;
867 
868  case ETT:
869  case HTT: {
870  return 0;
871  }
872  break;
873 
874  case HTM: {
875  return m_nrBinsPhiHtm;
876  }
877  break;
878 
879  case JetCounts:
880  case HfBitCounts:
881  case HfRingEtSums:
882  case TechTrig:
883  case Castor:
884  case BPTX:
885  case GtExternal:
886  case ObjNull: {
887  return 0;
888  }
889  break;
890 
891  default: {
892  edm::LogInfo("L1GtObject") << "\n '"
893  << (l1GtObjectEnumToString(gtObject))
894  << "' is not a recognized L1GtObject. "
895  << "\n Return 0 bins.";
896  return 0;
897  }
898  break;
899  }
900 
901 }
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 903 of file L1GtEtaPhiConversions.cc.

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

904  {
905 
906  std::pair < L1GtObject, L1GtObject > gtObjPair;
907  gtObjPair = std::make_pair(obj0, obj1);
908 
909  //LogTrace("L1GlobalTrigger") << "\nCompute gtObjectNrBinsPhi ["
910  // << (l1GtObjectEnumToString(obj0)) << ", "
911  // << (l1GtObjectEnumToString(obj1)) << "]\n" << std::endl;
912 
913  int iPair = 0;
914  for (std::vector<std::pair<L1GtObject, L1GtObject> >::const_iterator cIter =
915  m_gtObjectPairVec.begin(); cIter != m_gtObjectPairVec.end(); ++cIter) {
916 
917  if (*cIter == gtObjPair) {
918  LogTrace("L1GlobalTrigger") << "\n gtObjectNrBinsPhi ["
919  << l1GtObjectEnumToString(obj0) << ", "
920  << l1GtObjectEnumToString(obj1) << "] = "
921  << (*(m_pairNrPhiBinsVec.at(iPair))) << std::endl;
922 
923  return *(m_pairNrPhiBinsVec.at(iPair));
924  }
925 
926  iPair++;
927  }
928 
929  return 0;
930 }
std::vector< const unsigned int * > m_pairNrPhiBinsVec
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
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 932 of file L1GtEtaPhiConversions.cc.

References LogTrace, m_isDebugEnabled, m_pairNrPhiBinsVec, and m_verbosity.

933  {
934 
935  if (m_verbosity && m_isDebugEnabled) {
936  LogTrace("L1GlobalTrigger")
937  << "\n gtObjectNrBinsPhi for L1 GT object pair index "
938  << pairIndex << " = " << (*(m_pairNrPhiBinsVec.at(pairIndex)))
939  << std::endl;
940  }
941 
942  return *(m_pairNrPhiBinsVec.at(pairIndex));
943 }
std::vector< const unsigned int * > m_pairNrPhiBinsVec
int m_verbosity
verbosity level
#define LogTrace(id)
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 458 of file L1GtEtaPhiConversions.cc.

References l1GtObjectEnumToString(), LogTrace, and m_gtObjectPairVec.

Referenced by L1GtCorrelationCondition::evaluateCondition().

459  {
460 
461  std::pair < L1GtObject, L1GtObject > gtObjPair;
462  gtObjPair = std::make_pair(obj0, obj1);
463 
464  //LogTrace("L1GlobalTrigger") << "\nCompute index for pair ["
465  // << (l1GtObjectEnumToString(obj0)) << ", "
466  // << (l1GtObjectEnumToString(obj1)) << "]\n" << std::endl;
467 
468  unsigned int iPair = 0;
469  for (std::vector<std::pair<L1GtObject, L1GtObject> >::const_iterator cIter =
470  m_gtObjectPairVec.begin(); cIter != m_gtObjectPairVec.end(); ++cIter) {
471 
472  if (*cIter == gtObjPair) {
473  LogTrace("L1GlobalTrigger") << "\n Index for pair ["
474  << l1GtObjectEnumToString(obj0) << ", "
475  << l1GtObjectEnumToString(obj1) << "] = "
476  << iPair << std::endl;
477 
478  return iPair;
479  }
480 
481  iPair++;
482  }
483 
484  // if the pair was not found, return index outside vector size
485  // it should never happen, except due to programming error
486  // by using .at one gets an exception when using index outside vector size,
487  // due to the programming error...
488  return m_gtObjectPairVec.size();
489 }
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 1380 of file L1GtEtaPhiConversions.cc.

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

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

References PiConversion.

Referenced by print().

1908  {
1909 
1910  if (phiRad < 0.) {
1911  return (phiRad * PiConversion) + 360.;
1912  } else {
1913  return (phiRad * PiConversion);
1914  }
1915 }
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 98 of file L1GtEtaPhiConversions.h.

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

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

vector of all L1GtObject pairs

Definition at line 110 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 132 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 135 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 183 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 186 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 189 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 169 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 166 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 172 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 177 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 160 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 163 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 157 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 152 of file L1GtEtaPhiConversions.h.

Referenced by convertL1Scales().

unsigned int L1GtEtaPhiConversions::m_nrBinsPhiEtm
private

number of phi bins for ETM

Definition at line 146 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 149 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 143 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 140 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 115 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 121 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 127 of file L1GtEtaPhiConversions.h.

Referenced by convertPhiIndex(), and L1GtEtaPhiConversions().

int L1GtEtaPhiConversions::m_verbosity
private

verbosity level

Definition at line 194 of file L1GtEtaPhiConversions.h.

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

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

Definition at line 101 of file L1GtEtaPhiConversions.h.

Referenced by rad2deg().