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 //
16 //
17 //--------------------------------------------------
18 #ifndef DT_TRACO_CAND_H
19 #define DT_TRACO_CAND_H
20 
21 //------------------------------------
22 // Collaborating Class Declarations --
23 //------------------------------------
24 class DTBtiTrigData;
25 class DTTracoChip;
26 
27 //----------------------
28 // Base Class Headers --
29 //----------------------
31 
32 //---------------
33 // C++ Headers --
34 //---------------
35 
36 // ---------------------
37 // -- Class Interface --
38 // ---------------------
39 
40 class DTTracoCand {
41 
42  public:
43 
46 
48  DTTracoCand(DTTracoChip* tc, const DTBtiTrigData* btitr, int pos, int step);
49 
51  DTTracoCand(const DTTracoCand& tccand);
52 
54  DTTracoCand& operator=(const DTTracoCand& tccand);
55 
57  ~DTTracoCand();
58 
60  inline void setUsed() { _usable=0; }
61 
63  inline void setUnused() {_usable=1; }
64 
66  void setBits(int itk);
67 
69  inline DTTracoChip* Traco() const { return _traco; }
70 
72  inline const DTBtiTrigData* BtiTrig() const { return _btitr; }
73 
75  inline int step() const { return _step; }
76 
78  inline int position() const { return _position; }
79 
81  inline int K() const { return _tcK; }
82 
84  inline int X() const { return _tcX; }
85 
87  inline int usable() const { return _usable; }
88 
90  bool operator < ( const DTTracoCand& c) const { return _tcK<c._tcK; }
91  // bool operator < ( const DTTracoCand& c) const { return _dataword<c._dataword; }
92 
93  /*
95  inline bool closer ( const DTTracoCand& cand1, const DTTracoCand& cand2) const {
96  return cand1<cand2;
97  }
98 
100  inline bool wider ( const DTTracoCand& cand1, const DTTracoCand& cand2) const {
101  return cand2<cand1;
102  }
103  */
104 
106  void print() const ;
107 
108  private:
109 
110  DTTracoChip* _traco; // Parent DTTracoChip
111 
112  const DTBtiTrigData* _btitr; // Associated BTI trigger
113 
114  // Other variables
115  BitArray<7> _dataword; // the word on which sorting is done
116  int _step;
118  int _usable;
119  int _tcX;
120  int _tcK;
121 
122 };
123 
124 #endif
int K() const
Return K-KRAD.
Definition: DTTracoCand.h:81
DTTracoCand()
Constructor.
Definition: DTTracoCand.h:45
BitArray< 7 > _dataword
Definition: DTTracoCand.h:115
bool operator<(const DTTracoCand &c) const
returns true if it has smaller K w.r.t. DTTracoChip center K (sort ascend)
Definition: DTTracoCand.h:90
const DTBtiTrigData * _btitr
Definition: DTTracoCand.h:112
int step() const
Return Bunch crossing.
Definition: DTTracoCand.h:75
const DTBtiTrigData * BtiTrig() const
Return associated BTI trigger.
Definition: DTTracoCand.h:72
~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:69
int usable() const
Check if candidate is usable.
Definition: DTTracoCand.h:87
void setUsed()
set candidate used (unusable)
Definition: DTTracoCand.h:60
void setUnused()
set candidate unused (usable)
Definition: DTTracoCand.h:63
int X() const
Return local X coordinate.
Definition: DTTracoCand.h:84
int position() const
Return position inside TRACO.
Definition: DTTracoCand.h:78
DTTracoChip * _traco
Definition: DTTracoCand.h:110
void print() const
Print candidate.
Definition: DTTracoCand.cc:122