CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions
HcalGenericDetId Class Reference

#include <HcalGenericDetId.h>

Inheritance diagram for HcalGenericDetId:
DetId

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 Types inherited from DetId
enum  Detector {
  Tracker =1, Muon =2, Ecal =3, Hcal =4,
  Calo =5, Forward =6, VeryForward =7, HGCalEE =8,
  HGCalHSi =9, HGCalHSc =10, HGCalTrigger =11
}
 

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
 
- Public Member Functions inherited from DetId
constexpr Detector det () const
 get the detector field from this detid More...
 
constexpr DetId ()
 Create an empty or null id (also for persistence) More...
 
constexpr DetId (uint32_t id)
 Create an id from a raw number. More...
 
constexpr DetId (Detector det, int subdet)
 Create an id, filling the detector and subdetector fields as specified. More...
 
constexpr bool null () const
 is this a null id ? More...
 
constexpr operator uint32_t () const
 
constexpr bool operator!= (DetId id) const
 inequality More...
 
constexpr uint32_t operator() () const
 
constexpr bool operator< (DetId id) const
 comparison More...
 
constexpr bool operator== (DetId id) const
 equality More...
 
constexpr uint32_t rawId () const
 get the raw id More...
 
constexpr int subdetId () const
 get the contents of the subdetector field (not cast into any detector's numbering enum) More...
 

Additional Inherited Members

- Static Public Attributes inherited from DetId
static const int kDetMask = 0xF
 
static const int kDetOffset = 28
 
static const int kSubdetMask = 0x7
 
static const int kSubdetOffset = 25
 
- Protected Attributes inherited from DetId
uint32_t id_
 

Detailed Description

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

R.Ofierzynski, 22.02.2008, added hashedId

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

Definition at line 15 of file HcalGenericDetId.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

HcalGenericDetId::HcalGenericDetId ( )
inline

Definition at line 19 of file HcalGenericDetId.h.

19 : DetId () {}
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:30
HcalGenericDetId::HcalGenericDetId ( uint32_t  rawid)
inline

Definition at line 20 of file HcalGenericDetId.h.

20 : DetId (rawid) {}
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:30
HcalGenericDetId::HcalGenericDetId ( const DetId id)
inline

Definition at line 21 of file HcalGenericDetId.h.

References genericSubdet(), isHcalCalibDetId(), isHcalCastorDetId(), isHcalDetId(), isHcalTrigTowerDetId(), isHcalZDCDetId(), operator<<(), and otherSubdet().

21 : DetId (id) {}
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:30

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(), HcalZDCDetId::SubdetectorId, HcalCastorDetId::SubdetectorId, and DetId::subdetId().

Referenced by HcalAmplifier::addPedestals(), HcalLutAnalyzer::analyze(), HcalLuttoDB::analyze(), hcaldqm::DQHarvester::beginRun(), hcaldqm::DQClient::beginRun(), hcaldqm::DQTask::bookHistograms(), HcalShapes::defaultShape(), HcalPacker::findSamples(), HcalDbHardcode::getGainIndex(), HcalLogicalMap::getHcalFrontEndId(), HcalDbHardcode::getParameters(), HcalSeverityLevelComputer::getSeverityLevel(), HcalGenericDetId(), HcalText2DetIdConverter::init(), isHcalCalibDetId(), isHcalCastorDetId(), isHcalDetId(), isHcalTrigTowerDetId(), isHcalZDCDetId(), CastorDbHardcode::makeGain(), HcalDbHardcode::makeHardcodeSiPMParameter(), HcalDbHardcode::makeMCParam(), CastorDbHardcode::makePedestal(), CastorDbHardcode::makeQIECoder(), HcalDbHardcode::makeRecoParam(), HcalDbHardcode::makeTimingParam(), CastorDbASCIIIO::DetIdLess::operator()(), operator<<(), and HcalSeverityLevelComputer::recoveredRecHit().

20  {
21  if (null()) return HcalGenEmpty;
22  switch (det()) {
23  case Calo :
24  switch (subdetId()) {
27  default: return HcalGenUnknown;
28  }
29  case Hcal :
30  switch (HcalSubdetector(subdetId())) {
31  case 0: return HcalGenEmpty;
32  case HcalBarrel: return HcalGenBarrel;
33  case HcalEndcap: return HcalGenEndcap;
34  case HcalOuter: return HcalGenOuter;
35  case HcalForward: return HcalGenForward;
37  case HcalOther:
38  switch (otherSubdet ()) {
40  default: return HcalGenUnknown;
41  }
42  default: return HcalGenUnknown;
43  }
44  default: return HcalGenUnknown;
45  }
46  return HcalGenUnknown;
47 }
constexpr bool null() const
is this a null id ?
Definition: DetId.h:49
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
HcalSubdetector
Definition: HcalAssistant.h:31
static const int SubdetectorId
static const int SubdetectorId
Definition: HcalZDCDetId.h:25
HcalOtherSubdetector otherSubdet() const
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39
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(), and HcalGenericDetId().

15  {
17  return HcalOtherSubdetector ((rawId()>>20)&0x1F);
18 }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:47
HcalOtherSubdetector
Definition: HcalAssistant.h:32
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
HcalSubdetector
Definition: HcalAssistant.h:31