CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EcalPnDiodeDetId.h
Go to the documentation of this file.
1 #ifndef ECALDETID_ECALPNDIODEDETID_H
2 #define ECALDETID_ECALPNDIODEDETID_H
3 
4 #include <ostream>
7 
22 class EcalPnDiodeDetId : public DetId {
23 public:
27  EcalPnDiodeDetId(uint32_t rawid);
30  EcalPnDiodeDetId(int EcalSubDetectorId, int DCCId, int PnId);
32  EcalPnDiodeDetId(const DetId& id);
34  EcalPnDiodeDetId& operator=(const DetId& id);
35 
36  static const int MAX_DCCID = 54;
37  static const int MIN_DCCID = 1;
38  static const int MAX_PNID = 15;
39  static const int MIN_PNID = 1;
40 
42  int iEcalSubDetectorId() const { return (id_ & 0x800) ? (EcalEndcap) : (EcalBarrel); }
44  int iDCCId() const { return (id_ >> 4) & 0x7F; }
46  int iPnId() const { return id_ & 0xF; }
48  int hashedIndex() const;
49 };
50 
51 std::ostream& operator<<(std::ostream&, const EcalPnDiodeDetId& id);
52 
53 #endif
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
EcalPnDiodeDetId & operator=(const DetId &id)
static const int MIN_DCCID
int iPnId() const
get the PnId
static const int MAX_PNID
int iEcalSubDetectorId() const
get EcalSubDetectorId
static const int MAX_DCCID
int iDCCId() const
get the DCCId
Definition: DetId.h:17
int hashedIndex() const
get a compact index for arrays [TODO: NEEDS WORK]
uint32_t id_
Definition: DetId.h:69
static const int MIN_PNID