CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/DataFormats/EcalDetId/interface/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 #include <stdint.h>
00006 
00007 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
00008 
00009 
00020 class EcalTriggerElectronicsId {
00021   
00022  public:
00023 
00025   EcalTriggerElectronicsId();
00027   EcalTriggerElectronicsId(uint32_t);
00029   EcalTriggerElectronicsId(int tccid, int towerid, int pseudostripid, int channelid);
00030   
00031   uint32_t operator()() { return EcalTriggerElectronicsId_; }
00032   uint32_t rawId() const { return EcalTriggerElectronicsId_; }
00033   
00035   int tccId() const { return (EcalTriggerElectronicsId_>>13)&0x7F; }
00037   int ttId() const { return (EcalTriggerElectronicsId_>>6)&0x7F; }
00039   int pseudoStripId() const { return (EcalTriggerElectronicsId_>>3)&0x7; }
00041   int channelId() const { return (EcalTriggerElectronicsId_&0x7); }
00043   int linearIndex() const { return (EcalTriggerElectronicsId_)&0xFFFFF; }
00044   
00046   int zside() const;
00047 
00049   EcalSubdetector subdet() const;
00050 
00051   static const int MAX_TCCID = 108; //To be updated with correct and final number
00052   static const int MIN_TCCID = 1;
00053   static const int MAX_TTID = 68;
00054   static const int MIN_TTID = 1;
00055   static const int MAX_PSEUDOSTRIPID = 5;
00056   static const int MIN_PSEUDOSTRIPID = 1;
00057   static const int MAX_CHANNELID = 5;
00058   static const int MIN_CHANNELID = 1;
00059 
00060   static const int MIN_TCCID_EEM = 1;
00061   static const int MAX_TCCID_EEM = 36;
00062   static const int MIN_TCCID_EBM = 37;
00063   static const int MAX_TCCID_EBM = 54;
00064   static const int MIN_TCCID_EBP = 55;
00065   static const int MAX_TCCID_EBP = 72;
00066   static const int MIN_TCCID_EEP = 73;
00067   static const int MAX_TCCID_EEP = 108;
00068   
00069   static const int TCCID_PHI0_EEM_IN  = 1;     // id of the inner TCC in EE- which contains phi=0 deg.
00070   static const int TCCID_PHI0_EEM_OUT = 19;    // id of the outer TCC in EE- which contains phi=0 deg.
00071   static const int TCCID_PHI0_EEP_IN  = 91;    // id of the inner TCC in EE+ which contains phi=0 deg.
00072   static const int TCCID_PHI0_EEP_OUT = 73;    // id of the outer TCC in EE+ which contains phi=0 deg.
00073   static const int TCCID_PHI0_EBM = 37;        // id of the TCC in EB- which contains phi=0 deg.
00074   static const int TCCID_PHI0_EBP = 55;        // id of the TCC in EB+ which contains phi=0 deg.
00075 
00076 
00078   int operator==(const EcalTriggerElectronicsId& id) const { return id.EcalTriggerElectronicsId_==EcalTriggerElectronicsId_; }
00080   int operator!=(const EcalTriggerElectronicsId& id) const { return id.EcalTriggerElectronicsId_!=EcalTriggerElectronicsId_; }
00082   int operator<(const EcalTriggerElectronicsId& id) const { return EcalTriggerElectronicsId_<id.EcalTriggerElectronicsId_; }
00083   
00084  private:
00085   
00086   uint32_t EcalTriggerElectronicsId_;
00087 };
00088 
00089 std::ostream& operator<<(std::ostream&,const EcalTriggerElectronicsId&);
00090 
00091   
00092 #endif