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 
18 class HcalDetId : public DetId {
19 public:
21  HcalDetId();
23  HcalDetId(uint32_t rawid);
25  HcalDetId(HcalSubdetector subdet, int tower_ieta, int tower_iphi, int depth);
27  HcalDetId(const DetId& id);
29  HcalDetId& operator=(const DetId& id);
30 
34  int zside() const { return (id_&0x2000)?(1):(-1); }
36  int ietaAbs() const { return (id_>>7)&0x3f; }
38  int ieta() const { return zside()*ietaAbs(); }
40  int iphi() const { return id_&0x7F; }
42  int depth() const { return (id_>>14)&0x1F; }
44  int crystal_ieta_low() const { return ((ieta()-zside())*5)+zside(); }
46  int crystal_ieta_high() const { return ((ieta()-zside())*5)+5*zside(); }
48  int crystal_iphi_low() const;
50  int crystal_iphi_high() const;
51 
52  static const HcalDetId Undefined;
53 
54 };
55 
56 std::ostream& operator<<(std::ostream&,const HcalDetId& id);
57 
58 #endif
static const HcalDetId Undefined
Definition: HcalDetId.h:52
HcalDetId & operator=(const DetId &id)
Definition: HcalDetId.cc:32
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:32
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.h:34
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:42
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:44
int ieta() const
get the cell ieta
Definition: HcalDetId.h:38
HcalSubdetector
Definition: HcalAssistant.h:32
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.h:36
int iphi() const
get the cell iphi
Definition: HcalDetId.h:40
Definition: DetId.h:20
uint32_t id_
Definition: DetId.h:57
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:46
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