CMS 3D CMS Logo

EcalTriggerElectronicsId.h

Go to the documentation of this file.
00001 #ifndef DATAFORMATS_ECALDETID_ECALTRIGGERELECTRONICSID_H
00002 #define DATAFORMATS_ECALDETID_ECALTRIGGERELECTRONICSID_H 1
00003 
00004 #include <ostream>
00005 
00006 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
00007 
00008 
00019 class EcalTriggerElectronicsId {
00020   
00021  public:
00022 
00024   EcalTriggerElectronicsId();
00026   EcalTriggerElectronicsId(uint32_t);
00028   EcalTriggerElectronicsId(int tccid, int towerid, int pseudostripid, int channelid);
00029   
00030   uint32_t operator()() { return EcalTriggerElectronicsId_; }
00031   uint32_t rawId() const { return EcalTriggerElectronicsId_; }
00032   
00034   int tccId() const { return (EcalTriggerElectronicsId_>>13)&0x7F; }
00036   int ttId() const { return (EcalTriggerElectronicsId_>>6)&0x7F; }
00038   int pseudoStripId() const { return (EcalTriggerElectronicsId_>>3)&0x7; }
00040   int channelId() const { return (EcalTriggerElectronicsId_&0x7); }
00042   int linearIndex() const { return (EcalTriggerElectronicsId_)&0xFFFFF; }
00043   
00045   int zside() const;
00046 
00048   EcalSubdetector subdet() const;
00049 
00050   static const int MAX_TCCID = 108; //To be updated with correct and final number
00051   static const int MIN_TCCID = 1;
00052   static const int MAX_TTID = 68;
00053   static const int MIN_TTID = 1;
00054   static const int MAX_PSEUDOSTRIPID = 5;
00055   static const int MIN_PSEUDOSTRIPID = 1;
00056   static const int MAX_CHANNELID = 5;
00057   static const int MIN_CHANNELID = 1;
00058 
00059   static const int MIN_TCCID_EEM = 1;
00060   static const int MAX_TCCID_EEM = 36;
00061   static const int MIN_TCCID_EBM = 37;
00062   static const int MAX_TCCID_EBM = 54;
00063   static const int MIN_TCCID_EBP = 55;
00064   static const int MAX_TCCID_EBP = 72;
00065   static const int MIN_TCCID_EEP = 73;
00066   static const int MAX_TCCID_EEP = 108;
00067   
00068   static const int TCCID_PHI0_EEM_IN  = 1;     // id of the inner TCC in EE- which contains phi=0 deg.
00069   static const int TCCID_PHI0_EEM_OUT = 19;    // id of the outer TCC in EE- which contains phi=0 deg.
00070   static const int TCCID_PHI0_EEP_IN  = 91;    // id of the inner TCC in EE+ which contains phi=0 deg.
00071   static const int TCCID_PHI0_EEP_OUT = 73;    // id of the outer TCC in EE+ which contains phi=0 deg.
00072   static const int TCCID_PHI0_EBM = 37;        // id of the TCC in EB- which contains phi=0 deg.
00073   static const int TCCID_PHI0_EBP = 55;        // id of the TCC in EB+ which contains phi=0 deg.
00074 
00075 
00077   int operator==(const EcalTriggerElectronicsId& id) const { return id.EcalTriggerElectronicsId_==EcalTriggerElectronicsId_; }
00079   int operator!=(const EcalTriggerElectronicsId& id) const { return id.EcalTriggerElectronicsId_!=EcalTriggerElectronicsId_; }
00081   int operator<(const EcalTriggerElectronicsId& id) const { return EcalTriggerElectronicsId_<id.EcalTriggerElectronicsId_; }
00082   
00083  private:
00084   
00085   uint32_t EcalTriggerElectronicsId_;
00086 };
00087 
00088 std::ostream& operator<<(std::ostream&,const EcalTriggerElectronicsId&);
00089 
00090   
00091 #endif

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