CMS 3D CMS Logo

Public Member Functions | Static Public Attributes

HcalTrigTowerDetId Class Reference

#include <HcalTrigTowerDetId.h>

Inheritance diagram for HcalTrigTowerDetId:
DetId

List of all members.

Public Member Functions

int depth () const
 get the depth (zero for LHC, may be nonzero for SuperCMS)
 HcalTrigTowerDetId (uint32_t rawid)
 HcalTrigTowerDetId (int ieta, int iphi, int depth)
 Constructor from signed ieta, iphi, depth.
 HcalTrigTowerDetId (const DetId &id)
 HcalTrigTowerDetId ()
 HcalTrigTowerDetId (int ieta, int iphi)
 Constructor from signed ieta, iphi.
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
HcalTrigTowerDetIdoperator= (const DetId &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

Detailed Description

Cell id for an Calo Trigger tower

Date:
2009/03/27 16:32:42
Revision:
1.9
Author:
J. Mans - Minnesota

Definition at line 16 of file HcalTrigTowerDetId.h.


Constructor & Destructor Documentation

HcalTrigTowerDetId::HcalTrigTowerDetId ( )

Constructor of a null id

Definition at line 6 of file HcalTrigTowerDetId.cc.

                                       {
}
HcalTrigTowerDetId::HcalTrigTowerDetId ( uint32_t  rawid)

Constructor from a raw value

Definition at line 10 of file HcalTrigTowerDetId.cc.

                                                     : DetId(rawid) {
}
HcalTrigTowerDetId::HcalTrigTowerDetId ( int  ieta,
int  iphi 
)

Constructor from signed ieta, iphi.

Definition at line 13 of file HcalTrigTowerDetId.cc.

References DetId::id_.

                                                         : DetId(Hcal,HcalTriggerTower) {
  id_|=((ieta>0)?(0x2000|(ieta<<7)):((-ieta)<<7)) |
    (iphi&0x7F);
}
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_.

                                                                    : DetId(Hcal,HcalTriggerTower) {
  id_|=((depth&0x7)<<14) |
    ((ieta>0)?(0x2000|(ieta<<7)):((-ieta)<<7)) |
    (iphi&0x7F);
}
HcalTrigTowerDetId::HcalTrigTowerDetId ( const DetId id)

Constructor from a generic cell id

Definition at line 24 of file HcalTrigTowerDetId.cc.

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

                                                       {
  if (!gen.null() && (gen.det()!=Hcal || gen.subdetId()!=HcalTriggerTower)) {
    throw cms::Exception("Invalid DetId") << "Cannot initialize HcalTrigTowerDetId from " << std::hex << gen.rawId() << std::dec; 
  }
  id_=gen.rawId();
}

Member Function Documentation

int HcalTrigTowerDetId::depth ( ) const [inline]

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

Definition at line 45 of file HcalTrigTowerDetId.h.

References DetId::id_.

{ return (id_>>14)&0x7; }
int HcalTrigTowerDetId::ieta ( ) const [inline]
int HcalTrigTowerDetId::ietaAbs ( ) const [inline]

get the absolute value of the tower ieta

Definition at line 39 of file HcalTrigTowerDetId.h.

References DetId::id_.

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

{ return (id_>>7)&0x3f; }
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(), Exception, DetId::Hcal, HcalTriggerTower, DetId::id_, DetId::null(), DetId::rawId(), and DetId::subdetId().

                                                                  {
  if (!gen.null() && (gen.det()!=Hcal || gen.subdetId()!=HcalTriggerTower)) {
    throw cms::Exception("Invalid DetId") << "Cannot assign HcalTrigTowerDetId from " << std::hex << gen.rawId() << std::dec; 
  }
  id_=gen.rawId();
  return *this;
}
HcalSubdetector HcalTrigTowerDetId::subdet ( ) const [inline]

get the subdetector

Definition at line 35 of file HcalTrigTowerDetId.h.

References DetId::subdetId().

{ return (HcalSubdetector)(subdetId()); }
int HcalTrigTowerDetId::zside ( ) const [inline]

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

Definition at line 37 of file HcalTrigTowerDetId.h.

References DetId::id_.

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

{ return (id_&0x2000)?(1):(-1); }

Member Data Documentation

Definition at line 47 of file HcalTrigTowerDetId.h.

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