CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/DataFormats/EcalDetId/interface/EcalPnDiodeDetId.h

Go to the documentation of this file.
00001 #ifndef ECALDETID_ECALPNDIODEDETID_H
00002 #define ECALDETID_ECALPNDIODEDETID_H
00003 
00004 #include <ostream>
00005 #include "DataFormats/DetId/interface/DetId.h"
00006 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
00007 
00008 
00025 class EcalPnDiodeDetId : public DetId {
00026  public:
00028   EcalPnDiodeDetId();
00030   EcalPnDiodeDetId(uint32_t rawid);  
00033   EcalPnDiodeDetId(int EcalSubDetectorId, int DCCId, int PnId);
00035   EcalPnDiodeDetId(const DetId& id);
00037   EcalPnDiodeDetId& operator=(const DetId& id);
00038 
00039   static const int MAX_DCCID = 54;
00040   static const int MIN_DCCID = 1;
00041   static const int MAX_PNID = 15; 
00042   static const int MIN_PNID = 1;
00043 
00045   int iEcalSubDetectorId() const { return (id_ & 0x800 ) ? (EcalEndcap):(EcalBarrel); }
00047   int iDCCId() const { return (id_>>4) & 0x7F; }
00049   int iPnId() const { return id_&0xF; }
00051   int hashedIndex() const;
00052 
00053 };
00054 
00055 std::ostream& operator<<(std::ostream&,const EcalPnDiodeDetId& id);
00056 
00057 #endif