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 HcalZDCDetId_h_included
2 #define HcalZDCDetId_h_included 1
3 
4 #include <ostream>
6 
16 class HcalZDCDetId : public DetId {
17 public:
18  enum Section { Unknown=0, EM=1, HAD=2, LUM=3 };
19  // 1 => CaloTower, 3 => Castor
20  static const int SubdetectorId = 2;
21 
23  HcalZDCDetId();
25  HcalZDCDetId(uint32_t rawid);
27  HcalZDCDetId(Section section, bool true_for_positive_eta, int channel);
29  HcalZDCDetId(const DetId& id);
31  HcalZDCDetId& operator=(const DetId& id);
32 
34  int zside() const { return (id_&0x40)?(1):(-1); }
36  Section section() const { return (Section)((id_>>4)&0x3); }
38  int depth() const { return (((id_>>4)&0x3)==1)?(1):((((id_>>4)&0x3)==2)?((id_&0xF)+1):(id_&0xF)); }
40  int channel() const { return id_&0xF; }
41 
42  uint32_t denseIndex() const ;
43 
44  static bool validDenseIndex( uint32_t di ) { return ( di < kSizeForDenseIndexing ) ; }
45 
46  static HcalZDCDetId detIdFromDenseIndex( uint32_t di ) ;
47 
48  static bool validDetId( Section se, int dp ) ;
49 
50  private:
51 
52  enum { kDepEM = 5,
53  kDepHAD = 4,
54  kDepLUM = 2,
56 
57  public:
58 
60 
61 };
62 
63 std::ostream& operator<<(std::ostream&,const HcalZDCDetId& id);
64 
65 
66 #endif // HcalZDCDetId_h_included
static bool validDetId(Section se, int dp)
Definition: HcalZDCDetId.cc:61
static bool validDenseIndex(uint32_t di)
Definition: HcalZDCDetId.h:44
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalZDCDetId.h:34
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
Section section() const
get the section
Definition: HcalZDCDetId.h:36
static HcalZDCDetId detIdFromDenseIndex(uint32_t di)
Definition: HcalZDCDetId.cc:42
Definition: DetId.h:18
static const int SubdetectorId
Definition: HcalZDCDetId.h:20
auto dp
Definition: deltaR.h:22
int depth() const
get the depth (1 for EM, channel + 1 for HAD, not sure yet for LUM, leave as default) ...
Definition: HcalZDCDetId.h:38
uint32_t id_
Definition: DetId.h:55
int channel() const
get the channel
Definition: HcalZDCDetId.h:40
HcalZDCDetId & operator=(const DetId &id)
Definition: HcalZDCDetId.cc:24
uint32_t denseIndex() const
Definition: HcalZDCDetId.cc:33