CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Static Private Attributes
l1t::HGCalTowerID Class Reference

#include <HGCalTowerID.h>

Public Member Functions

 HGCalTowerID ()
 
 HGCalTowerID (unsigned short rawId)
 
 HGCalTowerID (short zside, unsigned short coord1, unsigned short coord2)
 
unsigned short iEta () const
 
unsigned short iPhi () const
 
unsigned short rawId () const
 
short zside () const
 

Private Attributes

unsigned short rawId_
 

Static Private Attributes

static const int coord1Shift = 7
 
static const int coord2Shift = 0
 
static const int coordMask = 0x007F
 
static const int zsideMask = 0x1
 
static const int zsideShift = 15
 

Detailed Description

Definition at line 8 of file HGCalTowerID.h.

Constructor & Destructor Documentation

l1t::HGCalTowerID::HGCalTowerID ( )
inline

Definition at line 10 of file HGCalTowerID.h.

10 : HGCalTowerID(0) {}
l1t::HGCalTowerID::HGCalTowerID ( unsigned short  rawId)
inline

Definition at line 12 of file HGCalTowerID.h.

12 : rawId_(rawId) {}
unsigned short rawId() const
Definition: HGCalTowerID.h:25
unsigned short rawId_
Definition: HGCalTowerID.h:28
l1t::HGCalTowerID::HGCalTowerID ( short  zside,
unsigned short  coord1,
unsigned short  coord2 
)
inline

Definition at line 14 of file HGCalTowerID.h.

References coord1Shift, coord2Shift, coordMask, rawId_, zsideMask, and zsideShift.

14  {
15  rawId_ = ((coord1 & coordMask) << coord1Shift) | ((coord2 & coordMask) << coord2Shift) |
16  (((zside > 0) & zsideMask) << zsideShift);
17  }
short zside() const
Definition: HGCalTowerID.h:19
static const int coord1Shift
Definition: HGCalTowerID.h:32
static const int zsideShift
Definition: HGCalTowerID.h:30
static const int zsideMask
Definition: HGCalTowerID.h:29
static const int coord2Shift
Definition: HGCalTowerID.h:33
unsigned short rawId_
Definition: HGCalTowerID.h:28
static const int coordMask
Definition: HGCalTowerID.h:31

Member Function Documentation

unsigned short l1t::HGCalTowerID::iEta ( ) const
inline

Definition at line 21 of file HGCalTowerID.h.

References coord1Shift, coordMask, and rawId_.

21 { return (rawId_ >> coord1Shift) & coordMask; }
static const int coord1Shift
Definition: HGCalTowerID.h:32
unsigned short rawId_
Definition: HGCalTowerID.h:28
static const int coordMask
Definition: HGCalTowerID.h:31
unsigned short l1t::HGCalTowerID::iPhi ( ) const
inline

Definition at line 23 of file HGCalTowerID.h.

References coord2Shift, coordMask, and rawId_.

23 { return (rawId_ >> coord2Shift) & coordMask; }
static const int coord2Shift
Definition: HGCalTowerID.h:33
unsigned short rawId_
Definition: HGCalTowerID.h:28
static const int coordMask
Definition: HGCalTowerID.h:31
unsigned short l1t::HGCalTowerID::rawId ( ) const
inline
short l1t::HGCalTowerID::zside ( ) const
inline

Definition at line 19 of file HGCalTowerID.h.

References rawId_, zsideMask, and zsideShift.

Referenced by l1t::HGCalTower::zside().

19 { return ((rawId_ >> zsideShift) & zsideMask) ? 1 : -1; }
static const int zsideShift
Definition: HGCalTowerID.h:30
static const int zsideMask
Definition: HGCalTowerID.h:29
unsigned short rawId_
Definition: HGCalTowerID.h:28

Member Data Documentation

const int l1t::HGCalTowerID::coord1Shift = 7
staticprivate

Definition at line 32 of file HGCalTowerID.h.

Referenced by HGCalTowerID(), and iEta().

const int l1t::HGCalTowerID::coord2Shift = 0
staticprivate

Definition at line 33 of file HGCalTowerID.h.

Referenced by HGCalTowerID(), and iPhi().

const int l1t::HGCalTowerID::coordMask = 0x007F
staticprivate

Definition at line 31 of file HGCalTowerID.h.

Referenced by HGCalTowerID(), iEta(), and iPhi().

unsigned short l1t::HGCalTowerID::rawId_
private

Definition at line 28 of file HGCalTowerID.h.

Referenced by HGCalTowerID(), iEta(), iPhi(), rawId(), and zside().

const int l1t::HGCalTowerID::zsideMask = 0x1
staticprivate

Definition at line 29 of file HGCalTowerID.h.

Referenced by HGCalTowerID(), and zside().

const int l1t::HGCalTowerID::zsideShift = 15
staticprivate

Definition at line 30 of file HGCalTowerID.h.

Referenced by HGCalTowerID(), and zside().