CMS 3D CMS Logo

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

#include <HcalDetId.h>

Inheritance diagram for HcalDetId:
DetId

Public Member Functions

void changeForm ()
 
int crystal_ieta_high () const
 get the largest crystal_ieta of the crystal in front of this tower (HB and HE tower 17 only) More...
 
int crystal_ieta_low () const
 get the smallest crystal_ieta of the crystal in front of this tower (HB and HE tower 17 only) More...
 
int crystal_iphi_high () const
 get the largest crystal_iphi of the crystal in front of this tower (HB and HE tower 17 only) More...
 
int crystal_iphi_low () const
 get the smallest crystal_iphi of the crystal in front of this tower (HB and HE tower 17 only) More...
 
int depth () const
 get the tower depth More...
 
 HcalDetId ()
 
 HcalDetId (uint32_t rawid)
 
 HcalDetId (HcalSubdetector subdet, int tower_ieta, int tower_iphi, int depth)
 
 HcalDetId (const DetId &id)
 
int hfdepth () const
 get full depth information for HF More...
 
int ieta () const
 get the cell ieta More...
 
int ietaAbs () const
 get the absolute value of the cell ieta More...
 
int iphi () const
 get the cell iphi More...
 
uint32_t maskDepth () const
 get the tower depth More...
 
uint32_t newForm () const
 
bool oldFormat () const
 
bool operator!= (DetId id) const
 
bool operator< (DetId id) const
 
HcalDetIdoperator= (const DetId &id)
 
bool operator== (DetId id) const
 
uint32_t otherForm () const
 change format More...
 
HcalSubdetector subdet () const
 get the subdetector More...
 
int zside () const
 get the z-side of the cell (1/-1) More...
 
- Public Member Functions inherited from DetId
Detector det () const
 get the detector field from this detid More...
 
 DetId ()
 Create an empty or null id (also for persistence) More...
 
 DetId (uint32_t id)
 Create an id from a raw number. More...
 
 DetId (Detector det, int subdet)
 Create an id, filling the detector and subdetector fields as specified. More...
 
bool null () const
 is this a null id ? More...
 
 operator uint32_t () const
 
bool operator!= (DetId id) const
 inequality More...
 
uint32_t operator() () const
 
bool operator< (DetId id) const
 comparison More...
 
bool operator== (DetId id) const
 equality More...
 
uint32_t rawId () const
 get the raw id More...
 
int subdetId () const
 get the contents of the subdetector field (not cast into any detector's numbering enum) More...
 

Static Public Member Functions

static uint32_t newForm (const uint32_t &)
 

Static Public Attributes

static const int kHcalDepthMask1 = 0x1F
 
static const int kHcalDepthMask2 = 0xF
 
static const int kHcalDepthOffset1 = 14
 
static const int kHcalDepthOffset2 = 20
 
static const int kHcalDepthSet1 = 0x1C000
 
static const int kHcalDepthSet2 = 0xF00000
 
static const int kHcalEtaMask1 = 0x3F
 
static const int kHcalEtaMask2 = 0x1FF
 
static const int kHcalEtaOffset1 = 7
 
static const int kHcalEtaOffset2 = 10
 
static const int kHcalIdFormat2 = 0x1000000
 
static const int kHcalIdMask = 0xFE000000
 
static const int kHcalPhiMask1 = 0x7F
 
static const int kHcalPhiMask2 = 0x3FF
 
static const int kHcalZsideMask1 = 0x2000
 
static const int kHcalZsideMask2 = 0x80000
 
static const HcalDetId Undefined
 
- Static Public Attributes inherited from DetId
static const int kDetOffset = 28
 
static const int kSubdetOffset = 25
 

Private Member Functions

void newFromOld (const uint32_t &)
 

Static Private Member Functions

static void unpackId (const uint32_t &, int &, int &, int &, int &)
 

Additional Inherited Members

- Public Types inherited from DetId
enum  Detector {
  Tracker =1, Muon =2, Ecal =3, Hcal =4,
  Calo =5, Forward =6, VeryForward =7
}
 
- Protected Attributes inherited from DetId
uint32_t id_
 

Detailed Description

Cell identifier class for the HCAL subdetectors, precision readout cells only

Definition at line 12 of file HcalDetId.h.

Constructor & Destructor Documentation

HcalDetId::HcalDetId ( )

Create a null cellid

Definition at line 8 of file HcalDetId.cc.

HcalDetId::HcalDetId ( uint32_t  rawid)

Create cellid from raw id (0=invalid tower id)

Definition at line 11 of file HcalDetId.cc.

HcalDetId::HcalDetId ( HcalSubdetector  subdet,
int  tower_ieta,
int  tower_iphi,
int  depth 
)

Constructor from subdetector, signed tower ieta,iphi,and depth

Definition at line 14 of file HcalDetId.cc.

HcalDetId::HcalDetId ( const DetId id)

Constructor from a generic cell id

Definition at line 21 of file HcalDetId.cc.

Member Function Documentation

void HcalDetId::changeForm ( )

Definition at line 136 of file HcalDetId.cc.

int HcalDetId::crystal_ieta_high ( ) const
inline

get the largest crystal_ieta of the crystal in front of this tower (HB and HE tower 17 only)

Definition at line 74 of file HcalDetId.h.

References ieta(), and zside().

Referenced by CaloTowerConstituentsMap::constituentsOf().

74 { return ((ieta()-zside())*5)+5*zside(); }
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.cc:91
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
int HcalDetId::crystal_ieta_low ( ) const
inline

get the smallest crystal_ieta of the crystal in front of this tower (HB and HE tower 17 only)

Definition at line 72 of file HcalDetId.h.

References ieta(), and zside().

Referenced by CaloTowerConstituentsMap::constituentsOf().

72 { return ((ieta()-zside())*5)+zside(); }
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.cc:91
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
int HcalDetId::crystal_iphi_high ( ) const

get the largest crystal_iphi of the crystal in front of this tower (HB and HE tower 17 only)

Definition at line 163 of file HcalDetId.cc.

Referenced by CaloTowerConstituentsMap::constituentsOf().

int HcalDetId::crystal_iphi_low ( ) const

get the smallest crystal_iphi of the crystal in front of this tower (HB and HE tower 17 only)

Definition at line 157 of file HcalDetId.cc.

Referenced by CaloTowerConstituentsMap::constituentsOf().

int HcalDetId::depth ( ) const
int HcalDetId::hfdepth ( ) const

get full depth information for HF

Definition at line 111 of file HcalDetId.cc.

int HcalDetId::ieta ( ) const
inline

get the cell ieta

Definition at line 56 of file HcalDetId.h.

References ietaAbs(), and zside().

Referenced by cms::HcalConstantsASCIIWriter::analyze(), crystal_ieta_high(), crystal_ieta_low(), spr::getHotCell(), HcalChannelIterator::getIeta(), hcaldqm::quantity::getValue_ieta(), hcaldqm::quantity::getValue_SubdetPM(), hcalTransformedId(), and FastHFShowerLibrary::modifyDepth().

56 { return zside()*ietaAbs(); }
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.cc:91
int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.cc:96
int HcalDetId::ietaAbs ( ) const

get the absolute value of the cell ieta

Definition at line 96 of file HcalDetId.cc.

Referenced by ieta(), HcalSimParameters::photoelectronsToAnalog(), HcalSimParameters::samplingFactor(), and CaloTowerConstituentsMap::towerOf().

int HcalDetId::iphi ( ) const
uint32_t HcalDetId::maskDepth ( ) const

get the tower depth

Definition at line 119 of file HcalDetId.cc.

uint32_t HcalDetId::newForm ( ) const

Definition at line 140 of file HcalDetId.cc.

uint32_t HcalDetId::newForm ( const uint32_t &  inpid)
static

Definition at line 144 of file HcalDetId.cc.

void HcalDetId::newFromOld ( const uint32_t &  rawid)
private

Definition at line 169 of file HcalDetId.cc.

bool HcalDetId::oldFormat ( ) const
inline

Definition at line 50 of file HcalDetId.h.

References DetId::id_, and kHcalIdFormat2.

50 { return ((id_&kHcalIdFormat2)==0)?(true):(false); }
static const int kHcalIdFormat2
Definition: HcalDetId.h:29
uint32_t id_
Definition: DetId.h:55
bool HcalDetId::operator!= ( DetId  id) const

Definition at line 61 of file HcalDetId.cc.

bool HcalDetId::operator< ( DetId  id) const

Definition at line 70 of file HcalDetId.cc.

HcalDetId & HcalDetId::operator= ( const DetId id)

Assignment from a generic cell id

Definition at line 36 of file HcalDetId.cc.

bool HcalDetId::operator== ( DetId  id) const

Comparison operator

Definition at line 52 of file HcalDetId.cc.

uint32_t HcalDetId::otherForm ( ) const

change format

Definition at line 124 of file HcalDetId.cc.

HcalSubdetector HcalDetId::subdet ( ) const
inline
void HcalDetId::unpackId ( const uint32_t &  rawid,
int &  zsid,
int &  eta,
int &  phi,
int &  dep 
)
staticprivate

Definition at line 173 of file HcalDetId.cc.

int HcalDetId::zside ( ) const

Member Data Documentation

const int HcalDetId::kHcalDepthMask1 = 0x1F
static

Definition at line 25 of file HcalDetId.h.

const int HcalDetId::kHcalDepthMask2 = 0xF
static

Definition at line 26 of file HcalDetId.h.

Referenced by CaloMiscalibMapHcal::prefillMap().

const int HcalDetId::kHcalDepthOffset1 = 14
static

Definition at line 23 of file HcalDetId.h.

const int HcalDetId::kHcalDepthOffset2 = 20
static

Definition at line 24 of file HcalDetId.h.

const int HcalDetId::kHcalDepthSet1 = 0x1C000
static

Definition at line 27 of file HcalDetId.h.

const int HcalDetId::kHcalDepthSet2 = 0xF00000
static

Definition at line 28 of file HcalDetId.h.

const int HcalDetId::kHcalEtaMask1 = 0x3F
static

Definition at line 19 of file HcalDetId.h.

const int HcalDetId::kHcalEtaMask2 = 0x1FF
static

Definition at line 20 of file HcalDetId.h.

Referenced by CaloMiscalibMapHcal::prefillMap().

const int HcalDetId::kHcalEtaOffset1 = 7
static

Definition at line 17 of file HcalDetId.h.

const int HcalDetId::kHcalEtaOffset2 = 10
static

Definition at line 18 of file HcalDetId.h.

const int HcalDetId::kHcalIdFormat2 = 0x1000000
static

Definition at line 29 of file HcalDetId.h.

Referenced by oldFormat().

const int HcalDetId::kHcalIdMask = 0xFE000000
static

Definition at line 30 of file HcalDetId.h.

const int HcalDetId::kHcalPhiMask1 = 0x7F
static

Definition at line 15 of file HcalDetId.h.

const int HcalDetId::kHcalPhiMask2 = 0x3FF
static

Definition at line 16 of file HcalDetId.h.

Referenced by CaloMiscalibMapHcal::prefillMap().

const int HcalDetId::kHcalZsideMask1 = 0x2000
static

Definition at line 21 of file HcalDetId.h.

const int HcalDetId::kHcalZsideMask2 = 0x80000
static

Definition at line 22 of file HcalDetId.h.

const HcalDetId HcalDetId::Undefined
static

Definition at line 80 of file HcalDetId.h.

Referenced by HcalRawDataClient::HashToHDI(), and CastorText2DetIdConverter::init().