CMS 3D CMS Logo

HcalTrigTowerDetId Class Reference

Cell id for an Calo Trigger tower. More...

#include <DataFormats/HcalDetId/interface/HcalTrigTowerDetId.h>

Inheritance diagram for HcalTrigTowerDetId:

DetId

List of all members.

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
HcalTrigTowerDetIdoperator= (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


Detailed Description

Cell id for an Calo Trigger tower.

Date
2007/07/31 15:20:09
Revision
1.8
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.

00006                                        {
00007 }

HcalTrigTowerDetId::HcalTrigTowerDetId ( uint32_t  rawid  ) 

Constructor from a raw value.

Definition at line 10 of file HcalTrigTowerDetId.cc.

00010                                                      : DetId(rawid) {
00011 }

HcalTrigTowerDetId::HcalTrigTowerDetId ( int  ieta,
int  iphi 
)

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 }


Member Function Documentation

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().

00038 { return zside()*ietaAbs(); }

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


Member Data Documentation

const HcalTrigTowerDetId HcalTrigTowerDetId::Undefined [static]

Definition at line 42 of file HcalTrigTowerDetId.h.

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


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:24:03 2009 for CMSSW by  doxygen 1.5.4