test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 //----------------------
17 // Base Class Headers --
18 //----------------------
24 //---------------
25 // C++ Headers --
26 //---------------
27 #include <string>
28 
29 // ---------------------
30 // -- Class Interface --
31 // ---------------------
32 
34 
35  public:
36 
38  DTSectCollPhCand(DTSC* , const DTChambPhSegm*, int);
39 
42 
44  DTSectCollPhCand(const DTSectCollPhCand& tsccand);
45 
48 
51 
52  // Non-const methods
53 
55  void setBitsSectColl();
56 
58  void clearBits(){ _dataword.assign(5,3,0x7); }
59 
61  void clearBitsSectColl(){ _dataword.assign(0,13,0x1fff); }
62 
64  void setSecondTrack() { _dataword.set(14); _isCarry=1; }
65 
67  void resetCarry() { _isCarry=0; }
68 
70 
71 
73  inline void clear();
74 
75  // Const methods
76 
78  inline const DTConfigSectColl* config() const { return _tsc->config(); }
79 
81  inline DTSC* tsc() const { return _tsc; }
82 
84  inline int isFirst() const { return _dataword.element(14)==0; }
85 
87  inline const DTChambPhSegm* tsTr() const { return _tsmsegm; }
88 
90  inline unsigned dataword() const { return _dataword.dataWord(0)&0x1ff; }
91 
93  bool operator < (const DTSectCollPhCand& c) const { return _dataword<c._dataword; }
94 
96  bool operator <= (const DTSectCollPhCand& c) const { return _dataword<=c._dataword; }
97 
99  void print() const;
100 
102  int CoarseSync() const;
103 
104 
105  private:
106 
109 
110  // BitArray<9> _dataword; // the word on which sorting is done
111  BitArray<15> _dataword; // the word on which sorting is done. reserve space enough for Preview and full data
112 
113  int _isCarry;
114 
115 };
116 #endif
const DTChambPhSegm * _tsmsegm
~DTSectCollPhCand()
Destructor.
DTSectCollPhCand & operator=(const DTSectCollPhCand &tsccand)
Assignment operator.
const DTChambPhSegm * tsTr() const
Return associated TSPhi trigger.
void clear()
Set the SC Candidate step.
int isFirst() const
Return first/second track bit value.
void clearBitsSectColl()
Clear (set to 1) the quality bits for Sector Collector.
Definition: DTSC.h:42
DTSC * tsc() const
Return the DTTSS.
unsigned dataword() const
Return an uint16 with the content of the data word (for debugging)
void setBitsSectColl()
Set the bits for DTTSM analysis.
void print() const
Print the trigger.
const DTConfigSectColl * config() const
Configuration set.
Definition: DTSC.h:86
DTSectCollPhCand()
Constructor.
int CoarseSync() const
Return the Coarse Sync Parameter.
void clearBits()
Clear (set to 1) the quality bits (but first/second track bit)
void resetCarry()
Reset the carry bit.
unsigned dataWord(const int i) const
Definition: BitArray.h:128
bool operator<=(const DTSectCollPhCand &c) const
Operator &lt;= used for sorting.
int element(const int pos) const
Definition: BitArray.h:210
void assign(const int p, const int n, const int val)
Definition: BitArray.h:239
const DTConfigSectColl * config() const
Configuration set.
BitArray< 15 > _dataword
void setSecondTrack()
Set the first track bit to second track (used for carry)
void set(const int i)
Definition: BitArray.h:230
bool operator<(const DTSectCollPhCand &c) const
Operator &lt; used for sorting.