CMS 3D CMS Logo

DTSectCollPhCand.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
10 //
11 //--------------------------------------------------
12 #ifndef DT_SECT_COLL_PH_CAND_H
13 #define DT_SECT_COLL_PH_CAND_H
14 
15 //----------------------
16 // Base Class Headers --
17 //----------------------
23 //---------------
24 // C++ Headers --
25 //---------------
26 #include <string>
27 
28 // ---------------------
29 // -- Class Interface --
30 // ---------------------
31 
33 public:
35  DTSectCollPhCand(DTSC*, const DTChambPhSegm*, int);
36 
39 
41  DTSectCollPhCand(const DTSectCollPhCand& tsccand);
42 
45 
48 
49  // Non-const methods
50 
52  void setBitsSectColl();
53 
55  void clearBits() { _dataword.assign(5, 3, 0x7); }
56 
58  void clearBitsSectColl() { _dataword.assign(0, 13, 0x1fff); }
59 
61  void setSecondTrack() {
62  _dataword.set(14);
63  _isCarry = 1;
64  }
65 
67  void resetCarry() { _isCarry = 0; }
68 
70 
72  inline void clear();
73 
74  // Const methods
75 
77  inline const DTConfigSectColl* config() const { return _tsc->config(); }
78 
80  inline DTSC* tsc() const { return _tsc; }
81 
83  inline int isFirst() const { return _dataword.element(14) == 0; }
84 
86  inline const DTChambPhSegm* tsTr() const { return _tsmsegm; }
87 
89  inline unsigned dataword() const { return _dataword.dataWord(0) & 0x1ff; }
90 
92  bool operator<(const DTSectCollPhCand& c) const { return _dataword < c._dataword; }
93 
95  bool operator<=(const DTSectCollPhCand& c) const { return _dataword <= c._dataword; }
96 
98  void print() const;
99 
101  int CoarseSync() const;
102 
103 private:
106 
107  // BitArray<9> _dataword; // the word on which sorting is done
108  BitArray<15> _dataword; // the word on which sorting is done. reserve space enough for Preview and full data
109 
110  int _isCarry;
111 };
112 #endif
const DTChambPhSegm * tsTr() const
Return associated TSPhi trigger.
const DTChambPhSegm * _tsmsegm
const DTConfigSectColl * config() const
Configuration set.
Definition: DTSC.h:82
~DTSectCollPhCand()
Destructor.
DTSectCollPhCand & operator=(const DTSectCollPhCand &tsccand)
Assignment operator.
void clear()
Set the SC Candidate step.
void clearBitsSectColl()
Clear (set to 1) the quality bits for Sector Collector.
Definition: DTSC.h:41
unsigned dataword() const
Return an uint16 with the content of the data word (for debugging)
DTSC * tsc() const
Return the DTTSS.
void setBitsSectColl()
Set the bits for DTTSM analysis.
DTSectCollPhCand()
Constructor.
bool operator<(const DTSectCollPhCand &c) const
Operator < used for sorting.
void clearBits()
Clear (set to 1) the quality bits (but first/second track bit)
void resetCarry()
Reset the carry bit.
void print() const
Print the trigger.
int isFirst() const
Return first/second track bit value.
void assign(const int p, const int n, const int val)
Definition: BitArray.h:233
const DTConfigSectColl * config() const
Configuration set.
BitArray< 15 > _dataword
void setSecondTrack()
Set the first track bit to second track (used for carry)
bool operator<=(const DTSectCollPhCand &c) const
Operator <= used for sorting.
void set(const int i)
Definition: BitArray.h:224
int element(const int pos) const
Definition: BitArray.h:206
unsigned dataWord(const int i) const
Definition: BitArray.h:124
int CoarseSync() const
Return the Coarse Sync Parameter.