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
DTConfigTSPhi::m_tsmnoe
bool m_tsmnoe[3]
Definition: DTConfigTSPhi.h:251
DTConfigTSPhi::setTsmGhost2Flag
void setTsmGhost2Flag(unsigned short tsmgs2)
Ghost 2 suppression option in TSM.
Definition: DTConfigTSPhi.h:197
DTConfigTSPhi::TsmMasking
int TsmMasking(int i) const
Order of quality bits in TSM for sort1/2.
Definition: DTConfigTSPhi.h:84
DTConfigTSPhi::TssMasking
int TssMasking(int i) const
Order of quality bits in TSS for sort1/2.
Definition: DTConfigTSPhi.h:63
DTConfigTSPhi::print
void print() const
Print the setup.
Definition: DTConfigTSPhi.cc:402
mps_fire.i
i
Definition: mps_fire.py:428
DTConfigTSPhi::m_tsmcce
bool m_tsmcce[3]
Definition: DTConfigTSPhi.h:252
DTConfigTSPhi::setTsmCorrEna
void setTsmCorrEna(bool tsmcce, int i)
Enable Correlation checking in TSM for sort1/2.
Definition: DTConfigTSPhi.h:182
DTConfigTSPhi::NTSMD
static const int NTSMD
Constant: number of TSMD.
Definition: DTConfigTSPhi.h:42
DTConfigTSPhi::m_tssgs1
unsigned short int m_tssgs1
Definition: DTConfigTSPhi.h:243
DTConfigTSPhi::TsmCorrEna
bool TsmCorrEna(int i) const
Enable Correlation checking in TSM for sort1/2.
Definition: DTConfigTSPhi.h:99
DTConfigTSPhi::TsmGhost2Flag
int TsmGhost2Flag() const
Ghost 2 suppression option in TSM.
Definition: DTConfigTSPhi.h:114
DTConfigTSPhi::nValidTSS
int nValidTSS() const
Number of correctly configured TSS.
Definition: DTConfigTSPhi.cc:439
DTConfigTSPhi::TsmGhost1Flag
int TsmGhost1Flag() const
Ghost 1 suppression option in TSM.
Definition: DTConfigTSPhi.h:111
DTConfigTSPhi::m_tsmgs2
unsigned short int m_tsmgs2
Definition: DTConfigTSPhi.h:254
DTConfigTSPhi::setUsedTraco
void setUsedTraco(int i, int val)
Enabled TRACOs in TS.
Definition: DTConfigTSPhi.h:215
DTConfigTSPhi::setTsmMasking
void setTsmMasking(unsigned short int tsmmsk, int i)
Order of quality bits in TSM for sort1/2.
Definition: DTConfigTSPhi.h:167
DTConfigTSPhi::m_tssnoe
bool m_tssnoe[3]
Definition: DTConfigTSPhi.h:241
DTConfigTSPhi::TsmInOutEna
bool TsmInOutEna(int i) const
Enable Inner SL checking in TSM for sort1/2.
Definition: DTConfigTSPhi.h:93
DTConfigTSPhi::setTssInOutEna
void setTssInOutEna(bool tssnoe, int i)
Enable Inner SL checking in TSS for sort1/2.
Definition: DTConfigTSPhi.h:155
DTConfigTSPhi::setTsmInOutEna
void setTsmInOutEna(bool tsmnoe, int i)
Enable Inner SL checking in TSM for sort1/2.
Definition: DTConfigTSPhi.h:176
DTConfigTSPhi::TsmGhost1Corr
bool TsmGhost1Corr() const
Correlated ghost 1 suppression option in TSM.
Definition: DTConfigTSPhi.h:123
DTConfigTSPhi::TsmGetCarryFlag
int TsmGetCarryFlag() const
Handling of second track (carry) in case of pile-up, in TSM.
Definition: DTConfigTSPhi.h:129
DTConfigTSPhi::setTssHtrigEnaCarry
void setTssHtrigEnaCarry(bool tsshte)
Enable Htrig checking in TSS for carry.
Definition: DTConfigTSPhi.h:152
DTConfigTSPhi::m_tsmgs1
unsigned short int m_tsmgs1
Definition: DTConfigTSPhi.h:253
DTConfigTSPhi::m_tsscgs2
bool m_tsscgs2
Definition: DTConfigTSPhi.h:246
DTConfigTSPhi::setDefaults
void setDefaults(const edm::ParameterSet &ps)
Load pset values into class variables.
Definition: DTConfigTSPhi.cc:210
DTConfigTSPhi::TssGhost2Corr
bool TssGhost2Corr() const
Correlated ghost 2 suppression option in TSS.
Definition: DTConfigTSPhi.h:120
DTConfigTSPhi::setTsmCorrEnaCarry
void setTsmCorrEnaCarry(bool tsmcce)
Enable Correlation checking in TSM for carry.
Definition: DTConfigTSPhi.h:185
DTConfigTSPhi::setDebug
void setDebug(bool debug)
Set debug flag.
Definition: DTConfigTSPhi.h:143
DTConfigTSPhi::m_tstren
BitArray< 24 > m_tstren
Definition: DTConfigTSPhi.h:259
DTConfigTSPhi::m_tsmhsp
unsigned short int m_tsmhsp
Definition: DTConfigTSPhi.h:257
DTConfigTSPhi::m_tssmsk
unsigned short int m_tssmsk[2]
Definition: DTConfigTSPhi.h:239
DTConfigTSPhi::setTssHtrigEna
void setTssHtrigEna(bool tsshte, int i)
Enable Htrig checking in TSS for sort1/2.
Definition: DTConfigTSPhi.h:149
DTConfigTSPhi::setTsmGhost1Corr
void setTsmGhost1Corr(bool tsmcgs1)
Correlated ghost 1 suppression option in TSM.
Definition: DTConfigTSPhi.h:206
DTConfigTSPhi::TssCorrEna
bool TssCorrEna(int i) const
Enable Correlation checking in TSS for sort1/2.
Definition: DTConfigTSPhi.h:78
DTConfigTSPhi::setTssGhost1Corr
void setTssGhost1Corr(bool tsscgs1)
Correlated ghost 1 suppression option in TSS.
Definition: DTConfigTSPhi.h:200
hgcalPlots.stat
stat
Definition: hgcalPlots.py:1119
DTConfigTSPhi::TsmHtrigEnaCarry
bool TsmHtrigEnaCarry() const
Enable Htrig checking in TSM for carry.
Definition: DTConfigTSPhi.h:90
BitArray::element
int element(const int pos) const
Definition: BitArray.h:206
DTConfigTSPhi::usedTraco
bool usedTraco(int i) const
Enabled TRACOs in TS.
Definition: DTConfigTSPhi.h:132
DTConfigTSPhi::m_tsshte
bool m_tsshte[3]
Definition: DTConfigTSPhi.h:240
DTConfigTSPhi::TsmHtrigEna
bool TsmHtrigEna(int i) const
Enable Htrig checking in TSM for sort1/2.
Definition: DTConfigTSPhi.h:87
DTConfigTSPhi::checkMask
bool checkMask(unsigned short) const
Check mask correctness.
Definition: DTConfigTSPhi.cc:456
DTConfigTSPhi::setTsmStatus
void setTsmStatus(int i, int val)
TSM status.
Definition: DTConfigTSPhi.h:218
DTConfigTSPhi::NTSSTSM
static const int NTSSTSM
Constant: maximum number of TSS in input to the TSM.
Definition: DTConfigTSPhi.h:39
DTConfigTSPhi::TsmInOutEnaCarry
bool TsmInOutEnaCarry() const
Enable Inner SL checking in TSM for carry.
Definition: DTConfigTSPhi.h:96
DTConfigTSPhi::m_tssgs2
unsigned short int m_tssgs2
Definition: DTConfigTSPhi.h:244
DTConfigTSPhi::TssHtrigEnaCarry
bool TssHtrigEnaCarry() const
Enable Htrig checking in TSS for carry.
Definition: DTConfigTSPhi.h:69
DTConfigTSPhi::TssCorrEnaCarry
bool TssCorrEnaCarry() const
Enable Correlation checking in TSS for carry.
Definition: DTConfigTSPhi.h:81
edm::ParameterSet
Definition: ParameterSet.h:47
DTConfigTSPhi::setTsmHtrigEnaCarry
void setTsmHtrigEnaCarry(bool tsmhte)
Enable Htrig checking in TSM for carry.
Definition: DTConfigTSPhi.h:173
DTConfigTSPhi::~DTConfigTSPhi
~DTConfigTSPhi() override
Destructor.
Definition: DTConfigTSPhi.cc:204
DTConfigTSPhi::TssInOutEna
bool TssInOutEna(int i) const
Enable Inner SL checking in TSS for sort1/2.
Definition: DTConfigTSPhi.h:72
DTConfigTSPhi::TSSinTSMD
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)
Definition: DTConfigTSPhi.cc:378
DTConfigTSPhi::m_tsmhte
bool m_tsmhte[3]
Definition: DTConfigTSPhi.h:250
DTConfigTSPhi::setTssCorrEnaCarry
void setTssCorrEnaCarry(bool tsscce)
Enable Correlation checking in TSS for.
Definition: DTConfigTSPhi.h:164
DTConfigTSPhi::m_tsmmsk
unsigned short int m_tsmmsk[2]
Definition: DTConfigTSPhi.h:249
DTConfigTSPhi::m_tsmword
BitArray< 8 > m_tsmword
Definition: DTConfigTSPhi.h:260
DTConfigTSPhi::m_tsmcgs1
bool m_tsmcgs1
Definition: DTConfigTSPhi.h:255
DTConfigTSPhi::setTssMasking
void setTssMasking(unsigned short int tssmsk, int i)
Order of quality bits in TSS for sort1/2.
Definition: DTConfigTSPhi.h:146
DTConfig.h
DTConfigTSPhi::setTsmCarryFlag
void setTsmCarryFlag(unsigned short tsmhsp)
Handling of second track (carry) in case of pile-up, in TSM.
Definition: DTConfigTSPhi.h:212
DTConfigTSPhi::m_tsmcgs2
bool m_tsmcgs2
Definition: DTConfigTSPhi.h:256
DTConfigTSPhi::setTsmInOutEnaCarry
void setTsmInOutEnaCarry(bool tsmnoe)
Enable Inner SL checking in TSM for carry.
Definition: DTConfigTSPhi.h:179
DTConfigTSPhi::m_tsscgs1
bool m_tsscgs1
Definition: DTConfigTSPhi.h:245
DTConfigTSPhi::setTssGhost2Corr
void setTssGhost2Corr(bool tsscgs2)
Correlated ghost 2 suppression option in TSS.
Definition: DTConfigTSPhi.h:203
DTConfigTSPhi
Definition: DTConfigTSPhi.h:36
DTConfigTSPhi::setTsmGhost2Corr
void setTsmGhost2Corr(bool tsmcgs2)
Correlated ghost 2 suppression option in TSM.
Definition: DTConfigTSPhi.h:209
DTConfigTSPhi::DTConfigTSPhi
DTConfigTSPhi()
Constructor.
Definition: DTConfigTSPhi.h:51
DTConfigTSPhi::setTssGhost2Flag
void setTssGhost2Flag(unsigned short tssgs2)
Ghost 2 suppression option in TSS.
Definition: DTConfigTSPhi.h:191
DTConfigTSPhi::m_tsscce
bool m_tsscce[3]
Definition: DTConfigTSPhi.h:242
DTConfigTSPhi::TssGhost1Corr
bool TssGhost1Corr() const
Correlated ghost 1 suppression option in TSS.
Definition: DTConfigTSPhi.h:117
heppy_batch.val
val
Definition: heppy_batch.py:351
DTConfigTSPhi::TssInOutEnaCarry
bool TssInOutEnaCarry() const
Enable Inner SL checking in TSS for carry.
Definition: DTConfigTSPhi.h:75
DTConfigTSPhi::TsmStatus
BitArray< 8 > TsmStatus() const
TSM status.
Definition: DTConfigTSPhi.h:135
DTConfigTSPhi::TsmGhost2Corr
bool TsmGhost2Corr() const
Correlated ghost 2 suppression option in TSM.
Definition: DTConfigTSPhi.h:126
DTConfigTSPhi::TssGhost1Flag
int TssGhost1Flag() const
Ghost 1 suppression option in TSS.
Definition: DTConfigTSPhi.h:105
DTConfig
Definition: DTConfig.h:32
DTConfigTSPhi::TssGhost2Flag
int TssGhost2Flag() const
Ghost 2 suppression option in TSS.
Definition: DTConfigTSPhi.h:108
DTConfigTSPhi::m_ntss
short int m_ntss
Definition: DTConfigTSPhi.h:263
DTConfigTSPhi::setTssInOutEnaCarry
void setTssInOutEnaCarry(bool tssnoe)
Enable Inner SL checking in TSS for carry.
Definition: DTConfigTSPhi.h:158
BitArray::set
void set(const int i)
Definition: BitArray.h:224
DTConfigTSPhi::nValidTSM
int nValidTSM() const
Number of correctly configured TSS.
Definition: DTConfigTSPhi.cc:447
DTConfigTSPhi::setTsmHtrigEna
void setTsmHtrigEna(bool tsmhte, int i)
Enable Htrig checking in TSM for sort1/2.
Definition: DTConfigTSPhi.h:170
ParameterSet.h
DTConfigTSPhi::setTssCorrEna
void setTssCorrEna(bool tsscce, int i)
Enable Correlation checking in TSS for sort1/2.
Definition: DTConfigTSPhi.h:161
DTConfigTSPhi::m_debug
bool m_debug
Definition: DTConfigTSPhi.h:236
DTConfigTSPhi::debug
bool debug() const
Return the debug flag.
Definition: DTConfigTSPhi.h:60
DTConfigTSPhi::setTsmGhost1Flag
void setTsmGhost1Flag(unsigned short tsmgs1)
Ghost 1 suppression option in TSM.
Definition: DTConfigTSPhi.h:194
BitArray.h
DTConfigTSPhi::setTssGhost1Flag
void setTssGhost1Flag(unsigned short tssgs1)
Ghost 1 suppression option in TSS.
Definition: DTConfigTSPhi.h:188
DTConfigTSPhi::m_ntsm
short int m_ntsm
Definition: DTConfigTSPhi.h:264
BitArray< 8 >
DTConfigTSPhi::TssHtrigEna
bool TssHtrigEna(int i) const
Enable Htrig checking in TSS for sort1/2.
Definition: DTConfigTSPhi.h:66
DTConfigTSPhi::TsmCorrEnaCarry
bool TsmCorrEnaCarry() const
Enable Correlation checking in TSM for carry.
Definition: DTConfigTSPhi.h:102
DTConfigTSPhi::NTSSTSMD
static const int NTSSTSMD
Constant: maximum number of TSS in input to a single TSMD.
Definition: DTConfigTSPhi.h:45