CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTTracoCand.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
14 //
15 //--------------------------------------------------
16 #ifndef DT_TRACO_CAND_H
17 #define DT_TRACO_CAND_H
18 
19 //------------------------------------
20 // Collaborating Class Declarations --
21 //------------------------------------
22 class DTBtiTrigData;
23 class DTTracoChip;
24 
25 //----------------------
26 // Base Class Headers --
27 //----------------------
29 
30 //---------------
31 // C++ Headers --
32 //---------------
33 
34 // ---------------------
35 // -- Class Interface --
36 // ---------------------
37 
38 class DTTracoCand {
39 
40  public:
41 
44 
46  DTTracoCand(DTTracoChip* tc, const DTBtiTrigData* btitr, int pos, int step);
47 
49  DTTracoCand(const DTTracoCand& tccand);
50 
52  DTTracoCand& operator=(const DTTracoCand& tccand);
53 
55  ~DTTracoCand();
56 
58  inline void setUsed() { _usable=0; }
59 
61  inline void setUnused() {_usable=1; }
62 
64  void setBits(int itk);
65 
67  inline DTTracoChip* Traco() const { return _traco; }
68 
70  inline const DTBtiTrigData* BtiTrig() const { return _btitr; }
71 
73  inline int step() const { return _step; }
74 
76  inline int position() const { return _position; }
77 
79  inline int K() const { return _tcK; }
80 
82  inline int X() const { return _tcX; }
83 
85  inline int usable() const { return _usable; }
86 
88  bool operator < ( const DTTracoCand& c) const { return _tcK<c._tcK; }
89  // bool operator < ( const DTTracoCand& c) const { return _dataword<c._dataword; }
90 
91  /*
93  inline bool closer ( const DTTracoCand& cand1, const DTTracoCand& cand2) const {
94  return cand1<cand2;
95  }
96 
98  inline bool wider ( const DTTracoCand& cand1, const DTTracoCand& cand2) const {
99  return cand2<cand1;
100  }
101  */
102 
104  void print() const ;
105 
106  private:
107 
108  DTTracoChip* _traco; // Parent DTTracoChip
109 
110  const DTBtiTrigData* _btitr; // Associated BTI trigger
111 
112  // Other variables
113  BitArray<7> _dataword; // the word on which sorting is done
114  int _step;
116  int _usable;
117  int _tcX;
118  int _tcK;
119 
120 };
121 
122 #endif
int K() const
Return K-KRAD.
Definition: DTTracoCand.h:79
DTTracoCand()
Constructor.
Definition: DTTracoCand.h:43
BitArray< 7 > _dataword
Definition: DTTracoCand.h:113
bool operator<(const DTTracoCand &c) const
returns true if it has smaller K w.r.t. DTTracoChip center K (sort ascend)
Definition: DTTracoCand.h:88
const DTBtiTrigData * _btitr
Definition: DTTracoCand.h:110
int step() const
Return Bunch crossing.
Definition: DTTracoCand.h:73
const DTBtiTrigData * BtiTrig() const
Return associated BTI trigger.
Definition: DTTracoCand.h:70
~DTTracoCand()
Destructor.
Definition: DTTracoCand.cc:100
void setBits(int itk)
set quality bits for first/second track
DTTracoCand & operator=(const DTTracoCand &tccand)
Assignment operator.
Definition: DTTracoCand.cc:108
DTTracoChip * Traco() const
Return parent TRACO.
Definition: DTTracoCand.h:67
int usable() const
Check if candidate is usable.
Definition: DTTracoCand.h:85
void setUsed()
set candidate used (unusable)
Definition: DTTracoCand.h:58
step
void setUnused()
set candidate unused (usable)
Definition: DTTracoCand.h:61
int X() const
Return local X coordinate.
Definition: DTTracoCand.h:82
int position() const
Return position inside TRACO.
Definition: DTTracoCand.h:76
DTTracoChip * _traco
Definition: DTTracoCand.h:108
void print() const
Print candidate.
Definition: DTTracoCand.cc:122