CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CaloTowerDetId.h
Go to the documentation of this file.
1 #ifndef DATAFORMATS_CALOTOWERS_CALOTOWERDETID_H
2 #define DATAFORMATS_CALOTOWERS_CALOTOWERDETID_H 1
3 
5 
12 class CaloTowerDetId : public DetId {
13 public:
17  explicit CaloTowerDetId(uint32_t rawid);
19  CaloTowerDetId(int tower_ieta, int tower_iphi);
21  CaloTowerDetId(const DetId& id);
23  CaloTowerDetId& operator=(const DetId& id);
24 
26  int zside() const { return (id_&0x2000)?(1):(-1); }
28  int ietaAbs() const { return (id_>>7)&0x3f; }
30  int ieta() const { return zside()*ietaAbs(); }
32  int iphi() const;
33 
34  static const int SubdetId = 1;
35 
36 };
37 
38 std::ostream& operator<<(std::ostream&, const CaloTowerDetId& id);
39 
40 #endif
int ietaAbs() const
get the absolute value of the tower ieta
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
CaloTowerDetId & operator=(const DetId &id)
static const int SubdetId
int iphi() const
get the tower iphi
Definition: DetId.h:18
uint32_t id_
Definition: DetId.h:55
int zside() const
get the z-side of the tower (1/-1)
int ieta() const
get the tower ieta