CMS 3D CMS Logo

EcalElectronicsId.h

Go to the documentation of this file.
00001 #ifndef DATAFORMATS_ECALDETID_ECALELECTRONICSID_H
00002 #define DATAFORMATS_ECALDETID_ECALELECTRONICSID_H 1
00003 
00004 #include <ostream>
00005 
00006 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
00007 
00008 
00019 class EcalElectronicsId {
00020   
00021  public:
00022 
00024   EcalElectronicsId();
00026   EcalElectronicsId(uint32_t);
00028   EcalElectronicsId(int dccid, int towerid, int stripid, int xtalid);
00029   
00030   uint32_t operator()() { return EcalElectronicsId_; }
00031   uint32_t rawId() const { return EcalElectronicsId_; }
00032   
00034   int dccId() const { return (EcalElectronicsId_>>13)&0x7F; }
00036   int towerId() const { return (EcalElectronicsId_>>6)&0x7F; }
00038   int stripId() const { return (EcalElectronicsId_>>3)&0x7; }
00040   int xtalId() const { return (EcalElectronicsId_&0x7); }
00041 
00043   int zside() const;
00044 
00046   EcalSubdetector subdet() const;
00047 
00049   int linearIndex() const { return (EcalElectronicsId_)&0x3FFFFF; }
00050 
00052   int channelId() const;        // xtal id between 1 and 25
00053   
00054   static const int MAX_DCCID = 54; //To be updated with correct and final number
00055   static const int MIN_DCCID = 1;
00056   static const int MAX_TOWERID = 70;
00057   static const int MIN_TOWERID = 1;
00058   static const int MAX_STRIPID = 5;
00059   static const int MIN_STRIPID = 1;
00060   static const int MAX_CHANNELID = 25;
00061   static const int MIN_CHANNELID = 1;
00062   static const int MAX_XTALID = 5;
00063   static const int MIN_XTALID = 1;
00064   
00065   static const int MIN_DCCID_EEM = 1;
00066   static const int MAX_DCCID_EEM = 9;
00067   static const int MIN_DCCID_EBM = 10;
00068   static const int MAX_DCCID_EBM = 27;
00069   static const int MIN_DCCID_EBP = 28;
00070   static const int MAX_DCCID_EBP = 45;
00071   static const int MIN_DCCID_EEP = 46;
00072   static const int MAX_DCCID_EEP = 54;
00073 
00074   static const int DCCID_PHI0_EBM = 10;
00075   static const int DCCID_PHI0_EBP = 28;
00076 
00077   static const int kDCCChannelBoundary = 17;
00078   static const int DCC_EBM = 10;        // id of the DCC in EB- which contains phi=0 deg.
00079   static const int DCC_EBP = 28;        // id of the DCC in EB+ which contains phi=0 deg.
00080   static const int DCC_EEM = 1;         // id of the DCC in EE- which contains phi=0 deg.
00081   static const int DCC_EEP = 46;        // id of the DCC in EE+ which contains phi=0 deg.
00082 
00083 
00085   int operator==(const EcalElectronicsId& id) const { return id.EcalElectronicsId_==EcalElectronicsId_; }
00087   int operator!=(const EcalElectronicsId& id) const { return id.EcalElectronicsId_!=EcalElectronicsId_; }
00089   int operator<(const EcalElectronicsId& id) const { return EcalElectronicsId_<id.EcalElectronicsId_; }
00090   
00091  private:
00092   
00093   uint32_t EcalElectronicsId_;
00094 };
00095 
00096 std::ostream& operator<<(std::ostream&,const EcalElectronicsId&);
00097 
00098   
00099 #endif

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