CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
L1CaloGeometry Class Reference

#include <L1TriggerConfig/L1Geometry/interface/L1CaloGeometry.h>

Public Types

enum  Versions { kOrig, kAddedMHTPhi, kNumVersions }
 

Public Member Functions

double emJetPhiBinCenter (unsigned int phiIndex) const
 
double emJetPhiBinCenter (const L1CaloRegionDetId &detId) const
 
double emJetPhiBinHighEdge (unsigned int phiIndex) const
 
double emJetPhiBinHighEdge (const L1CaloRegionDetId &detId) const
 
double emJetPhiBinLowEdge (unsigned int phiIndex) const
 
double emJetPhiBinLowEdge (const L1CaloRegionDetId &detId) const
 
unsigned int emJetPhiIndex (const double &phiValue) const
 
double etaBinCenter (unsigned int etaIndex, bool central=true) const
 
double etaBinCenter (const L1CaloRegionDetId &detId) const
 
double etaBinHighEdge (unsigned int etaIndex, bool central=true) const
 
double etaBinHighEdge (const L1CaloRegionDetId &detId) const
 
double etaBinLowEdge (unsigned int etaIndex, bool central=true) const
 
double etaBinLowEdge (const L1CaloRegionDetId &detId) const
 
unsigned int etaIndex (const double &etaValue) const
 
unsigned int etaSignBitOffset () const
 
double etSumPhiBinCenter (unsigned int phiIndex) const
 
double etSumPhiBinHighEdge (unsigned int phiIndex) const
 
double etSumPhiBinLowEdge (unsigned int phiIndex) const
 
unsigned int etSumPhiIndex (const double &phiValue) const
 
double globalEtaBinCenter (unsigned int globalEtaIndex) const
 
double globalEtaBinHighEdge (unsigned int globalEtaIndex) const
 
double globalEtaBinLowEdge (unsigned int globalEtaIndex) const
 
unsigned int globalEtaIndex (const double &etaValue) const
 
double htSumPhiBinCenter (unsigned int phiIndex) const
 
double htSumPhiBinHighEdge (unsigned int phiIndex) const
 
double htSumPhiBinLowEdge (unsigned int phiIndex) const
 
unsigned int htSumPhiIndex (const double &phiValue) const
 
 L1CaloGeometry ()
 
 L1CaloGeometry (unsigned int numberGctEmJetPhiBins, double gctEmJetPhiBinOffset, unsigned int numberGctEtSumPhiBins, double gctEtSumPhiBinOffset, unsigned int numberGctHtSumPhiBins, double gctHtSumPhiBinOffset, unsigned int numberGctCentralEtaBinsPerHalf, unsigned int numberGctForwardEtaBinsPerHalf, unsigned int etaSignBitOffset, const std::vector< double > &gctEtaBinBoundaries)
 
unsigned int numberGctCentralEtaBinsPerHalf () const
 
unsigned int numberGctEmJetPhiBins () const
 
unsigned int numberGctEtSumPhiBins () const
 
unsigned int numberGctForwardEtaBinsPerHalf () const
 
unsigned int numberGctHtSumPhiBins () const
 
unsigned int version () const
 
virtual ~L1CaloGeometry ()
 

Private Attributes

unsigned int m_etaBinsPerHalf
 
unsigned int m_etaSignBitOffset
 
double m_gctEmJetPhiBinWidth
 
double m_gctEmJetPhiOffset
 
std::vector< double > m_gctEtaBinBoundaries
 
double m_gctEtSumPhiBinWidth
 
double m_gctEtSumPhiOffset
 
double m_gctHtSumPhiBinWidth
 
double m_gctHtSumPhiOffset
 
unsigned int m_numberGctCentralEtaBinsPerHalf
 
unsigned int m_numberGctEmJetPhiBins
 
unsigned int m_numberGctEtSumPhiBins
 
unsigned int m_numberGctForwardEtaBinsPerHalf
 
unsigned int m_numberGctHtSumPhiBins
 
unsigned int m_version
 

Detailed Description

Description: <one line="" class="" summary>="">

Usage: <usage>

Definition at line 31 of file L1CaloGeometry.h.

Member Enumeration Documentation

Enumerator
kOrig 
kAddedMHTPhi 
kNumVersions 

Definition at line 43 of file L1CaloGeometry.h.

Constructor & Destructor Documentation

L1CaloGeometry::L1CaloGeometry ( )

Definition at line 56 of file L1CaloGeometry.cc.

57  : m_version( kOrig ), // if version is not in CondDB, set it to kOrig
63  m_etaSignBitOffset( 0 ),
65  m_etaBinsPerHalf( 0 ),
69  m_gctEmJetPhiOffset( 0. ),
70  m_gctEtSumPhiOffset( 0. ),
72 {
73 }
unsigned int m_numberGctEtSumPhiBins
double m_gctEmJetPhiBinWidth
double m_gctEtSumPhiOffset
double m_gctHtSumPhiOffset
unsigned int m_numberGctCentralEtaBinsPerHalf
std::vector< double > m_gctEtaBinBoundaries
unsigned int m_version
unsigned int m_numberGctEmJetPhiBins
double m_gctEmJetPhiOffset
double m_gctHtSumPhiBinWidth
double m_gctEtSumPhiBinWidth
unsigned int m_etaSignBitOffset
unsigned int m_etaBinsPerHalf
unsigned int m_numberGctHtSumPhiBins
unsigned int m_numberGctForwardEtaBinsPerHalf
L1CaloGeometry::L1CaloGeometry ( unsigned int  numberGctEmJetPhiBins,
double  gctEmJetPhiBinOffset,
unsigned int  numberGctEtSumPhiBins,
double  gctEtSumPhiBinOffset,
unsigned int  numberGctHtSumPhiBins,
double  gctHtSumPhiBinOffset,
unsigned int  numberGctCentralEtaBinsPerHalf,
unsigned int  numberGctForwardEtaBinsPerHalf,
unsigned int  etaSignBitOffset,
const std::vector< double > &  gctEtaBinBoundaries 
)

Definition at line 75 of file L1CaloGeometry.cc.

References m_etaBinsPerHalf, m_gctEmJetPhiBinWidth, m_gctEmJetPhiOffset, m_gctEtSumPhiBinWidth, m_gctEtSumPhiOffset, m_gctHtSumPhiBinWidth, m_gctHtSumPhiOffset, m_numberGctCentralEtaBinsPerHalf, m_numberGctEmJetPhiBins, m_numberGctEtSumPhiBins, m_numberGctForwardEtaBinsPerHalf, m_numberGctHtSumPhiBins, and M_PI.

92  m_gctEtaBinBoundaries( gctEtaBinBoundaries )
93 {
96 
100 
101  m_gctEmJetPhiOffset = gctEmJetPhiBinOffset * m_gctEmJetPhiBinWidth ;
102  m_gctEtSumPhiOffset = gctEtSumPhiBinOffset * m_gctEtSumPhiBinWidth ;
103  m_gctHtSumPhiOffset = gctHtSumPhiBinOffset * m_gctHtSumPhiBinWidth ;
104 }
unsigned int numberGctForwardEtaBinsPerHalf() const
unsigned int numberGctHtSumPhiBins() const
unsigned int numberGctEtSumPhiBins() const
unsigned int m_numberGctEtSumPhiBins
double m_gctEmJetPhiBinWidth
unsigned int numberGctEmJetPhiBins() const
double m_gctEtSumPhiOffset
unsigned int numberGctCentralEtaBinsPerHalf() const
double m_gctHtSumPhiOffset
unsigned int m_numberGctCentralEtaBinsPerHalf
std::vector< double > m_gctEtaBinBoundaries
unsigned int m_version
unsigned int m_numberGctEmJetPhiBins
double m_gctEmJetPhiOffset
double m_gctHtSumPhiBinWidth
double m_gctEtSumPhiBinWidth
#define M_PI
Definition: BFit3D.cc:3
unsigned int m_etaSignBitOffset
unsigned int m_etaBinsPerHalf
unsigned int m_numberGctHtSumPhiBins
unsigned int etaSignBitOffset() const
unsigned int m_numberGctForwardEtaBinsPerHalf
L1CaloGeometry::~L1CaloGeometry ( )
virtual

Definition at line 111 of file L1CaloGeometry.cc.

112 {
113 }

Member Function Documentation

double L1CaloGeometry::emJetPhiBinCenter ( unsigned int  phiIndex) const

Definition at line 274 of file L1CaloGeometry.cc.

References m_gctEmJetPhiBinWidth, and m_gctEmJetPhiOffset.

Referenced by emJetPhiBinCenter(), L1ExtraParticlesProd::gctLorentzVector(), and operator<<().

275 {
276  return ( ( double ) phiIndex + 0.5 ) * m_gctEmJetPhiBinWidth +
278 }
double m_gctEmJetPhiBinWidth
double m_gctEmJetPhiOffset
double L1CaloGeometry::emJetPhiBinCenter ( const L1CaloRegionDetId detId) const
inline

Definition at line 88 of file L1CaloGeometry.h.

References emJetPhiBinCenter(), and L1CaloRegionDetId::iphi().

89  { return emJetPhiBinCenter( detId.iphi() ) ; }
unsigned iphi() const
global phi index (0-17)
double emJetPhiBinCenter(unsigned int phiIndex) const
double L1CaloGeometry::emJetPhiBinHighEdge ( unsigned int  phiIndex) const
double L1CaloGeometry::emJetPhiBinHighEdge ( const L1CaloRegionDetId detId) const
inline

Definition at line 92 of file L1CaloGeometry.h.

References emJetPhiBinHighEdge(), and L1CaloRegionDetId::iphi().

93  { return emJetPhiBinHighEdge( detId.iphi() ) ; }
unsigned iphi() const
global phi index (0-17)
double emJetPhiBinHighEdge(unsigned int phiIndex) const
double L1CaloGeometry::emJetPhiBinLowEdge ( unsigned int  phiIndex) const
double L1CaloGeometry::emJetPhiBinLowEdge ( const L1CaloRegionDetId detId) const
inline

Definition at line 90 of file L1CaloGeometry.h.

References emJetPhiBinLowEdge(), and L1CaloRegionDetId::iphi().

91  { return emJetPhiBinLowEdge( detId.iphi() ) ; }
unsigned iphi() const
global phi index (0-17)
double emJetPhiBinLowEdge(unsigned int phiIndex) const
unsigned int L1CaloGeometry::emJetPhiIndex ( const double &  phiValue) const

Definition at line 420 of file L1CaloGeometry.cc.

References m_gctEmJetPhiBinWidth, m_gctEmJetPhiOffset, and M_PI.

421 {
422  double phiAdjusted = phiValue - m_gctEmJetPhiOffset ;
423 
424  // Check phiValue is between m_gctEmJetPhiOffset and m_gctEmJetPhiOffset+2pi
425  if( phiAdjusted < 0. )
426  {
427  do
428  {
429  phiAdjusted += 2. * M_PI ;
430  }
431  while( phiAdjusted < 0. ) ;
432  }
433  else if( phiAdjusted > 2. * M_PI )
434  {
435  do
436  {
437  phiAdjusted -= 2. * M_PI ;
438  }
439  while( phiAdjusted > 2. * M_PI ) ;
440  }
441 
442  return ( ( int ) ( phiAdjusted / m_gctEmJetPhiBinWidth ) ) ;
443 }
double m_gctEmJetPhiBinWidth
double m_gctEmJetPhiOffset
#define M_PI
Definition: BFit3D.cc:3
double L1CaloGeometry::etaBinCenter ( unsigned int  etaIndex,
bool  central = true 
) const

Definition at line 196 of file L1CaloGeometry.cc.

References etaIndex(), m_etaSignBitOffset, m_gctEtaBinBoundaries, and m_numberGctCentralEtaBinsPerHalf.

Referenced by L1GtEtaPhiConversions::convertL1Scales(), L1GctConfigProducers::etToEnergyConversion(), L1ExtraParticlesProd::gctLorentzVector(), operator<<(), and L1GtEtaPhiConversions::print().

198 {
199  // Central/tau jets and EM have etaIndex = 0-6 for eta = 0-3.
200  // Forward jets have etaIndex = 0-3 for eta = 3-5.
201  double etaSign = 1. ;
202 
203  // Check sign BEFORE shifting forward jet bin index.
205  {
206  etaSign = -1. ;
208  }
209 
210  // Shift forward jet bin index AFTER checking sign bit.
211  if( !central )
212  {
214  }
215 
216  return 0.5 * etaSign *
219 }
unsigned int m_numberGctCentralEtaBinsPerHalf
std::vector< double > m_gctEtaBinBoundaries
unsigned int m_etaSignBitOffset
unsigned int etaIndex(const double &etaValue) const
double L1CaloGeometry::etaBinCenter ( const L1CaloRegionDetId detId) const
inline

Definition at line 77 of file L1CaloGeometry.h.

References globalEtaBinCenter(), and L1CaloRegionDetId::ieta().

78  { return globalEtaBinCenter( detId.ieta() ) ; }
unsigned ieta() const
global eta index (0-21)
double globalEtaBinCenter(unsigned int globalEtaIndex) const
double L1CaloGeometry::etaBinHighEdge ( unsigned int  etaIndex,
bool  central = true 
) const

Definition at line 248 of file L1CaloGeometry.cc.

References m_etaSignBitOffset, m_gctEtaBinBoundaries, and m_numberGctCentralEtaBinsPerHalf.

Referenced by operator<<().

250 {
251  // Central/tau jets and EM have etaIndex = 0-6 for eta = 0-3.
252  // Forward jets have etaIndex = 0-3 for eta = 3-5.
253  double etaSign = 1. ;
254 
255  // Check sign BEFORE shifting forward jet bin index.
257  {
258  etaSign = -1. ;
260  }
261 
262  // Shift forward jet bin index AFTER checking sign bit.
263  if( !central )
264  {
266  }
267 
268  return ( etaSign > 0. ?
271 }
unsigned int m_numberGctCentralEtaBinsPerHalf
std::vector< double > m_gctEtaBinBoundaries
unsigned int m_etaSignBitOffset
unsigned int etaIndex(const double &etaValue) const
double L1CaloGeometry::etaBinHighEdge ( const L1CaloRegionDetId detId) const
inline

Definition at line 81 of file L1CaloGeometry.h.

References globalEtaBinHighEdge(), and L1CaloRegionDetId::ieta().

82  { return globalEtaBinHighEdge( detId.ieta() ) ; }
unsigned ieta() const
global eta index (0-21)
double globalEtaBinHighEdge(unsigned int globalEtaIndex) const
double L1CaloGeometry::etaBinLowEdge ( unsigned int  etaIndex,
bool  central = true 
) const

Definition at line 222 of file L1CaloGeometry.cc.

References m_etaSignBitOffset, m_gctEtaBinBoundaries, and m_numberGctCentralEtaBinsPerHalf.

Referenced by operator<<().

224 {
225  // Central/tau jets and EM have etaIndex = 0-6 for eta = 0-3.
226  // Forward jets have etaIndex = 0-3 for eta = 3-5.
227  double etaSign = 1. ;
228 
229  // Check sign BEFORE shifting forward jet bin index.
231  {
232  etaSign = -1. ;
234  }
235 
236  // Shift forward jet bin index AFTER checking sign bit.
237  if( !central )
238  {
240  }
241 
242  return ( etaSign > 0. ?
244  -m_gctEtaBinBoundaries[ etaIndex + 1 ] ) ;
245 }
unsigned int m_numberGctCentralEtaBinsPerHalf
std::vector< double > m_gctEtaBinBoundaries
unsigned int m_etaSignBitOffset
unsigned int etaIndex(const double &etaValue) const
double L1CaloGeometry::etaBinLowEdge ( const L1CaloRegionDetId detId) const
inline

Definition at line 79 of file L1CaloGeometry.h.

References globalEtaBinLowEdge(), and L1CaloRegionDetId::ieta().

80  { return globalEtaBinLowEdge( detId.ieta() ) ; }
double globalEtaBinLowEdge(unsigned int globalEtaIndex) const
unsigned ieta() const
global eta index (0-21)
unsigned int L1CaloGeometry::etaIndex ( const double &  etaValue) const

Definition at line 361 of file L1CaloGeometry.cc.

References i, m_etaSignBitOffset, m_gctEtaBinBoundaries, m_numberGctCentralEtaBinsPerHalf, and m_numberGctForwardEtaBinsPerHalf.

Referenced by etaBinCenter(), globalEtaBinCenter(), globalEtaBinHighEdge(), globalEtaBinLowEdge(), and globalEtaIndex().

362 {
363  unsigned int etaIndex = 0 ;
364 
365  for( unsigned int i = 0 ; i < m_numberGctCentralEtaBinsPerHalf ; ++i )
366  {
367  if( fabs( etaValue ) >= m_gctEtaBinBoundaries[ i ] )
368  {
369  etaIndex = i ;
370  }
371  }
372 
373  for( unsigned int i = 0 ; i < m_numberGctForwardEtaBinsPerHalf ; ++i )
374  {
375  if( fabs( etaValue ) >=
376  m_gctEtaBinBoundaries[ i + m_numberGctCentralEtaBinsPerHalf ] )
377  {
378  etaIndex = i ;
379  }
380  }
381 
382  if( etaValue < 0. )
383  {
384  etaIndex += m_etaSignBitOffset ;
385  }
386 
387  return etaIndex ;
388 }
int i
Definition: DBlmapReader.cc:9
unsigned int m_numberGctCentralEtaBinsPerHalf
std::vector< double > m_gctEtaBinBoundaries
unsigned int m_etaSignBitOffset
unsigned int m_numberGctForwardEtaBinsPerHalf
unsigned int etaIndex(const double &etaValue) const
unsigned int L1CaloGeometry::etaSignBitOffset ( ) const
inline

Definition at line 118 of file L1CaloGeometry.h.

References m_etaBinsPerHalf.

119  { return m_etaBinsPerHalf ; }
unsigned int m_etaBinsPerHalf
double L1CaloGeometry::etSumPhiBinCenter ( unsigned int  phiIndex) const

Definition at line 295 of file L1CaloGeometry.cc.

References m_gctEtSumPhiBinWidth, and m_gctEtSumPhiOffset.

Referenced by operator<<(), and L1ExtraParticlesProd::produce().

296 {
297  return ( ( double ) phiIndex + 0.5 ) * m_gctEtSumPhiBinWidth +
299 }
double m_gctEtSumPhiOffset
double m_gctEtSumPhiBinWidth
double L1CaloGeometry::etSumPhiBinHighEdge ( unsigned int  phiIndex) const

Definition at line 309 of file L1CaloGeometry.cc.

References m_gctEtSumPhiBinWidth, and m_gctEtSumPhiOffset.

Referenced by L1GtEtaPhiConversions::convertL1Scales(), L1GetHistLimits::getHistLimits(), operator<<(), and L1GtEtaPhiConversions::print().

310 {
311  return ( ( double ) phiIndex + 1. ) * m_gctEtSumPhiBinWidth +
313 }
double m_gctEtSumPhiOffset
double m_gctEtSumPhiBinWidth
double L1CaloGeometry::etSumPhiBinLowEdge ( unsigned int  phiIndex) const

Definition at line 302 of file L1CaloGeometry.cc.

References m_gctEtSumPhiBinWidth, and m_gctEtSumPhiOffset.

Referenced by L1GtEtaPhiConversions::convertL1Scales(), L1GetHistLimits::getHistLimits(), operator<<(), and L1GtEtaPhiConversions::print().

303 {
304  return ( ( double ) phiIndex ) * m_gctEtSumPhiBinWidth +
306 }
double m_gctEtSumPhiOffset
double m_gctEtSumPhiBinWidth
unsigned int L1CaloGeometry::etSumPhiIndex ( const double &  phiValue) const

Definition at line 446 of file L1CaloGeometry.cc.

References m_gctEtSumPhiBinWidth, m_gctEtSumPhiOffset, and M_PI.

447 {
448  double phiAdjusted = phiValue - m_gctEtSumPhiOffset ;
449 
450  // Check phiValue is between m_gctEtSumPhiOffset and m_gctEtSumPhiOffset+2pi
451  if( phiAdjusted < 0. )
452  {
453  do
454  {
455  phiAdjusted += 2. * M_PI ;
456  }
457  while( phiAdjusted < 0. ) ;
458  }
459  else if( phiAdjusted > 2. * M_PI )
460  {
461  do
462  {
463  phiAdjusted -= 2. * M_PI ;
464  }
465  while( phiAdjusted > 2. * M_PI ) ;
466  }
467 
468  return ( ( int ) ( phiAdjusted / m_gctEtSumPhiBinWidth ) ) ;
469 }
double m_gctEtSumPhiOffset
double m_gctEtSumPhiBinWidth
#define M_PI
Definition: BFit3D.cc:3
double L1CaloGeometry::globalEtaBinCenter ( unsigned int  globalEtaIndex) const

Definition at line 136 of file L1CaloGeometry.cc.

References etaIndex(), m_etaBinsPerHalf, and m_gctEtaBinBoundaries.

Referenced by etaBinCenter(), operator<<(), and L1MuGMTMIAUEtaProLUT::TheLookupFunction().

137 {
138  int etaIndex ;
139  double etaSign = 1. ;
141  {
142  etaIndex = m_etaBinsPerHalf - globalEtaIndex - 1 ;
143  etaSign = -1. ;
144  }
145  else
146  {
147  etaIndex = globalEtaIndex - m_etaBinsPerHalf ;
148  }
149 
150  return 0.5 * etaSign *
152  m_gctEtaBinBoundaries[ etaIndex + 1 ] ) ;
153 }
std::vector< double > m_gctEtaBinBoundaries
unsigned int m_etaBinsPerHalf
unsigned int globalEtaIndex(const double &etaValue) const
unsigned int etaIndex(const double &etaValue) const
double L1CaloGeometry::globalEtaBinHighEdge ( unsigned int  globalEtaIndex) const

Definition at line 176 of file L1CaloGeometry.cc.

References etaIndex(), m_etaBinsPerHalf, and m_gctEtaBinBoundaries.

Referenced by etaBinHighEdge(), L1GetHistLimits::getHistLimits(), and operator<<().

177 {
178  int etaIndex ;
179  double etaSign = 1. ;
181  {
182  etaIndex = m_etaBinsPerHalf - globalEtaIndex - 1 ;
183  etaSign = -1. ;
184  }
185  else
186  {
187  etaIndex = globalEtaIndex - m_etaBinsPerHalf ;
188  }
189 
190  return ( etaSign > 0. ?
191  m_gctEtaBinBoundaries[ etaIndex + 1 ] :
192  -m_gctEtaBinBoundaries[ etaIndex ] ) ;
193 }
std::vector< double > m_gctEtaBinBoundaries
unsigned int m_etaBinsPerHalf
unsigned int globalEtaIndex(const double &etaValue) const
unsigned int etaIndex(const double &etaValue) const
double L1CaloGeometry::globalEtaBinLowEdge ( unsigned int  globalEtaIndex) const

Definition at line 156 of file L1CaloGeometry.cc.

References etaIndex(), m_etaBinsPerHalf, and m_gctEtaBinBoundaries.

Referenced by L1GtEtaPhiConversions::convertL1Scales(), etaBinLowEdge(), L1GetHistLimits::getHistLimits(), operator<<(), and L1GtEtaPhiConversions::print().

157 {
158  int etaIndex ;
159  double etaSign = 1. ;
161  {
162  etaIndex = m_etaBinsPerHalf - globalEtaIndex - 1 ;
163  etaSign = -1. ;
164  }
165  else
166  {
167  etaIndex = globalEtaIndex - m_etaBinsPerHalf ;
168  }
169 
170  return ( etaSign > 0. ?
171  m_gctEtaBinBoundaries[ etaIndex ] :
172  -m_gctEtaBinBoundaries[ etaIndex + 1 ] ) ;
173 }
std::vector< double > m_gctEtaBinBoundaries
unsigned int m_etaBinsPerHalf
unsigned int globalEtaIndex(const double &etaValue) const
unsigned int etaIndex(const double &etaValue) const
unsigned int L1CaloGeometry::globalEtaIndex ( const double &  etaValue) const

Definition at line 391 of file L1CaloGeometry.cc.

References etaIndex(), i, m_etaBinsPerHalf, and m_gctEtaBinBoundaries.

Referenced by L1GtEtaPhiConversions::convertL1Scales(), L1GtEtaPhiConversions::print(), and L1MuGMTMIAUEtaProLUT::TheLookupFunction().

392 {
393  unsigned int etaIndex = 0 ;
394 
395  if( etaValue < 0. )
396  {
397  for( unsigned int i = m_etaBinsPerHalf ; i > 0 ; --i )
398  {
399  if( fabs( etaValue ) < m_gctEtaBinBoundaries[ i ] )
400  {
401  etaIndex = m_etaBinsPerHalf - i ;
402  }
403  }
404  }
405  else
406  {
407  for( unsigned int i = 0 ; i < m_etaBinsPerHalf ; ++i )
408  {
409  if( etaValue >= m_gctEtaBinBoundaries[ i ] )
410  {
411  etaIndex = i + m_etaBinsPerHalf ;
412  }
413  }
414  }
415 
416  return etaIndex ;
417 }
int i
Definition: DBlmapReader.cc:9
std::vector< double > m_gctEtaBinBoundaries
unsigned int m_etaBinsPerHalf
unsigned int etaIndex(const double &etaValue) const
double L1CaloGeometry::htSumPhiBinCenter ( unsigned int  phiIndex) const

Definition at line 316 of file L1CaloGeometry.cc.

References kOrig, m_gctEtSumPhiBinWidth, m_gctEtSumPhiOffset, m_gctHtSumPhiBinWidth, m_gctHtSumPhiOffset, and m_version.

Referenced by operator<<(), and L1ExtraParticlesProd::produce().

317 {
318  if( m_version == kOrig )
319  {
320  return ( ( double ) phiIndex + 0.5 ) * m_gctEtSumPhiBinWidth * 4. +
322  }
323  else
324  {
325  return ( ( double ) phiIndex + 0.5 ) * m_gctHtSumPhiBinWidth +
327  }
328 }
double m_gctEtSumPhiOffset
double m_gctHtSumPhiOffset
unsigned int m_version
double m_gctHtSumPhiBinWidth
double m_gctEtSumPhiBinWidth
double L1CaloGeometry::htSumPhiBinHighEdge ( unsigned int  phiIndex) const

Definition at line 346 of file L1CaloGeometry.cc.

References kOrig, m_gctEtSumPhiBinWidth, m_gctEtSumPhiOffset, m_gctHtSumPhiBinWidth, m_gctHtSumPhiOffset, and m_version.

Referenced by L1GtEtaPhiConversions::convertL1Scales(), L1GetHistLimits::getHistLimits(), operator<<(), and L1GtEtaPhiConversions::print().

347 {
348  if( m_version == kOrig )
349  {
350  return ( ( double ) phiIndex + 1. ) * m_gctEtSumPhiBinWidth * 4. +
352  }
353  else
354  {
355  return ( ( double ) phiIndex + 1. ) * m_gctHtSumPhiBinWidth +
357  }
358 }
double m_gctEtSumPhiOffset
double m_gctHtSumPhiOffset
unsigned int m_version
double m_gctHtSumPhiBinWidth
double m_gctEtSumPhiBinWidth
double L1CaloGeometry::htSumPhiBinLowEdge ( unsigned int  phiIndex) const

Definition at line 331 of file L1CaloGeometry.cc.

References kOrig, m_gctEtSumPhiBinWidth, m_gctEtSumPhiOffset, m_gctHtSumPhiBinWidth, m_gctHtSumPhiOffset, and m_version.

Referenced by L1GtEtaPhiConversions::convertL1Scales(), L1GetHistLimits::getHistLimits(), operator<<(), and L1GtEtaPhiConversions::print().

332 {
333  if( m_version == kOrig )
334  {
335  return ( ( double ) phiIndex ) * m_gctEtSumPhiBinWidth * 4. +
337  }
338  else
339  {
340  return ( ( double ) phiIndex ) * m_gctHtSumPhiBinWidth +
342  }
343 }
double m_gctEtSumPhiOffset
double m_gctHtSumPhiOffset
unsigned int m_version
double m_gctHtSumPhiBinWidth
double m_gctEtSumPhiBinWidth
unsigned int L1CaloGeometry::htSumPhiIndex ( const double &  phiValue) const

Definition at line 472 of file L1CaloGeometry.cc.

References kOrig, m_gctEtSumPhiBinWidth, m_gctEtSumPhiOffset, m_gctHtSumPhiBinWidth, M_PI, and m_version.

473 {
474  double phiAdjusted = phiValue - m_gctEtSumPhiOffset ;
475 
476  // Check phiValue is between m_gctEtSumPhiOffset and m_gctEtSumPhiOffset+2pi
477  if( phiAdjusted < 0. )
478  {
479  do
480  {
481  phiAdjusted += 2. * M_PI ;
482  }
483  while( phiAdjusted < 0. ) ;
484  }
485  else if( phiAdjusted > 2. * M_PI )
486  {
487  do
488  {
489  phiAdjusted -= 2. * M_PI ;
490  }
491  while( phiAdjusted > 2. * M_PI ) ;
492  }
493 
494  if( m_version == kOrig )
495  {
496  return ( ( int ) ( phiAdjusted / ( m_gctEtSumPhiBinWidth * 4. ) ) ) ;
497  }
498  else
499  {
500  return ( ( int ) ( phiAdjusted / m_gctHtSumPhiBinWidth ) ) ;
501  }
502 }
double m_gctEtSumPhiOffset
unsigned int m_version
double m_gctHtSumPhiBinWidth
double m_gctEtSumPhiBinWidth
#define M_PI
Definition: BFit3D.cc:3
unsigned int L1CaloGeometry::numberGctCentralEtaBinsPerHalf ( ) const
inline
unsigned int L1CaloGeometry::numberGctEmJetPhiBins ( ) const
inline
unsigned int L1CaloGeometry::numberGctEtSumPhiBins ( ) const
inline
unsigned int L1CaloGeometry::numberGctForwardEtaBinsPerHalf ( ) const
inline
unsigned int L1CaloGeometry::numberGctHtSumPhiBins ( ) const

Definition at line 505 of file L1CaloGeometry.cc.

References kOrig, m_numberGctEtSumPhiBins, m_numberGctHtSumPhiBins, and m_version.

Referenced by L1GtEtaPhiConversions::convertL1Scales(), L1GetHistLimits::getHistLimits(), and operator<<().

506 {
507  if( m_version == kOrig )
508  {
509  return m_numberGctEtSumPhiBins / 4 ;
510  }
511  else
512  {
513  return m_numberGctHtSumPhiBins ;
514  }
515 }
unsigned int m_numberGctEtSumPhiBins
unsigned int m_version
unsigned int m_numberGctHtSumPhiBins
unsigned int L1CaloGeometry::version ( ) const
inline

Definition at line 60 of file L1CaloGeometry.h.

References m_version.

60 { return m_version ; }
unsigned int m_version

Member Data Documentation

unsigned int L1CaloGeometry::m_etaBinsPerHalf
private
unsigned int L1CaloGeometry::m_etaSignBitOffset
private

Definition at line 139 of file L1CaloGeometry.h.

Referenced by etaBinCenter(), etaBinHighEdge(), etaBinLowEdge(), and etaIndex().

double L1CaloGeometry::m_gctEmJetPhiBinWidth
private
double L1CaloGeometry::m_gctEmJetPhiOffset
private
std::vector< double > L1CaloGeometry::m_gctEtaBinBoundaries
private
double L1CaloGeometry::m_gctEtSumPhiBinWidth
private
double L1CaloGeometry::m_gctEtSumPhiOffset
private
double L1CaloGeometry::m_gctHtSumPhiBinWidth
private
double L1CaloGeometry::m_gctHtSumPhiOffset
private
unsigned int L1CaloGeometry::m_numberGctCentralEtaBinsPerHalf
private
unsigned int L1CaloGeometry::m_numberGctEmJetPhiBins
private

Definition at line 134 of file L1CaloGeometry.h.

Referenced by L1CaloGeometry(), and numberGctEmJetPhiBins().

unsigned int L1CaloGeometry::m_numberGctEtSumPhiBins
private

Definition at line 135 of file L1CaloGeometry.h.

Referenced by L1CaloGeometry(), numberGctEtSumPhiBins(), and numberGctHtSumPhiBins().

unsigned int L1CaloGeometry::m_numberGctForwardEtaBinsPerHalf
private

Definition at line 138 of file L1CaloGeometry.h.

Referenced by etaIndex(), L1CaloGeometry(), and numberGctForwardEtaBinsPerHalf().

unsigned int L1CaloGeometry::m_numberGctHtSumPhiBins
private

Definition at line 136 of file L1CaloGeometry.h.

Referenced by L1CaloGeometry(), and numberGctHtSumPhiBins().

unsigned int L1CaloGeometry::m_version
private