CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTConfigTSPhi.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
12 //
13 //--------------------------------------------------
14 #ifndef DT_CONFIG_TSPHI_H
15 #define DT_CONFIG_TSPHI_H
16 
17 //---------------
18 // C++ Headers --
19 //---------------
20 
21 //----------------------
22 // Base Class Headers --
23 //----------------------
24 
25 //------------------------------------
26 // Collaborating Class Declarations --
27 //------------------------------------
31 #include "boost/cstdint.hpp"
32 
33 // ---------------------
34 // -- Class Interface --
35 // ---------------------
36 
37 class DTConfigTSPhi : public DTConfig {
38 
39  public:
40 
42  static const int NTSSTSM = 7;
43 
45  static const int NTSMD = 2;
46 
48  static const int NTSSTSMD = 3;
49 
52 
55 
57  DTConfigTSPhi(bool debug, unsigned short int tss_buffer[7][31], int ntss, unsigned short int tsm_buffer[9]);
58 
61 
63  inline bool debug() const { return m_debug; }
64 
66  inline int TssMasking(int i) const { return (int)m_tssmsk[i]; }
67 
69  inline bool TssHtrigEna(int i) const { return m_tsshte[i]; }
70 
72  inline bool TssHtrigEnaCarry() const { return m_tsshte[2]; }
73 
75  inline bool TssInOutEna(int i) const { return m_tssnoe[i]; }
76 
78  inline bool TssInOutEnaCarry() const { return m_tssnoe[2]; }
79 
81  inline bool TssCorrEna(int i) const { return m_tsscce[i]; }
82 
84  inline bool TssCorrEnaCarry() const { return m_tsscce[2]; }
85 
87  inline int TsmMasking(int i) const { return (int)m_tsmmsk[i]; }
88 
90  inline bool TsmHtrigEna(int i) const { return m_tsmhte[i]; }
91 
93  inline bool TsmHtrigEnaCarry() const { return m_tsmhte[2]; }
94 
96  inline bool TsmInOutEna(int i) const { return m_tsmnoe[i]; }
97 
99  inline bool TsmInOutEnaCarry() const { return m_tsmnoe[2]; }
100 
102  inline bool TsmCorrEna(int i) const { return m_tsmcce[i]; }
103 
105  inline bool TsmCorrEnaCarry() const { return m_tsmcce[2]; }
106 
108  inline int TssGhost1Flag() const { return (int)m_tssgs1; }
109 
111  inline int TssGhost2Flag() const { return (int)m_tssgs2; }
112 
114  inline int TsmGhost1Flag() const { return (int)m_tsmgs1; }
115 
117  inline int TsmGhost2Flag() const { return (int)m_tsmgs2; }
118 
120  inline bool TssGhost1Corr() const { return m_tsscgs1; }
121 
123  inline bool TssGhost2Corr() const { return m_tsscgs2; }
124 
126  inline bool TsmGhost1Corr() const { return m_tsmcgs1; }
127 
129  inline bool TsmGhost2Corr() const { return m_tsmcgs2; }
130 
132  inline int TsmGetCarryFlag() const { return (int)m_tsmhsp; }
133 
135  inline bool usedTraco(int i) const { return (bool) m_tstren.element(i-1); }
136 
138  inline BitArray<8> TsmStatus() const { return m_tsmword; };
139 
140  // DBSM-doubleTSM
142  int TSSinTSMD(int stat, int sect);
143 
144  // Set Methods
146  inline void setDebug(bool debug) { m_debug=debug; }
147 
149  void setTssMasking(unsigned short int tssmsk, int i) { m_tssmsk[i-1] = tssmsk; }
150 
152  inline void setTssHtrigEna(bool tsshte, int i) { m_tsshte[i-1] = tsshte; }
153 
155  inline void setTssHtrigEnaCarry(bool tsshte) { m_tsshte[2] = tsshte; }
156 
158  inline void setTssInOutEna(bool tssnoe, int i) { m_tssnoe[i-1] = tssnoe; }
159 
161  inline void setTssInOutEnaCarry(bool tssnoe) { m_tssnoe[2] = tssnoe; }
162 
164  inline void setTssCorrEna(bool tsscce, int i) { m_tsscce[i-1] = tsscce; }
165 
167  inline void setTssCorrEnaCarry(bool tsscce) { m_tsscce[2] = tsscce; }
168 
170  void setTsmMasking(unsigned short int tsmmsk, int i) { m_tsmmsk[i-1] = tsmmsk; }
171 
173  inline void setTsmHtrigEna(bool tsmhte, int i) { m_tsmhte[i-1] = tsmhte; }
174 
176  inline void setTsmHtrigEnaCarry(bool tsmhte) { m_tsmhte[2] = tsmhte; }
177 
179  inline void setTsmInOutEna(bool tsmnoe, int i) { m_tsmnoe[i-1] = tsmnoe; }
180 
182  inline void setTsmInOutEnaCarry(bool tsmnoe) { m_tsmnoe[2] = tsmnoe; }
183 
185  inline void setTsmCorrEna(bool tsmcce, int i) { m_tsmcce[i-1] = tsmcce; }
186 
188  inline void setTsmCorrEnaCarry(bool tsmcce) { m_tsmcce[2] = tsmcce; }
189 
191  inline void setTssGhost1Flag(unsigned short tssgs1) { m_tssgs1 = tssgs1; }
192 
194  inline void setTssGhost2Flag(unsigned short tssgs2) { m_tssgs2 = tssgs2; }
195 
197  inline void setTsmGhost1Flag(unsigned short tsmgs1) { m_tsmgs1 = tsmgs1; }
198 
200  inline void setTsmGhost2Flag(unsigned short tsmgs2) { m_tsmgs2 = tsmgs2; }
201 
203  inline void setTssGhost1Corr(bool tsscgs1) { m_tsscgs1 = tsscgs1; }
204 
206  inline void setTssGhost2Corr(bool tsscgs2) { m_tsscgs2 = tsscgs2; }
207 
209  inline void setTsmGhost1Corr(bool tsmcgs1) { m_tsmcgs1 = tsmcgs1; }
210 
212  inline void setTsmGhost2Corr(bool tsmcgs2) { m_tsmcgs2 = tsmcgs2; }
213 
215  inline void setTsmCarryFlag(unsigned short tsmhsp) { m_tsmhsp = tsmhsp; }
216 
218  inline void setUsedTraco(int i, int val) { m_tstren.set(i,val); }
219 
221  inline void setTsmStatus(int i, int val) { m_tsmword.set(i,val); };
222 
224  int nValidTSS();
225 
227  int nValidTSM();
228 
230  void print() const ;
231 
232  private:
233 
235  bool checkMask(unsigned short);
236 
238  void setDefaults(const edm:: ParameterSet& ps);
239 
240  bool m_debug;
241 
242  // TSS Parameters
243  unsigned short int m_tssmsk[2]; // [0]=1st [1]=2nd
244  bool m_tsshte[3]; // [0]=1st [1]=2nd [2]=carry
245  bool m_tssnoe[3]; // [0]=1st [1]=2nd [2]=carry
246  bool m_tsscce[3]; // [0]=1st [1]=2nd [2]=carry
247  unsigned short int m_tssgs1;
248  unsigned short int m_tssgs2;
249  bool m_tsscgs1;
250  bool m_tsscgs2;
251 
252  //TSM Parameters
253  unsigned short int m_tsmmsk[2]; // [0]=1st [1]=2nd
254  bool m_tsmhte[3]; // [0]=1st [1]=2nd [2]=carry
255  bool m_tsmnoe[3]; // [0]=1st [1]=2nd [2]=carry
256  bool m_tsmcce[3]; // [0]=1st [1]=2nd [2]=carry
257  unsigned short int m_tsmgs1;
258  unsigned short int m_tsmgs2;
259  bool m_tsmcgs1;
260  bool m_tsmcgs2;
261  unsigned short int m_tsmhsp;
262 
263 
264  BitArray<24> m_tstren; // Enabled TRACOs
265  BitArray<8> m_tsmword; // TSM backup mode word
266  unsigned short int m_ntsstsmd; // nb tss to one of the tsmd (only if back-up mode)
267 
268  short int m_ntss;
269  short int m_ntsm;
270 
271 };
272 
273 #endif
void setTssGhost2Corr(bool tsscgs2)
Correlated ghost 2 suppression option in TSS.
int i
Definition: DBlmapReader.cc:9
bool TsmInOutEna(int i) const
Enable Inner SL checking in TSM for sort1/2.
Definition: DTConfigTSPhi.h:96
bool TssInOutEnaCarry() const
Enable Inner SL checking in TSS for carry.
Definition: DTConfigTSPhi.h:78
int nValidTSS()
Number of correctly configured TSS.
void setTsmCorrEna(bool tsmcce, int i)
Enable Correlation checking in TSM for sort1/2.
bool TsmHtrigEna(int i) const
Enable Htrig checking in TSM for sort1/2.
Definition: DTConfigTSPhi.h:90
bool TsmGhost2Corr() const
Correlated ghost 2 suppression option in TSM.
bool m_tssnoe[3]
void setTsmInOutEnaCarry(bool tsmnoe)
Enable Inner SL checking in TSM for carry.
void setTssHtrigEna(bool tsshte, int i)
Enable Htrig checking in TSS for sort1/2.
unsigned short int m_tssgs1
unsigned short int m_tsmgs2
int TsmMasking(int i) const
Order of quality bits in TSM for sort1/2.
Definition: DTConfigTSPhi.h:87
void setTssGhost1Corr(bool tsscgs1)
Correlated ghost 1 suppression option in TSS.
void setTssMasking(unsigned short int tssmsk, int i)
Order of quality bits in TSS for sort1/2.
static const int NTSSTSM
Constant: maximum number of TSS in input to the TSM.
Definition: DTConfigTSPhi.h:42
unsigned short int m_tsmhsp
void setTssGhost1Flag(unsigned short tssgs1)
Ghost 1 suppression option in TSS.
int TssMasking(int i) const
Order of quality bits in TSS for sort1/2.
Definition: DTConfigTSPhi.h:66
unsigned short int m_tsmmsk[2]
void setTsmCorrEnaCarry(bool tsmcce)
Enable Correlation checking in TSM for carry.
void setUsedTraco(int i, int val)
Enabled TRACOs in TS.
void setTsmInOutEna(bool tsmnoe, int i)
Enable Inner SL checking in TSM for sort1/2.
bool m_tsmcce[3]
bool m_tsmhte[3]
DTConfigTSPhi()
Constructor.
Definition: DTConfigTSPhi.h:54
void setTssGhost2Flag(unsigned short tssgs2)
Ghost 2 suppression option in TSS.
~DTConfigTSPhi()
Destructor.
bool m_tsshte[3]
void setTsmGhost1Corr(bool tsmcgs1)
Correlated ghost 1 suppression option in TSM.
bool debug() const
Return the debug flag.
Definition: DTConfigTSPhi.h:63
bool TssCorrEnaCarry() const
Enable Correlation checking in TSS for carry.
Definition: DTConfigTSPhi.h:84
BitArray< 8 > m_tsmword
void setDefaults(const edm::ParameterSet &ps)
Load pset values into class variables.
static const int NTSMD
Constant: number of TSMD.
Definition: DTConfigTSPhi.h:45
void setTsmCarryFlag(unsigned short tsmhsp)
Handling of second track (carry) in case of pile-up, in TSM.
void setDebug(bool debug)
Set debug flag.
bool TsmHtrigEnaCarry() const
Enable Htrig checking in TSM for carry.
Definition: DTConfigTSPhi.h:93
int TsmGetCarryFlag() const
Handling of second track (carry) in case of pile-up, in TSM.
unsigned short int m_tsmgs1
void setTssHtrigEnaCarry(bool tsshte)
Enable Htrig checking in TSS for carry.
void setTsmGhost2Corr(bool tsmcgs2)
Correlated ghost 2 suppression option in TSM.
BitArray< 24 > m_tstren
int TsmGhost1Flag() const
Ghost 1 suppression option in TSM.
short int m_ntss
bool TssHtrigEnaCarry() const
Enable Htrig checking in TSS for carry.
Definition: DTConfigTSPhi.h:72
bool TssGhost1Corr() const
Correlated ghost 1 suppression option in TSS.
void print() const
Print the setup.
void setTssCorrEna(bool tsscce, int i)
Enable Correlation checking in TSS for sort1/2.
bool m_tsmnoe[3]
int TSSinTSMD(int stat, int sect)
Return the max nb. of TSSs in input to a single TSMD (called ONLY in back-up mode) ...
int TssGhost2Flag() const
Ghost 2 suppression option in TSS.
int element(const int pos) const
Definition: BitArray.h:210
void setTsmGhost2Flag(unsigned short tsmgs2)
Ghost 2 suppression option in TSM.
void setTsmGhost1Flag(unsigned short tsmgs1)
Ghost 1 suppression option in TSM.
int TssGhost1Flag() const
Ghost 1 suppression option in TSS.
int TsmGhost2Flag() const
Ghost 2 suppression option in TSM.
bool TsmCorrEnaCarry() const
Enable Correlation checking in TSM for carry.
void setTsmHtrigEna(bool tsmhte, int i)
Enable Htrig checking in TSM for sort1/2.
bool TsmCorrEna(int i) const
Enable Correlation checking in TSM for sort1/2.
bool m_tsscce[3]
void setTsmStatus(int i, int val)
TSM status.
bool TssInOutEna(int i) const
Enable Inner SL checking in TSS for sort1/2.
Definition: DTConfigTSPhi.h:75
bool TsmInOutEnaCarry() const
Enable Inner SL checking in TSM for carry.
Definition: DTConfigTSPhi.h:99
short int m_ntsm
static const int NTSSTSMD
Constant: maximum number of TSS in input to a single TSMD.
Definition: DTConfigTSPhi.h:48
bool checkMask(unsigned short)
Check mask correctness.
BitArray< 8 > TsmStatus() const
TSM status.
bool TssGhost2Corr() const
Correlated ghost 2 suppression option in TSS.
void setTssCorrEnaCarry(bool tsscce)
Enable Correlation checking in TSS for.
void setTsmMasking(unsigned short int tsmmsk, int i)
Order of quality bits in TSM for sort1/2.
bool TsmGhost1Corr() const
Correlated ghost 1 suppression option in TSM.
int nValidTSM()
Number of correctly configured TSS.
void setTsmHtrigEnaCarry(bool tsmhte)
Enable Htrig checking in TSM for carry.
bool TssCorrEna(int i) const
Enable Correlation checking in TSS for sort1/2.
Definition: DTConfigTSPhi.h:81
unsigned short int m_tssmsk[2]
void setTssInOutEnaCarry(bool tssnoe)
Enable Inner SL checking in TSS for carry.
unsigned short int m_ntsstsmd
void setTssInOutEna(bool tssnoe, int i)
Enable Inner SL checking in TSS for sort1/2.
bool usedTraco(int i) const
Enabled TRACOs in TS.
void set(const int i)
Definition: BitArray.h:230
bool TssHtrigEna(int i) const
Enable Htrig checking in TSS for sort1/2.
Definition: DTConfigTSPhi.h:69
unsigned short int m_tssgs2