CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalDetId.h
Go to the documentation of this file.
1 #ifndef DATAFORMATS_HCALDETID_HCALDETID_H
2 #define DATAFORMATS_HCALDETID_HCALDETID_H 1
3 
4 #include <iosfwd>
7 
8 
16 class HcalDetId : public DetId {
17 public:
19  HcalDetId();
21  HcalDetId(uint32_t rawid);
23  HcalDetId(HcalSubdetector subdet, int tower_ieta, int tower_iphi, int depth);
25  HcalDetId(const DetId& id);
27  HcalDetId& operator=(const DetId& id);
28 
32  int zside() const { return (id_&0x2000)?(1):(-1); }
34  int ietaAbs() const { return (id_>>7)&0x3f; }
36  int ieta() const { return zside()*ietaAbs(); }
38  int iphi() const { return id_&0x7F; }
40  int depth() const { return (id_>>14)&0x1F; }
42  int crystal_ieta_low() const { return ((ieta()-zside())*5)+zside(); }
44  int crystal_ieta_high() const { return ((ieta()-zside())*5)+5*zside(); }
46  int crystal_iphi_low() const;
48  int crystal_iphi_high() const;
49 
50  static const HcalDetId Undefined;
51 
52 };
53 
54 std::ostream& operator<<(std::ostream&,const HcalDetId& id);
55 
56 #endif
static const HcalDetId Undefined
Definition: HcalDetId.h:50
HcalDetId & operator=(const DetId &id)
Definition: HcalDetId.cc:32
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:30
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.h:32
int crystal_iphi_low() const
get the smallest crystal_iphi of the crystal in front of this tower (HB and HE tower 17 only) ...
Definition: HcalDetId.cc:46
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
HcalDetId()
Definition: HcalDetId.cc:7
int depth() const
get the tower depth
Definition: HcalDetId.h:40
int crystal_ieta_low() const
get the smallest crystal_ieta of the crystal in front of this tower (HB and HE tower 17 only) ...
Definition: HcalDetId.h:42
int ieta() const
get the cell ieta
Definition: HcalDetId.h:36
HcalSubdetector
Definition: HcalAssistant.h:31
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.h:34
int iphi() const
get the cell iphi
Definition: HcalDetId.h:38
Definition: DetId.h:18
uint32_t id_
Definition: DetId.h:55
int crystal_ieta_high() const
get the largest crystal_ieta of the crystal in front of this tower (HB and HE tower 17 only) ...
Definition: HcalDetId.h:44
int crystal_iphi_high() const
get the largest crystal_iphi of the crystal in front of this tower (HB and HE tower 17 only) ...
Definition: HcalDetId.cc:52