CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Protected Attributes
HcalDcsDetId Class Reference

#include <HcalDcsDetId.h>

Inheritance diagram for HcalDcsDetId:
HcalOtherDetId DetId

Public Types

enum  DcsType {
  HV = 1, BV = 2, CATH = 3, DYN7 = 4,
  DYN8 = 5, RM_TEMP = 6, CCM_TEMP = 7, CALIB_TEMP = 8,
  LVTTM_TEMP = 9, TEMP = 10, QPLL_LOCK = 11, STATUS = 12,
  DCSUNKNOWN = 15, DCS_MAX = 16
}
 
- 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

 HcalDcsDetId ()
 
 HcalDcsDetId (const DetId &id)
 
 HcalDcsDetId (HcalOtherSubdetector subd, int side_or_ring, unsigned int slc, DcsType ty, unsigned int subchan)
 
 HcalDcsDetId (uint32_t rawid)
 
int ring () const
 
int slice () const
 
int subchannel () const
 
DcsType type () const
 
int zside () const
 
- Public Member Functions inherited from HcalOtherDetId
 HcalOtherDetId (const DetId &id)
 
HcalOtherDetIdoperator= (const DetId &id)
 
HcalOtherSubdetector subdet () const
 get the category More...
 
- 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...
 

Static Public Member Functions

static DcsType DcsTypeFromString (const std::string &str)
 
static std::string typeString (DcsType typ)
 

Static Public Attributes

static const int maxLinearIndex = 0x16800
 
- 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
 

Static Protected Attributes

static unsigned const int kRingOffset = 17
 
static unsigned const int kSideOffset = 19
 
static unsigned const int kSliceOffset = 12
 
static unsigned const int kSubChannelOffset = 4
 
static unsigned const int kTypeOffset = 8
 

Additional Inherited Members

- Protected Member Functions inherited from HcalOtherDetId
 HcalOtherDetId ()
 
 HcalOtherDetId (HcalOtherSubdetector subdet)
 Constructor from signed ieta, iphi plus composite type and composite data. More...
 
 HcalOtherDetId (uint32_t rawid)
 
- Protected Attributes inherited from DetId
uint32_t id_
 

Detailed Description

for use to identify HcalDcsChannels

bit packing [31:28] from DetId to identify detector (Hcal) [27:25] from DetId to identify subdetector (HcalOther) [24:20] other subdet id [19:19] zside +/- [18:17] HO ring (not important in other subdets) [16:12] Slice (phi slice for HB HE, Sector for HO, Quadrant for HF) [11:8] Type from the DCSType list [7:4] sub-channel a number to identify the channel can be from 0 to 15 [3:0] still open

Definition at line 27 of file HcalDcsDetId.h.

Member Enumeration Documentation

◆ DcsType

Enumerator
HV 
BV 
CATH 
DYN7 
DYN8 
RM_TEMP 
CCM_TEMP 
CALIB_TEMP 
LVTTM_TEMP 
TEMP 
QPLL_LOCK 
STATUS 
DCSUNKNOWN 
DCS_MAX 

Definition at line 29 of file HcalDcsDetId.h.

29  {
30  HV = 1,
31  BV = 2,
32  CATH = 3,
33  DYN7 = 4,
34  DYN8 = 5,
35  RM_TEMP = 6,
36  CCM_TEMP = 7,
37  CALIB_TEMP = 8,
38  LVTTM_TEMP = 9,
39  TEMP = 10,
40  QPLL_LOCK = 11,
41  STATUS = 12,
42  DCSUNKNOWN = 15,
43  DCS_MAX = 16
44  };

Constructor & Destructor Documentation

◆ HcalDcsDetId() [1/4]

HcalDcsDetId::HcalDcsDetId ( )

Definition at line 5 of file HcalDcsDetId.cc.

5 : HcalOtherDetId() {}

◆ HcalDcsDetId() [2/4]

HcalDcsDetId::HcalDcsDetId ( uint32_t  rawid)

Definition at line 7 of file HcalDcsDetId.cc.

7 : HcalOtherDetId(rawid) {}

◆ HcalDcsDetId() [3/4]

HcalDcsDetId::HcalDcsDetId ( const DetId id)

Definition at line 9 of file HcalDcsDetId.cc.

9  : HcalOtherDetId(id) {
10  if ((subdet() != HcalDcsBarrel) || (subdet() != HcalDcsEndcap) || (subdet() != HcalDcsOuter) ||
11  (subdet() != HcalDcsForward)) {
12  throw cms::Exception("Invalid DetId") << "Cannot intialize HcalDcsDetId from " << std::hex << id_ << std::dec;
13  }
14 }

References TauDecayModes::dec, Exception, HcalDcsBarrel, HcalDcsEndcap, HcalDcsForward, HcalDcsOuter, DetId::id_, and HcalOtherDetId::subdet().

◆ HcalDcsDetId() [4/4]

HcalDcsDetId::HcalDcsDetId ( HcalOtherSubdetector  subd,
int  side_or_ring,
unsigned int  slc,
DcsType  ty,
unsigned int  subchan 
)

Definition at line 16 of file HcalDcsDetId.cc.

18  : HcalOtherDetId(subd) {
19  id_ |= ((side_or_ring > 0) ? ((1 << kSideOffset) | (side_or_ring << kRingOffset)) : ((-side_or_ring) << kRingOffset));
20  id_ |= (slc & 0x1F) << kSliceOffset;
21  id_ |= (ty & 0xF) << kTypeOffset;
22  id_ |= (subchan & 0xF) << kSubChannelOffset;
23 }

References DetId::id_, kRingOffset, kSideOffset, kSliceOffset, kSubChannelOffset, and kTypeOffset.

Member Function Documentation

◆ DcsTypeFromString()

HcalDcsDetId::DcsType HcalDcsDetId::DcsTypeFromString ( const std::string &  str)
static

Definition at line 25 of file HcalDcsDetId.cc.

25  {
26  int ty(HV);
27  do {
29  return HcalDcsDetId::DcsType(ty);
30  } while (++ty != DCS_MAX);
31  return DCSUNKNOWN;
32 }

References DCS_MAX, DCSUNKNOWN, HV, str, and typeString().

◆ ring()

int HcalDcsDetId::ring ( ) const
inline

◆ slice()

int HcalDcsDetId::slice ( ) const
inline

Definition at line 56 of file HcalDcsDetId.h.

56 { return ((id_ >> kSliceOffset) & 0x1F); }

References DetId::id_, and kSliceOffset.

Referenced by HcalDcsMap::lookup(), and HcalDcsMapAddons::Helper::mapGeomId2DcsId().

◆ subchannel()

int HcalDcsDetId::subchannel ( ) const
inline

Definition at line 58 of file HcalDcsDetId.h.

58 { return ((id_ >> kSubChannelOffset) & 0xF); }

References DetId::id_, and kSubChannelOffset.

Referenced by HcalDcsMap::lookup(), and HcalDcsMapAddons::Helper::mapGeomId2DcsId().

◆ type()

DcsType HcalDcsDetId::type ( ) const
inline

Definition at line 57 of file HcalDcsDetId.h.

57 { return DcsType((id_ >> kTypeOffset) & 0xF); }

References DetId::id_, and kTypeOffset.

◆ typeString()

std::string HcalDcsDetId::typeString ( DcsType  typ)
static

Definition at line 34 of file HcalDcsDetId.cc.

34  {
35  switch (typ) {
36  case HV:
37  return "HV";
38  case BV:
39  return "BV";
40  case CATH:
41  return "CATH";
42  case DYN7:
43  return "DYN7";
44  case DYN8:
45  return "DYN8";
46  case RM_TEMP:
47  return "RM_TEMP";
48  case CCM_TEMP:
49  return "CCM_TEMP";
50  case CALIB_TEMP:
51  return "CALIB_TEMP";
52  case LVTTM_TEMP:
53  return "LVTTM_TEMP";
54  case TEMP:
55  return "TEMP";
56  case QPLL_LOCK:
57  return "QPLL_LOCK";
58  case STATUS:
59  return "STATUS";
60  default:
61  return "DCSUNKNOWN";
62  }
63  return "Invalid";
64 }

References BV, CALIB_TEMP, CATH, CCM_TEMP, DYN7, DYN8, HV, LVTTM_TEMP, QPLL_LOCK, RM_TEMP, STATUS, and TEMP.

Referenced by DcsTypeFromString().

◆ zside()

int HcalDcsDetId::zside ( ) const
inline

Definition at line 54 of file HcalDcsDetId.h.

54 { return (((id_ >> kSideOffset) & 0x1) ? 1 : -1); }

References DetId::id_, kSideOffset, and testProducerWithPsetDescEmpty_cfi::x1.

Referenced by ring().

Member Data Documentation

◆ kRingOffset

unsigned const int HcalDcsDetId::kRingOffset = 17
staticprotected

Definition at line 64 of file HcalDcsDetId.h.

Referenced by HcalDcsDetId(), and ring().

◆ kSideOffset

unsigned const int HcalDcsDetId::kSideOffset = 19
staticprotected

Definition at line 63 of file HcalDcsDetId.h.

Referenced by HcalDcsDetId(), and zside().

◆ kSliceOffset

unsigned const int HcalDcsDetId::kSliceOffset = 12
staticprotected

Definition at line 65 of file HcalDcsDetId.h.

Referenced by HcalDcsDetId(), and slice().

◆ kSubChannelOffset

unsigned const int HcalDcsDetId::kSubChannelOffset = 4
staticprotected

Definition at line 67 of file HcalDcsDetId.h.

Referenced by HcalDcsDetId(), and subchannel().

◆ kTypeOffset

unsigned const int HcalDcsDetId::kTypeOffset = 8
staticprotected

Definition at line 66 of file HcalDcsDetId.h.

Referenced by HcalDcsDetId(), and type().

◆ maxLinearIndex

const int HcalDcsDetId::maxLinearIndex = 0x16800
static

Definition at line 60 of file HcalDcsDetId.h.

HcalDcsDetId::DCSUNKNOWN
Definition: HcalDcsDetId.h:42
HcalDcsDetId::CCM_TEMP
Definition: HcalDcsDetId.h:36
HcalDcsDetId::RM_TEMP
Definition: HcalDcsDetId.h:35
HcalDcsDetId::CATH
Definition: HcalDcsDetId.h:32
HcalDcsEndcap
Definition: HcalSubdetector.h:18
HcalDcsDetId::kSubChannelOffset
static unsigned const int kSubChannelOffset
Definition: HcalDcsDetId.h:67
HcalDcsDetId::TEMP
Definition: HcalDcsDetId.h:39
HcalDcsDetId::typeString
static std::string typeString(DcsType typ)
Definition: HcalDcsDetId.cc:34
HcalDcsDetId::DYN8
Definition: HcalDcsDetId.h:34
HcalDcsDetId::kSliceOffset
static unsigned const int kSliceOffset
Definition: HcalDcsDetId.h:65
HcalDcsDetId::DcsType
DcsType
Definition: HcalDcsDetId.h:29
HcalOtherDetId::HcalOtherDetId
HcalOtherDetId()
Definition: HcalOtherDetId.cc:4
HcalDcsDetId::QPLL_LOCK
Definition: HcalDcsDetId.h:40
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
HcalDcsDetId::kSideOffset
static unsigned const int kSideOffset
Definition: HcalDcsDetId.h:63
str
#define str(s)
Definition: TestProcessor.cc:53
HcalDcsDetId::HV
Definition: HcalDcsDetId.h:30
HcalDcsOuter
Definition: HcalSubdetector.h:19
DetId::id_
uint32_t id_
Definition: DetId.h:69
HcalDcsDetId::kRingOffset
static unsigned const int kRingOffset
Definition: HcalDcsDetId.h:64
HcalDcsDetId::DYN7
Definition: HcalDcsDetId.h:33
HcalDcsDetId::zside
int zside() const
Definition: HcalDcsDetId.h:54
HcalDcsDetId::LVTTM_TEMP
Definition: HcalDcsDetId.h:38
HcalDcsDetId::kTypeOffset
static unsigned const int kTypeOffset
Definition: HcalDcsDetId.h:66
HcalDcsDetId::BV
Definition: HcalDcsDetId.h:31
HcalDcsDetId::DCS_MAX
Definition: HcalDcsDetId.h:43
HcalDcsBarrel
Definition: HcalSubdetector.h:17
Exception
Definition: hltDiff.cc:245
HcalDcsDetId::STATUS
Definition: HcalDcsDetId.h:41
HcalOtherDetId::subdet
HcalOtherSubdetector subdet() const
get the category
Definition: HcalOtherDetId.h:30
HcalDcsForward
Definition: HcalSubdetector.h:20
HcalDcsDetId::CALIB_TEMP
Definition: HcalDcsDetId.h:37
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142