CMS 3D CMS Logo

HcalZDCDetId.h
Go to the documentation of this file.
1 #ifndef DataFormats_HcalDetId_HcalZDCDetId_h_included
2 #define DataFormats_HcalDetId_HcalZDCDetId_h_included 1
3 
4 #include <ostream>
6 
16 class HcalZDCDetId : public DetId {
17 public:
18  static const int kZDCChannelMask = 0xF;
19  static const int kZDCSectionMask = 0x3;
20  static const int kZDCSectionOffset = 4;
21  static const int kZDCZsideMask = 0x40;
22  static const int kZDCRPDMask = 0x80;
23  enum Section { Unknown = 0, EM = 1, HAD = 2, LUM = 3, RPD = 4 };
24 
25  static const int SubdetectorId = 2;
26 
28  HcalZDCDetId();
30  HcalZDCDetId(uint32_t rawid);
32  HcalZDCDetId(Section section, bool true_for_positive_eta, int channel);
34  HcalZDCDetId(const DetId& id);
36  HcalZDCDetId& operator=(const DetId& id);
37 
39  int zside() const { return ((id_ & kZDCZsideMask) ? (1) : (-1)); }
41  Section section() const;
43  int depth() const;
45  int channel() const;
46 
47  uint32_t denseIndex() const;
48 
49  static bool validDenseIndex(uint32_t di) { return (di < kSizeForDenseIndexing); }
50 
51  static HcalZDCDetId detIdFromDenseIndex(uint32_t di);
52 
53  static bool validDetId(Section se, int dp);
54 
55 private:
56  enum {
57  kDepEM = 5,
58  kDepHAD = 4,
59  kDepLUM = 2,
60  kDepRPD = 16,
63  };
64 
65 public:
67 };
68 
69 std::ostream& operator<<(std::ostream&, const HcalZDCDetId& id);
70 
71 #endif // DataFormats_HcalDetId_HcalZDCDetId_h_included
HcalZDCDetId::kZDCSectionMask
static const int kZDCSectionMask
Definition: HcalZDCDetId.h:19
HcalZDCDetId::kDepLUM
Definition: HcalZDCDetId.h:59
HcalZDCDetId::detIdFromDenseIndex
static HcalZDCDetId detIdFromDenseIndex(uint32_t di)
Definition: HcalZDCDetId.cc:80
HcalZDCDetId::HAD
Definition: HcalZDCDetId.h:23
HcalZDCDetId::Section
Section
Definition: HcalZDCDetId.h:23
HcalZDCDetId::depth
int depth() const
get the depth (1 for EM, channel + 1 for HAD, 2 for RPD, not sure yet for LUM, leave as default)
Definition: HcalZDCDetId.cc:51
HcalZDCDetId::kZDCSectionOffset
static const int kZDCSectionOffset
Definition: HcalZDCDetId.h:20
HcalZDCDetId::channel
int channel() const
get the channel
Definition: HcalZDCDetId.cc:63
HcalZDCDetId::HcalZDCDetId
HcalZDCDetId()
Definition: HcalZDCDetId.cc:11
HcalZDCDetId::kZDCZsideMask
static const int kZDCZsideMask
Definition: HcalZDCDetId.h:21
HcalZDCDetId::validDetId
static bool validDetId(Section se, int dp)
Definition: HcalZDCDetId.cc:101
DetId
Definition: DetId.h:17
HcalZDCDetId
Definition: HcalZDCDetId.h:16
HcalZDCDetId::kZDCRPDMask
static const int kZDCRPDMask
Definition: HcalZDCDetId.h:22
Calorimetry_cff.dp
dp
Definition: Calorimetry_cff.py:157
operator<<
std::ostream & operator<<(std::ostream &, const HcalZDCDetId &id)
Definition: HcalZDCDetId.cc:107
HcalZDCDetId::kDepRPD
Definition: HcalZDCDetId.h:60
HcalZDCDetId::SubdetectorId
static const int SubdetectorId
Definition: HcalZDCDetId.h:25
HcalZDCDetId::operator=
HcalZDCDetId & operator=(const DetId &id)
Definition: HcalZDCDetId.cc:36
HcalZDCDetId::kDepHAD
Definition: HcalZDCDetId.h:58
HcalZDCDetId::zside
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalZDCDetId.h:39
HcalZDCDetId::kDepRun1
Definition: HcalZDCDetId.h:61
HcalZDCDetId::RPD
Definition: HcalZDCDetId.h:23
DetId::id_
uint32_t id_
Definition: DetId.h:69
HcalZDCDetId::Unknown
Definition: HcalZDCDetId.h:23
HcalZDCDetId::kSizeForDenseIndexing
Definition: HcalZDCDetId.h:66
HcalZDCDetId::validDenseIndex
static bool validDenseIndex(uint32_t di)
Definition: HcalZDCDetId.h:49
HcalZDCDetId::kZDCChannelMask
static const int kZDCChannelMask
Definition: HcalZDCDetId.h:18
HcalZDCDetId::kDepTot
Definition: HcalZDCDetId.h:62
DetId.h
HcalZDCDetId::kDepEM
Definition: HcalZDCDetId.h:57
HcalZDCDetId::LUM
Definition: HcalZDCDetId.h:23
HcalZDCDetId::denseIndex
uint32_t denseIndex() const
Definition: HcalZDCDetId.cc:71
HcalZDCDetId::section
Section section() const
get the section
Definition: HcalZDCDetId.cc:44
HcalZDCDetId::EM
Definition: HcalZDCDetId.h:23