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 (short subdetIsNode, short zside, unsigned short coord1, unsigned short coord2)
 
 HGCalTowerID (uint32_t rawId)
 
unsigned short iEta () const
 
unsigned short iPhi () const
 
unsigned short rawId () const
 
short subdet () const
 
short zside () const
 

Private Attributes

uint32_t rawId_
 

Static Private 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
 

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) {}

◆ 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.

16  {
17  rawId_ = (((subdetIsNode & subDetMask) << subDetShift) | ((coord1 & coordMask) << coord1Shift) |
18  ((coord2 & coordMask) << coord2Shift) | ((zside > 0) & zsideMask) << zsideShift);
19  }

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

Member Function Documentation

◆ iEta()

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

Definition at line 25 of file HGCalTowerID.h.

25 { return (rawId_ >> coord1Shift) & coordMask; }

References coord1Shift, coordMask, and rawId_.

◆ iPhi()

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

Definition at line 27 of file HGCalTowerID.h.

27 { return (rawId_ >> coord2Shift) & coordMask; }

References coord2Shift, coordMask, and rawId_.

◆ rawId()

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

Definition at line 29 of file HGCalTowerID.h.

29 { return rawId_; }

References rawId_.

Referenced by HGCalTriggerTowerGeometryHelper::getTriggerTowerFromEtaPhi(), and l1t::HGCalTower::operator+=().

◆ subdet()

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

Definition at line 21 of file HGCalTowerID.h.

21 { return (rawId_ >> subDetShift) & subDetMask; }

References rawId_, subDetMask, and subDetShift.

◆ zside()

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

Definition at line 23 of file HGCalTowerID.h.

23 { return ((rawId_ >> zsideShift) & zsideMask) ? 1 : -1; }

References rawId_, zsideMask, and zsideShift.

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

Member Data Documentation

◆ coord1Shift

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

Definition at line 38 of file HGCalTowerID.h.

Referenced by HGCalTowerID(), and iEta().

◆ coord2Shift

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

Definition at line 39 of file HGCalTowerID.h.

Referenced by HGCalTowerID(), and iPhi().

◆ coordMask

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

Definition at line 37 of file HGCalTowerID.h.

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

◆ rawId_

uint32_t l1t::HGCalTowerID::rawId_
private

Definition at line 32 of file HGCalTowerID.h.

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

◆ subDetMask

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

Definition at line 33 of file HGCalTowerID.h.

Referenced by HGCalTowerID(), and subdet().

◆ subDetShift

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

Definition at line 34 of file HGCalTowerID.h.

Referenced by HGCalTowerID(), and subdet().

◆ zsideMask

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

Definition at line 35 of file HGCalTowerID.h.

Referenced by HGCalTowerID(), and zside().

◆ zsideShift

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

Definition at line 36 of file HGCalTowerID.h.

Referenced by HGCalTowerID(), and zside().

l1t::HGCalTowerID::subDetMask
static const int subDetMask
Definition: HGCalTowerID.h:33
l1t::HGCalTowerID::coord2Shift
static const int coord2Shift
Definition: HGCalTowerID.h:39
l1t::HGCalTowerID::zsideShift
static const int zsideShift
Definition: HGCalTowerID.h:36
l1t::HGCalTowerID::subDetShift
static const int subDetShift
Definition: HGCalTowerID.h:34
l1t::HGCalTowerID::zsideMask
static const int zsideMask
Definition: HGCalTowerID.h:35
l1t::HGCalTowerID::rawId_
uint32_t rawId_
Definition: HGCalTowerID.h:32
l1t::HGCalTowerID::zside
short zside() const
Definition: HGCalTowerID.h:23
l1t::HGCalTowerID::coord1Shift
static const int coord1Shift
Definition: HGCalTowerID.h:38
l1t::HGCalTowerID::HGCalTowerID
HGCalTowerID()
Definition: HGCalTowerID.h:12
l1t::HGCalTowerID::coordMask
static const int coordMask
Definition: HGCalTowerID.h:37
l1t::HGCalTowerID::rawId
unsigned short rawId() const
Definition: HGCalTowerID.h:29