CMS 3D CMS Logo

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

#include <HGCalTowerID.h>

Public Member Functions

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

Static Public Attributes

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

Private Attributes

uint32_t rawId_
 

Detailed Description

Definition at line 10 of file HGCalTowerID.h.

Constructor & Destructor Documentation

◆ HGCalTowerID() [1/3]

l1t::HGCalTowerID::HGCalTowerID ( )
inline

Definition at line 12 of file HGCalTowerID.h.

12 : HGCalTowerID(0) {}

◆ HGCalTowerID() [2/3]

l1t::HGCalTowerID::HGCalTowerID ( uint32_t  rawId)
inline

Definition at line 14 of file HGCalTowerID.h.

14 : rawId_(rawId) {}
unsigned short rawId() const
Definition: HGCalTowerID.h:29

◆ HGCalTowerID() [3/3]

l1t::HGCalTowerID::HGCalTowerID ( short  subdetIsNode,
short  zside,
unsigned short  coord1,
unsigned short  coord2 
)
inline

Definition at line 16 of file HGCalTowerID.h.

References coord1Shift, coord2Shift, coordMask, rawId_, subDetMask, subDetShift, zside(), zsideMask, and zsideShift.

16  {
17  rawId_ = (((subdetIsNode & subDetMask) << subDetShift) | ((coord1 & coordMask) << coord1Shift) |
18  ((coord2 & coordMask) << coord2Shift) | ((zside > 0) & zsideMask) << zsideShift);
19  }
short zside() const
Definition: HGCalTowerID.h:23
static const int coord1Shift
Definition: HGCalTowerID.h:36
static const int subDetMask
Definition: HGCalTowerID.h:31
static const int zsideShift
Definition: HGCalTowerID.h:34
static const int zsideMask
Definition: HGCalTowerID.h:33
static const int coord2Shift
Definition: HGCalTowerID.h:37
static const int coordMask
Definition: HGCalTowerID.h:35
static const int subDetShift
Definition: HGCalTowerID.h:32

Member Function Documentation

◆ iEta()

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

Definition at line 25 of file HGCalTowerID.h.

References coord1Shift, coordMask, and rawId_.

25 { return (rawId_ >> coord1Shift) & coordMask; }
static const int coord1Shift
Definition: HGCalTowerID.h:36
static const int coordMask
Definition: HGCalTowerID.h:35

◆ iPhi()

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

Definition at line 27 of file HGCalTowerID.h.

References coord2Shift, coordMask, and rawId_.

27 { return (rawId_ >> coord2Shift) & coordMask; }
static const int coord2Shift
Definition: HGCalTowerID.h:37
static const int coordMask
Definition: HGCalTowerID.h:35

◆ rawId()

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

◆ subdet()

short l1t::HGCalTowerID::subdet ( ) const
inline

Definition at line 21 of file HGCalTowerID.h.

References rawId_, subDetMask, and subDetShift.

21 { return (rawId_ >> subDetShift) & subDetMask; }
static const int subDetMask
Definition: HGCalTowerID.h:31
static const int subDetShift
Definition: HGCalTowerID.h:32

◆ zside()

short l1t::HGCalTowerID::zside ( ) const
inline

Definition at line 23 of file HGCalTowerID.h.

References rawId_, zsideMask, and zsideShift.

Referenced by HGCalTowerID(), and l1t::HGCalTower::zside().

23 { return ((rawId_ >> zsideShift) & zsideMask) ? 1 : -1; }
static const int zsideShift
Definition: HGCalTowerID.h:34
static const int zsideMask
Definition: HGCalTowerID.h:33

Member Data Documentation

◆ coord1Shift

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

◆ coord2Shift

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

◆ coordMask

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

◆ rawId_

uint32_t l1t::HGCalTowerID::rawId_
private

Definition at line 40 of file HGCalTowerID.h.

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

◆ subDetMask

const int l1t::HGCalTowerID::subDetMask = 0x1
static

Definition at line 31 of file HGCalTowerID.h.

Referenced by HGCalTowerID(), and subdet().

◆ subDetShift

const int l1t::HGCalTowerID::subDetShift = 16
static

Definition at line 32 of file HGCalTowerID.h.

Referenced by HGCalTowerID(), and subdet().

◆ zsideMask

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

Definition at line 33 of file HGCalTowerID.h.

Referenced by HGCalTowerID(), and zside().

◆ zsideShift

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

Definition at line 34 of file HGCalTowerID.h.

Referenced by HGCalTowerID(), and zside().