CMS 3D CMS Logo

HcalZDCDetId.h

Go to the documentation of this file.
00001 #ifndef HcalZDCDetId_h_included
00002 #define HcalZDCDetId_h_included 1
00003 
00004 #include <ostream>
00005 #include "DataFormats/DetId/interface/DetId.h"
00006 
00018 class HcalZDCDetId : public DetId {
00019 public:
00020   enum Section { Unknown=0, EM=1, HAD=2, LUM=3 };
00021   // 1 => CaloTower, 3 => Castor
00022   static const int SubdetectorId = 2;
00023 
00025   HcalZDCDetId();
00027   HcalZDCDetId(uint32_t rawid);
00029   HcalZDCDetId(Section section, bool true_for_positive_eta, int depth);
00031   HcalZDCDetId(const DetId& id);
00033   HcalZDCDetId& operator=(const DetId& id);
00034 
00036   int zside() const { return (id_&0x40)?(1):(-1); }
00038   Section section() const { return (Section)((id_>>4)&0x3); }
00040   int depth() const { return id_&0xF; }
00042   int channel() const { return id_&0xF; }
00043 
00044   uint32_t denseIndex() const ;
00045 
00046   static bool validDenseIndex( uint32_t di ) { return ( di < kSizeForDenseIndexing ) ; }
00047 
00048   static HcalZDCDetId detIdFromDenseIndex( uint32_t di ) ;
00049 
00050   static bool validDetId( Section se ,
00051                           int     dp   ) ;
00052 
00053    private:
00054 
00055       enum { kDepEM  = 5,
00056              kDepHAD = 4,
00057              kDepLUM = 2,
00058              kDepTot = kDepEM + kDepHAD + kDepLUM };
00059 
00060    public:
00061 
00062       enum { kSizeForDenseIndexing = 2*kDepTot } ;
00063 
00064 };
00065 
00066 std::ostream& operator<<(std::ostream&,const HcalZDCDetId& id);
00067 
00068 
00069 #endif // HcalZDCDetId_h_included

Generated on Tue Jun 9 17:30:59 2009 for CMSSW by  doxygen 1.5.4