CMS 3D CMS Logo

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