test
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 Attributes
HcalTrigTowerDetId Class Reference

#include <HcalTrigTowerDetId.h>

Inheritance diagram for HcalTrigTowerDetId:
DetId

Public Member Functions

int depth () const
 get the depth (zero for LHC, may be nonzero for SuperCMS) More...
 
 HcalTrigTowerDetId ()
 
 HcalTrigTowerDetId (uint32_t rawid)
 
 HcalTrigTowerDetId (int ieta, int iphi)
 Constructor from signed ieta, iphi. More...
 
 HcalTrigTowerDetId (int ieta, int iphi, int depth)
 Constructor from signed ieta, iphi, depth. More...
 
 HcalTrigTowerDetId (const DetId &id)
 
int ieta () const
 get the tower ieta More...
 
int ietaAbs () const
 get the absolute value of the tower ieta More...
 
int iphi () const
 get the tower iphi More...
 
HcalTrigTowerDetIdoperator= (const DetId &id)
 
HcalSubdetector subdet () const
 get the subdetector More...
 
int zside () const
 get the z-side of the tower (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 Attributes

static const HcalTrigTowerDetId Undefined
 
- Static Public Attributes inherited from DetId
static const int kDetOffset = 28
 
static const int kSubdetOffset = 25
 

Additional Inherited Members

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

Detailed Description

Cell id for an Calo Trigger tower

Author
J. Mans - Minnesota

Definition at line 14 of file HcalTrigTowerDetId.h.

Constructor & Destructor Documentation

HcalTrigTowerDetId::HcalTrigTowerDetId ( )

Constructor of a null id

Definition at line 6 of file HcalTrigTowerDetId.cc.

6  {
7 }
HcalTrigTowerDetId::HcalTrigTowerDetId ( uint32_t  rawid)

Constructor from a raw value

Definition at line 10 of file HcalTrigTowerDetId.cc.

10  : DetId(rawid) {
11 }
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
HcalTrigTowerDetId::HcalTrigTowerDetId ( int  ieta,
int  iphi 
)

Constructor from signed ieta, iphi.

Definition at line 13 of file HcalTrigTowerDetId.cc.

References DetId::id_.

14  id_|=((ieta>0)?(0x2000|(ieta<<7)):((-ieta)<<7)) |
15  (iphi&0x7F);
16 }
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
int ieta() const
get the tower ieta
uint32_t id_
Definition: DetId.h:55
int iphi() const
get the tower iphi
HcalTrigTowerDetId::HcalTrigTowerDetId ( int  ieta,
int  iphi,
int  depth 
)

Constructor from signed ieta, iphi, depth.

Definition at line 18 of file HcalTrigTowerDetId.cc.

References DetId::id_.

19  id_|=((depth&0x7)<<14) |
20  ((ieta>0)?(0x2000|(ieta<<7)):((-ieta)<<7)) |
21  (iphi&0x7F);
22 }
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
int ieta() const
get the tower ieta
int depth() const
get the depth (zero for LHC, may be nonzero for SuperCMS)
uint32_t id_
Definition: DetId.h:55
int iphi() const
get the tower iphi
HcalTrigTowerDetId::HcalTrigTowerDetId ( const DetId id)

Constructor from a generic cell id

Definition at line 24 of file HcalTrigTowerDetId.cc.

References DetId::det(), edm::hlt::Exception, DetId::Hcal, HcalTriggerTower, DetId::id_, DetId::null(), DetId::rawId(), and DetId::subdetId().

24  {
25  if (!gen.null() && (gen.det()!=Hcal || gen.subdetId()!=HcalTriggerTower)) {
26  throw cms::Exception("Invalid DetId") << "Cannot initialize HcalTrigTowerDetId from " << std::hex << gen.rawId() << std::dec;
27  }
28  id_=gen.rawId();
29 }
uint32_t id_
Definition: DetId.h:55

Member Function Documentation

int HcalTrigTowerDetId::depth ( ) const
inline

get the depth (zero for LHC, may be nonzero for SuperCMS)

Definition at line 43 of file HcalTrigTowerDetId.h.

References DetId::id_.

43 { return (id_>>14)&0x7; }
uint32_t id_
Definition: DetId.h:55
int HcalTrigTowerDetId::ieta ( ) const
inline

get the tower ieta

Definition at line 39 of file HcalTrigTowerDetId.h.

References ietaAbs(), and zside().

Referenced by HcalTrigTowerGeometry::detIds(), CaloTPGTranscoderULUT::hcaletValue(), HcalText2DetIdConverter::init(), and HTLogicalMapEntry::printLMapLine().

39 { return zside()*ietaAbs(); }
int zside() const
get the z-side of the tower (1/-1)
int ietaAbs() const
get the absolute value of the tower ieta
int HcalTrigTowerDetId::ietaAbs ( ) const
inline

get the absolute value of the tower ieta

Definition at line 37 of file HcalTrigTowerDetId.h.

References DetId::id_.

Referenced by HcalTopology::detId2denseIdHT(), and ieta().

37 { return (id_>>7)&0x3f; }
uint32_t id_
Definition: DetId.h:55
int HcalTrigTowerDetId::iphi ( ) const
inline
HcalTrigTowerDetId & HcalTrigTowerDetId::operator= ( const DetId id)

Assignment from a generic cell id

Definition at line 31 of file HcalTrigTowerDetId.cc.

References DetId::det(), edm::hlt::Exception, DetId::Hcal, HcalTriggerTower, DetId::id_, DetId::null(), DetId::rawId(), and DetId::subdetId().

31  {
32  if (!gen.null() && (gen.det()!=Hcal || gen.subdetId()!=HcalTriggerTower)) {
33  throw cms::Exception("Invalid DetId") << "Cannot assign HcalTrigTowerDetId from " << std::hex << gen.rawId() << std::dec;
34  }
35  id_=gen.rawId();
36  return *this;
37 }
uint32_t id_
Definition: DetId.h:55
HcalSubdetector HcalTrigTowerDetId::subdet ( ) const
inline

get the subdetector

Definition at line 33 of file HcalTrigTowerDetId.h.

References DetId::subdetId().

33 { return (HcalSubdetector)(subdetId()); }
HcalSubdetector
Definition: HcalAssistant.h:31
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
int HcalTrigTowerDetId::zside ( ) const
inline

get the z-side of the tower (1/-1)

Definition at line 35 of file HcalTrigTowerDetId.h.

References DetId::id_.

Referenced by HcalTopology::detId2denseIdHT(), and ieta().

35 { return (id_&0x2000)?(1):(-1); }
uint32_t id_
Definition: DetId.h:55

Member Data Documentation

const HcalTrigTowerDetId HcalTrigTowerDetId::Undefined
static

Definition at line 45 of file HcalTrigTowerDetId.h.

Referenced by HcalText2DetIdConverter::init(), and HcalUnpacker::unpack().