00001 //------------------------------------------------- 00002 // 00012 // 00013 //-------------------------------------------------- 00014 #ifndef DT_CONFIG_TSPHI_H 00015 #define DT_CONFIG_TSPHI_H 00016 00017 //--------------- 00018 // C++ Headers -- 00019 //--------------- 00020 00021 //---------------------- 00022 // Base Class Headers -- 00023 //---------------------- 00024 00025 //------------------------------------ 00026 // Collaborating Class Declarations -- 00027 //------------------------------------ 00028 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00029 #include "L1TriggerConfig/DTTPGConfig/interface/BitArray.h" 00030 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfig.h" 00031 #include "boost/cstdint.hpp" 00032 00033 // --------------------- 00034 // -- Class Interface -- 00035 // --------------------- 00036 00037 class DTConfigTSPhi : public DTConfig { 00038 00039 public: 00040 00042 static const int NTSSTSM = 7; 00043 00045 static const int NTSMD = 2; 00046 00048 static const int NTSSTSMD = 3; 00049 00051 static const int default_tsmsk = 312; 00052 00054 static const int default_gs = 1; 00055 00057 static const int default_hsp = 1; 00058 00060 static const int default_tsmword = 255; 00061 00063 DTConfigTSPhi(const edm:: ParameterSet& ps); 00064 00066 DTConfigTSPhi() {}; 00067 00069 ~DTConfigTSPhi(); 00070 00072 inline bool debug() const { return m_debug; } 00073 00075 inline int TssMasking(int i) const { return (int)m_tssmsk[i]; } 00076 00078 inline bool TssHtrigEna(int i) const { return m_tsshte[i]; } 00079 00081 inline bool TssHtrigEnaCarry() const { return m_tsshte[2]; } 00082 00084 inline bool TssInOutEna(int i) const { return m_tssnoe[i]; } 00085 00087 inline bool TssInOutEnaCarry() const { return m_tssnoe[2]; } 00088 00090 inline bool TssCorrEna(int i) const { return m_tsscce[i]; } 00091 00093 inline bool TssCorrEnaCarry() const { return m_tsscce[2]; } 00094 00096 inline int TsmMasking(int i) const { return (int)m_tsmmsk[i]; } 00097 00099 inline bool TsmHtrigEna(int i) const { return m_tsmhte[i]; } 00100 00102 inline bool TsmHtrigEnaCarry() const { return m_tsmhte[2]; } 00103 00105 inline bool TsmInOutEna(int i) const { return m_tsmnoe[i]; } 00106 00108 inline bool TsmInOutEnaCarry() const { return m_tsmnoe[2]; } 00109 00111 inline bool TsmCorrEna(int i) const { return m_tsmcce[i]; } 00112 00114 inline bool TsmCorrEnaCarry() const { return m_tsmcce[2]; } 00115 00117 inline int TssGhost1Flag() const { return (int)m_tssgs1; } 00118 00120 inline int TssGhost2Flag() const { return (int)m_tssgs2; } 00121 00123 inline int TsmGhost1Flag() const { return (int)m_tsmgs1; } 00124 00126 inline int TsmGhost2Flag() const { return (int)m_tsmgs2; } 00127 00129 inline bool TssGhost1Corr() const { return m_tsscgs1; } 00130 00132 inline bool TssGhost2Corr() const { return m_tsscgs2; } 00133 00135 inline bool TsmGhost1Corr() const { return m_tsmcgs1; } 00136 00138 inline bool TsmGhost2Corr() const { return m_tsmcgs2; } 00139 00141 inline int TsmGetCarryFlag() const { return (int)m_tsmhsp; } 00142 00144 inline bool usedTraco(int i) const { return (bool) m_tstren.element(i-1); } 00145 00147 inline BitArray<8> TsmStatus() const { return m_tsmword; }; 00148 00149 // DBSM-doubleTSM 00151 int TSSinTSMD(int stat, int sect); 00152 00154 void print() const ; 00155 00156 private: 00157 00159 bool checkMask(int); 00160 00162 void setDefaults(const edm:: ParameterSet& ps); 00163 00164 bool m_debug; 00165 00166 // TSS Parameters 00167 unsigned short int m_tssmsk[2]; // [0]=1st [1]=2nd 00168 bool m_tsshte[3]; // [0]=1st [1]=2nd [2]=carry 00169 bool m_tssnoe[3]; // [0]=1st [1]=2nd [2]=carry 00170 bool m_tsscce[3]; // [0]=1st [1]=2nd [2]=carry 00171 unsigned short int m_tssgs1; 00172 unsigned short int m_tssgs2; 00173 bool m_tsscgs1; 00174 bool m_tsscgs2; 00175 00176 //TSM Parameters 00177 unsigned short int m_tsmmsk[2]; // [0]=1st [1]=2nd 00178 bool m_tsmhte[3]; // [0]=1st [1]=2nd [2]=carry 00179 bool m_tsmnoe[3]; // [0]=1st [1]=2nd [2]=carry 00180 bool m_tsmcce[3]; // [0]=1st [1]=2nd [2]=carry 00181 unsigned short int m_tsmgs1; 00182 unsigned short int m_tsmgs2; 00183 bool m_tsmcgs1; 00184 bool m_tsmcgs2; 00185 unsigned short int m_tsmhsp; 00186 00187 00188 BitArray<24> m_tstren; // Enabled TRACOs 00189 BitArray<8> m_tsmword; // TSM backup mode word 00190 unsigned short int m_ntsstsmd; // nb tss to one of the tsmd (only if back-up mode) 00191 00192 }; 00193 00194 #endif