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 (const DetId &id)
 
 HcalGenericDetId (uint32_t rawid)
 
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 (Detector det, int subdet)
 Create an id, filling the detector and subdetector fields as specified. More...
 
constexpr DetId (uint32_t id)
 Create an id from a raw number. 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

◆ HcalGenericSubdetector

Enumerator
HcalGenEmpty 
HcalGenBarrel 
HcalGenEndcap 
HcalGenOuter 
HcalGenForward 
HcalGenTriggerTower 
HcalGenZDC 
HcalGenCalibration 
HcalGenCastor 
HcalGenUnknown 

Definition at line 17 of file HcalGenericDetId.h.

17  {
18  HcalGenEmpty = 0,
19  HcalGenBarrel = 1,
20  HcalGenEndcap = 2,
21  HcalGenOuter = 3,
22  HcalGenForward = 4,
24  HcalGenZDC = 8,
26  HcalGenCastor = 10,
27  HcalGenUnknown = 99
28  };

Constructor & Destructor Documentation

◆ HcalGenericDetId() [1/3]

HcalGenericDetId::HcalGenericDetId ( )
inline

Definition at line 29 of file HcalGenericDetId.h.

29 : DetId() {}

◆ HcalGenericDetId() [2/3]

HcalGenericDetId::HcalGenericDetId ( uint32_t  rawid)
inline

Definition at line 30 of file HcalGenericDetId.h.

30 : DetId(rawid) {}

◆ HcalGenericDetId() [3/3]

HcalGenericDetId::HcalGenericDetId ( const DetId id)
inline

Definition at line 31 of file HcalGenericDetId.h.

31 : DetId(id) {}

Member Function Documentation

◆ genericSubdet()

HcalGenericDetId::HcalGenericSubdetector HcalGenericDetId::genericSubdet ( ) const

Definition at line 21 of file HcalGenericDetId.cc.

21  {
22  if (null())
23  return HcalGenEmpty;
24  switch (det()) {
25  case Calo:
26  switch (subdetId()) {
28  return HcalGenZDC;
30  return HcalGenCastor;
31  default:
32  return HcalGenUnknown;
33  }
34  case Hcal:
35  switch (HcalSubdetector(subdetId())) {
36  case 0:
37  return HcalGenEmpty;
38  case HcalBarrel:
39  return HcalGenBarrel;
40  case HcalEndcap:
41  return HcalGenEndcap;
42  case HcalOuter:
43  return HcalGenOuter;
44  case HcalForward:
45  return HcalGenForward;
46  case HcalTriggerTower:
47  return HcalGenTriggerTower;
48  case HcalOther:
49  switch (otherSubdet()) {
50  case HcalCalibration:
51  return HcalGenCalibration;
52  default:
53  return HcalGenUnknown;
54  }
55  default:
56  return HcalGenUnknown;
57  }
58  default:
59  return HcalGenUnknown;
60  }
61  return HcalGenUnknown;
62 }

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

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

◆ isHcalCalibDetId()

bool HcalGenericDetId::isHcalCalibDetId ( ) const

◆ isHcalCastorDetId()

bool HcalGenericDetId::isHcalCastorDetId ( ) const

◆ isHcalDetId()

bool HcalGenericDetId::isHcalDetId ( ) const

◆ isHcalTrigTowerDetId()

bool HcalGenericDetId::isHcalTrigTowerDetId ( ) const

◆ isHcalZDCDetId()

bool HcalGenericDetId::isHcalZDCDetId ( ) const

◆ otherSubdet()

HcalOtherSubdetector HcalGenericDetId::otherSubdet ( ) const

Definition at line 15 of file HcalGenericDetId.cc.

15  {
17  return HcalOtherEmpty;
18  return HcalOtherSubdetector((rawId() >> 20) & 0x1F);
19 }

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

Referenced by genericSubdet().

HcalOther
Definition: HcalAssistant.h:38
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
HcalGenericDetId::HcalGenEmpty
Definition: HcalGenericDetId.h:18
DetId::Hcal
Definition: DetId.h:28
HcalGenericDetId::HcalGenEndcap
Definition: HcalGenericDetId.h:20
HcalCastorDetId::SubdetectorId
static const int SubdetectorId
Definition: HcalCastorDetId.h:28
HcalGenericDetId::HcalGenCastor
Definition: HcalGenericDetId.h:26
HcalBarrel
Definition: HcalAssistant.h:33
DetId::Calo
Definition: DetId.h:29
HcalOtherEmpty
Definition: HcalAssistant.h:40
HcalGenericDetId::HcalGenZDC
Definition: HcalGenericDetId.h:24
HcalGenericDetId::HcalGenUnknown
Definition: HcalGenericDetId.h:27
HcalOuter
Definition: HcalAssistant.h:35
HcalCalibration
Definition: HcalAssistant.h:40
HcalZDCDetId::SubdetectorId
static const int SubdetectorId
Definition: HcalZDCDetId.h:25
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
HcalOtherSubdetector
HcalOtherSubdetector
Definition: HcalAssistant.h:40
HcalGenericDetId::HcalGenericSubdetector
HcalGenericSubdetector
Definition: HcalGenericDetId.h:17
HcalGenericDetId::HcalGenTriggerTower
Definition: HcalGenericDetId.h:23
HcalGenericDetId::otherSubdet
HcalOtherSubdetector otherSubdet() const
Definition: HcalGenericDetId.cc:15
HcalGenericDetId::HcalGenBarrel
Definition: HcalGenericDetId.h:19
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
HcalForward
Definition: HcalAssistant.h:36
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
HcalEndcap
Definition: HcalAssistant.h:34
HcalGenericDetId::genericSubdet
HcalGenericSubdetector genericSubdet() const
Definition: HcalGenericDetId.cc:21
HcalTriggerTower
Definition: HcalAssistant.h:37
DetId::DetId
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:38
HcalGenericDetId::HcalGenOuter
Definition: HcalGenericDetId.h:21
HcalGenericDetId::HcalGenForward
Definition: HcalGenericDetId.h:22
HcalGenericDetId::HcalGenCalibration
Definition: HcalGenericDetId.h:25