CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
57  enum { kDepEM = 5,
58  kDepHAD = 4,
59  kDepLUM = 2,
60  kDepRPD = 16,
63 
64 public:
65 
67 
68 };
69 
70 std::ostream& operator<<(std::ostream&,const HcalZDCDetId& id);
71 
72 #endif // DataFormats_HcalDetId_HcalZDCDetId_h_included
static bool validDetId(Section se, int dp)
static bool validDenseIndex(uint32_t di)
Definition: HcalZDCDetId.h:49
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalZDCDetId.h:39
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
static const int kZDCSectionOffset
Definition: HcalZDCDetId.h:20
static const int kZDCZsideMask
Definition: HcalZDCDetId.h:21
static const int kZDCChannelMask
Definition: HcalZDCDetId.h:18
static const int kZDCSectionMask
Definition: HcalZDCDetId.h:19
static const int kZDCRPDMask
Definition: HcalZDCDetId.h:22
static HcalZDCDetId detIdFromDenseIndex(uint32_t di)
Definition: HcalZDCDetId.cc:78
Definition: DetId.h:18
static const int SubdetectorId
Definition: HcalZDCDetId.h:25
auto dp
Definition: deltaR.h:22
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:54
uint32_t id_
Definition: DetId.h:55
int channel() const
get the channel
Definition: HcalZDCDetId.cc:62
Section section() const
get the section
Definition: HcalZDCDetId.cc:47
HcalZDCDetId & operator=(const DetId &id)
Definition: HcalZDCDetId.cc:38
uint32_t denseIndex() const
Definition: HcalZDCDetId.cc:68