File indexing completed on 2023-10-25 09:56:39
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef DT_CONFIG_TSPHI_H
0015 #define DT_CONFIG_TSPHI_H
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0029 #include "L1TriggerConfig/DTTPGConfig/interface/BitArray.h"
0030 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfig.h"
0031
0032
0033
0034
0035
0036 class DTConfigTSPhi : public DTConfig {
0037 public:
0038
0039 static const int NTSSTSM = 7;
0040
0041
0042 static const int NTSMD = 2;
0043
0044
0045 static const int NTSSTSMD = 3;
0046
0047
0048 DTConfigTSPhi(const edm::ParameterSet& ps);
0049
0050
0051 DTConfigTSPhi(){};
0052
0053
0054 DTConfigTSPhi(bool debug, unsigned short int tss_buffer[7][31], int ntss, unsigned short int tsm_buffer[9]);
0055
0056
0057 ~DTConfigTSPhi() override;
0058
0059
0060 inline bool debug() const { return m_debug; }
0061
0062
0063 inline int TssMasking(int i) const { return (int)m_tssmsk[i]; }
0064
0065
0066 inline bool TssHtrigEna(int i) const { return m_tsshte[i]; }
0067
0068
0069 inline bool TssHtrigEnaCarry() const { return m_tsshte[2]; }
0070
0071
0072 inline bool TssInOutEna(int i) const { return m_tssnoe[i]; }
0073
0074
0075 inline bool TssInOutEnaCarry() const { return m_tssnoe[2]; }
0076
0077
0078 inline bool TssCorrEna(int i) const { return m_tsscce[i]; }
0079
0080
0081 inline bool TssCorrEnaCarry() const { return m_tsscce[2]; }
0082
0083
0084 inline int TsmMasking(int i) const { return (int)m_tsmmsk[i]; }
0085
0086
0087 inline bool TsmHtrigEna(int i) const { return m_tsmhte[i]; }
0088
0089
0090 inline bool TsmHtrigEnaCarry() const { return m_tsmhte[2]; }
0091
0092
0093 inline bool TsmInOutEna(int i) const { return m_tsmnoe[i]; }
0094
0095
0096 inline bool TsmInOutEnaCarry() const { return m_tsmnoe[2]; }
0097
0098
0099 inline bool TsmCorrEna(int i) const { return m_tsmcce[i]; }
0100
0101
0102 inline bool TsmCorrEnaCarry() const { return m_tsmcce[2]; }
0103
0104
0105 inline int TssGhost1Flag() const { return (int)m_tssgs1; }
0106
0107
0108 inline int TssGhost2Flag() const { return (int)m_tssgs2; }
0109
0110
0111 inline int TsmGhost1Flag() const { return (int)m_tsmgs1; }
0112
0113
0114 inline int TsmGhost2Flag() const { return (int)m_tsmgs2; }
0115
0116
0117 inline bool TssGhost1Corr() const { return m_tsscgs1; }
0118
0119
0120 inline bool TssGhost2Corr() const { return m_tsscgs2; }
0121
0122
0123 inline bool TsmGhost1Corr() const { return m_tsmcgs1; }
0124
0125
0126 inline bool TsmGhost2Corr() const { return m_tsmcgs2; }
0127
0128
0129 inline int TsmGetCarryFlag() const { return (int)m_tsmhsp; }
0130
0131
0132 inline bool usedTraco(int i) const { return (bool)m_tstren.element(i - 1); }
0133
0134
0135 inline BitArray<8> TsmStatus() const { return m_tsmword; };
0136
0137
0138
0139 int TSSinTSMD(int stat, int sect) const;
0140
0141
0142
0143 inline void setDebug(bool debug) { m_debug = debug; }
0144
0145
0146 void setTssMasking(unsigned short int tssmsk, int i) { m_tssmsk[i - 1] = tssmsk; }
0147
0148
0149 inline void setTssHtrigEna(bool tsshte, int i) { m_tsshte[i - 1] = tsshte; }
0150
0151
0152 inline void setTssHtrigEnaCarry(bool tsshte) { m_tsshte[2] = tsshte; }
0153
0154
0155 inline void setTssInOutEna(bool tssnoe, int i) { m_tssnoe[i - 1] = tssnoe; }
0156
0157
0158 inline void setTssInOutEnaCarry(bool tssnoe) { m_tssnoe[2] = tssnoe; }
0159
0160
0161 inline void setTssCorrEna(bool tsscce, int i) { m_tsscce[i - 1] = tsscce; }
0162
0163
0164 inline void setTssCorrEnaCarry(bool tsscce) { m_tsscce[2] = tsscce; }
0165
0166
0167 void setTsmMasking(unsigned short int tsmmsk, int i) { m_tsmmsk[i - 1] = tsmmsk; }
0168
0169
0170 inline void setTsmHtrigEna(bool tsmhte, int i) { m_tsmhte[i - 1] = tsmhte; }
0171
0172
0173 inline void setTsmHtrigEnaCarry(bool tsmhte) { m_tsmhte[2] = tsmhte; }
0174
0175
0176 inline void setTsmInOutEna(bool tsmnoe, int i) { m_tsmnoe[i - 1] = tsmnoe; }
0177
0178
0179 inline void setTsmInOutEnaCarry(bool tsmnoe) { m_tsmnoe[2] = tsmnoe; }
0180
0181
0182 inline void setTsmCorrEna(bool tsmcce, int i) { m_tsmcce[i - 1] = tsmcce; }
0183
0184
0185 inline void setTsmCorrEnaCarry(bool tsmcce) { m_tsmcce[2] = tsmcce; }
0186
0187
0188 inline void setTssGhost1Flag(unsigned short tssgs1) { m_tssgs1 = tssgs1; }
0189
0190
0191 inline void setTssGhost2Flag(unsigned short tssgs2) { m_tssgs2 = tssgs2; }
0192
0193
0194 inline void setTsmGhost1Flag(unsigned short tsmgs1) { m_tsmgs1 = tsmgs1; }
0195
0196
0197 inline void setTsmGhost2Flag(unsigned short tsmgs2) { m_tsmgs2 = tsmgs2; }
0198
0199
0200 inline void setTssGhost1Corr(bool tsscgs1) { m_tsscgs1 = tsscgs1; }
0201
0202
0203 inline void setTssGhost2Corr(bool tsscgs2) { m_tsscgs2 = tsscgs2; }
0204
0205
0206 inline void setTsmGhost1Corr(bool tsmcgs1) { m_tsmcgs1 = tsmcgs1; }
0207
0208
0209 inline void setTsmGhost2Corr(bool tsmcgs2) { m_tsmcgs2 = tsmcgs2; }
0210
0211
0212 inline void setTsmCarryFlag(unsigned short tsmhsp) { m_tsmhsp = tsmhsp; }
0213
0214
0215 inline void setUsedTraco(int i, int val) { m_tstren.set(i, val); }
0216
0217
0218 inline void setTsmStatus(int i, int val) { m_tsmword.set(i, val); };
0219
0220
0221 int nValidTSS() const;
0222
0223
0224 int nValidTSM() const;
0225
0226
0227 void print() const;
0228
0229 private:
0230
0231 bool checkMask(unsigned short) const;
0232
0233
0234 void setDefaults(const edm::ParameterSet& ps);
0235
0236 bool m_debug;
0237
0238
0239 unsigned short int m_tssmsk[2];
0240 bool m_tsshte[3];
0241 bool m_tssnoe[3];
0242 bool m_tsscce[3];
0243 unsigned short int m_tssgs1;
0244 unsigned short int m_tssgs2;
0245 bool m_tsscgs1;
0246 bool m_tsscgs2;
0247
0248
0249 unsigned short int m_tsmmsk[2];
0250 bool m_tsmhte[3];
0251 bool m_tsmnoe[3];
0252 bool m_tsmcce[3];
0253 unsigned short int m_tsmgs1;
0254 unsigned short int m_tsmgs2;
0255 bool m_tsmcgs1;
0256 bool m_tsmcgs2;
0257 unsigned short int m_tsmhsp;
0258
0259 BitArray<24> m_tstren;
0260 BitArray<8> m_tsmword;
0261
0262
0263 short int m_ntss;
0264 short int m_ntsm;
0265 };
0266
0267 #endif