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