#include <DataFormats/HcalDetId/interface/HcalTrigTowerDetId.h>
Public Member Functions | |
HcalTrigTowerDetId (const DetId &id) | |
Constructor from a generic cell id. | |
HcalTrigTowerDetId (int ieta, int iphi) | |
Constructor from signed ieta, iphi. | |
HcalTrigTowerDetId (uint32_t rawid) | |
Constructor from a raw value. | |
HcalTrigTowerDetId () | |
Constructor of a null id. | |
int | ieta () const |
get the tower ieta | |
int | ietaAbs () const |
get the absolute value of the tower ieta | |
int | iphi () const |
get the tower iphi | |
HcalTrigTowerDetId & | operator= (const DetId &id) |
Assignment from a generic cell id. | |
HcalSubdetector | subdet () const |
get the subdetector | |
int | zside () const |
get the z-side of the tower (1/-1) | |
Static Public Attributes | |
static const HcalTrigTowerDetId | Undefined |
Definition at line 16 of file HcalTrigTowerDetId.h.
HcalTrigTowerDetId::HcalTrigTowerDetId | ( | ) |
HcalTrigTowerDetId::HcalTrigTowerDetId | ( | uint32_t | rawid | ) |
Constructor from signed ieta, iphi.
Definition at line 13 of file HcalTrigTowerDetId.cc.
References DetId::id_.
00013 : DetId(Hcal,HcalTriggerTower) { 00014 id_|=((ieta>0)?(0x2000|(ieta<<7)):((-ieta)<<7)) | 00015 (iphi&0x7F); 00016 }
HcalTrigTowerDetId::HcalTrigTowerDetId | ( | const DetId & | id | ) |
Constructor from a generic cell id.
Definition at line 18 of file HcalTrigTowerDetId.cc.
References DetId::det(), Exception, DetId::Hcal, HcalTriggerTower, DetId::id_, DetId::null(), DetId::rawId(), and DetId::subdetId().
00018 { 00019 if (!gen.null() && (gen.det()!=Hcal || gen.subdetId()!=HcalTriggerTower)) { 00020 throw cms::Exception("Invalid DetId") << "Cannot initialize HcalTrigTowerDetId from " << std::hex << gen.rawId() << std::dec; 00021 } 00022 id_=gen.rawId(); 00023 }
int HcalTrigTowerDetId::ieta | ( | ) | const [inline] |
get the tower ieta
Definition at line 38 of file HcalTrigTowerDetId.h.
References ietaAbs(), and zside().
Referenced by HcalText2DetIdConverter::init(), HcaluLUTTPGCoder::PrintTPGMap(), and HcalTrigPrimMonitor::processEvent().
int HcalTrigTowerDetId::ietaAbs | ( | ) | const [inline] |
get the absolute value of the tower ieta
Definition at line 36 of file HcalTrigTowerDetId.h.
References DetId::id_.
Referenced by HcalGenericDetId::hashedId(), CaloTPGTranscoderULUT::hcaletValue(), and ieta().
00036 { return (id_>>7)&0x3f; }
int HcalTrigTowerDetId::iphi | ( | ) | const [inline] |
get the tower iphi
Definition at line 40 of file HcalTrigTowerDetId.h.
References DetId::id_.
Referenced by HcalGenericDetId::hashedId(), HcalText2DetIdConverter::init(), HcaluLUTTPGCoder::PrintTPGMap(), and HcalTrigPrimMonitor::processEvent().
00040 { return id_&0x7F; }
HcalTrigTowerDetId & HcalTrigTowerDetId::operator= | ( | const DetId & | id | ) |
Assignment from a generic cell id.
Definition at line 25 of file HcalTrigTowerDetId.cc.
References DetId::det(), Exception, DetId::Hcal, HcalTriggerTower, DetId::id_, DetId::null(), DetId::rawId(), and DetId::subdetId().
00025 { 00026 if (!gen.null() && (gen.det()!=Hcal || gen.subdetId()!=HcalTriggerTower)) { 00027 throw cms::Exception("Invalid DetId") << "Cannot assign HcalTrigTowerDetId from " << std::hex << gen.rawId() << std::dec; 00028 } 00029 id_=gen.rawId(); 00030 return *this; 00031 }
HcalSubdetector HcalTrigTowerDetId::subdet | ( | ) | const [inline] |
get the subdetector
Definition at line 32 of file HcalTrigTowerDetId.h.
References DetId::subdetId().
00032 { return (HcalSubdetector)(subdetId()); }
int HcalTrigTowerDetId::zside | ( | ) | const [inline] |
get the z-side of the tower (1/-1)
Definition at line 34 of file HcalTrigTowerDetId.h.
References DetId::id_.
Referenced by HcalGenericDetId::hashedId(), and ieta().
00034 { return (id_&0x2000)?(1):(-1); }
const HcalTrigTowerDetId HcalTrigTowerDetId::Undefined [static] |
Definition at line 42 of file HcalTrigTowerDetId.h.
Referenced by HcalText2DetIdConverter::init(), and HcalUnpacker::unpack().