CMS 3D CMS Logo

Public Types | Public Member Functions

HcalGenericDetId Class Reference

#include <HcalGenericDetId.h>

Inheritance diagram for HcalGenericDetId:
DetId

List of all members.

Public Types

enum  HcalGenericSubdetector {
  HcalGenEmpty = 0, HcalGenBarrel = 1, HcalGenEndcap = 2, HcalGenOuter = 3,
  HcalGenForward = 4, HcalGenTriggerTower = 5, HcalGenZDC = 8, HcalGenCalibration = 9,
  HcalGenCastor = 10, HcalGenUnknown = 99
}

Public Member Functions

HcalGenericSubdetector genericSubdet () const
 HcalGenericDetId ()
 HcalGenericDetId (uint32_t rawid)
 HcalGenericDetId (const DetId &id)
bool isHcalCalibDetId () const
bool isHcalCastorDetId () const
bool isHcalDetId () const
bool isHcalTrigTowerDetId () const
bool isHcalZDCDetId () const
HcalOtherSubdetector otherSubdet () const

Detailed Description

Author:
F.Ratnikov, UMd Generic HCAL detector ID suitable for all Hcal subdetectors
Id:
HcalGenericDetId.h,v 1.9 2012/11/12 20:52:53 dlange Exp

R.Ofierzynski, 22.02.2008, added hashedId

Author:
F.Ratnikov, UMd Generic HCAL detector ID suitable for all Hcal subdetectors

Definition at line 16 of file HcalGenericDetId.h.


Member Enumeration Documentation

Enumerator:
HcalGenEmpty 
HcalGenBarrel 
HcalGenEndcap 
HcalGenOuter 
HcalGenForward 
HcalGenTriggerTower 
HcalGenZDC 
HcalGenCalibration 
HcalGenCastor 
HcalGenUnknown 

Definition at line 18 of file HcalGenericDetId.h.


Constructor & Destructor Documentation

HcalGenericDetId::HcalGenericDetId ( ) [inline]

Definition at line 20 of file HcalGenericDetId.h.

: DetId () {}
HcalGenericDetId::HcalGenericDetId ( uint32_t  rawid) [inline]

Definition at line 21 of file HcalGenericDetId.h.

: DetId (rawid) {}
HcalGenericDetId::HcalGenericDetId ( const DetId id) [inline]

Definition at line 22 of file HcalGenericDetId.h.

: DetId (id) {}

Member Function Documentation

HcalGenericDetId::HcalGenericSubdetector HcalGenericDetId::genericSubdet ( ) const

Definition at line 20 of file HcalGenericDetId.cc.

References DetId::Calo, DetId::det(), DetId::Hcal, HcalBarrel, HcalCalibration, HcalEndcap, HcalForward, HcalGenBarrel, HcalGenCalibration, HcalGenCastor, HcalGenEmpty, HcalGenEndcap, HcalGenForward, HcalGenOuter, HcalGenTriggerTower, HcalGenUnknown, HcalGenZDC, HcalOther, HcalOuter, HcalTriggerTower, DetId::null(), otherSubdet(), HcalCastorDetId::SubdetectorId, HcalZDCDetId::SubdetectorId, and DetId::subdetId().

Referenced by HcalAmplifier::addPedestals(), HcalLuttoDB::analyze(), HcalShapes::defaultShape(), HcalPacker::findSamples(), HcalLogicalMap::getHcalFrontEndId(), HcalSeverityLevelComputer::getSeverityLevel(), HcalText2DetIdConverter::init(), isHcalCalibDetId(), isHcalCastorDetId(), isHcalDetId(), isHcalTrigTowerDetId(), isHcalZDCDetId(), CastorDbHardcode::makeGain(), CastorDbHardcode::makePedestal(), CastorDbHardcode::makeQIECoder(), CastorDbASCIIIO::DetIdLess::operator()(), and HcalSeverityLevelComputer::recoveredRecHit().

                                                                              {
  if (null()) return HcalGenEmpty;
  switch (det()) {
  case Calo : 
    switch (subdetId()) {
    case HcalZDCDetId::SubdetectorId : return HcalGenZDC;
    case HcalCastorDetId::SubdetectorId : return HcalGenCastor;
    default: return HcalGenUnknown;
    } 
  case Hcal :
    switch (HcalSubdetector(subdetId())) {
    case 0: return HcalGenEmpty;
    case HcalBarrel: return HcalGenBarrel;
    case HcalEndcap: return HcalGenEndcap;
    case HcalOuter: return HcalGenOuter;
    case HcalForward: return HcalGenForward;
    case HcalTriggerTower: return HcalGenTriggerTower;
    case HcalOther:
      switch (otherSubdet ()) {
      case HcalCalibration: return HcalGenCalibration;
      default: return HcalGenUnknown;
    }
    default: return HcalGenUnknown;
    }
    default: return HcalGenUnknown;
  }
  return HcalGenUnknown;
}
bool HcalGenericDetId::isHcalCalibDetId ( ) const
bool HcalGenericDetId::isHcalCastorDetId ( ) const
bool HcalGenericDetId::isHcalDetId ( ) const
bool HcalGenericDetId::isHcalTrigTowerDetId ( ) const
bool HcalGenericDetId::isHcalZDCDetId ( ) const
HcalOtherSubdetector HcalGenericDetId::otherSubdet ( ) const

Definition at line 15 of file HcalGenericDetId.cc.

References HcalOther, HcalOtherEmpty, DetId::rawId(), and DetId::subdetId().

Referenced by genericSubdet().

                                                          {
  if (HcalSubdetector(subdetId()) != HcalOther) return HcalOtherEmpty;
  return HcalOtherSubdetector ((rawId()>>20)&0x1F);
}