CMS 3D CMS Logo

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:
43 
45  DTTracoCand(DTTracoChip *tc, const DTBtiTrigData *btitr, int pos, int step);
46 
48  DTTracoCand(const DTTracoCand &tccand);
49 
51  DTTracoCand &operator=(const DTTracoCand &tccand);
52 
54  ~DTTracoCand();
55 
57  inline void setUsed() { _usable = 0; }
58 
60  inline void setUnused() { _usable = 1; }
61 
63  void setBits(int itk);
64 
66  inline DTTracoChip *Traco() const { return _traco; }
67 
69  inline const DTBtiTrigData *BtiTrig() const { return _btitr; }
70 
72  inline int step() const { return _step; }
73 
75  inline int position() const { return _position; }
76 
78  inline int K() const { return _tcK; }
79 
81  inline int X() const { return _tcX; }
82 
84  inline int usable() const { return _usable; }
85 
87  bool operator<(const DTTracoCand &c) const { return _tcK < c._tcK; }
88  // bool operator < ( const DTTracoCand& c) const { return
89  // _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  DTTracoChip *_traco; // Parent DTTracoChip
108 
109  const DTBtiTrigData *_btitr; // Associated BTI trigger
110 
111  // Other variables
112  BitArray<7> _dataword; // the word on which sorting is done
113  int _step;
115  int _usable;
116  int _tcX;
117  int _tcK;
118 };
119 
120 #endif
int K() const
Return K-KRAD.
Definition: DTTracoCand.h:78
DTTracoCand()
Constructor.
Definition: DTTracoCand.h:42
BitArray< 7 > _dataword
Definition: DTTracoCand.h:112
bool operator<(const DTTracoCand &c) const
returns true if it has smaller K w.r.t. DTTracoChip center K (sort ascend)
Definition: DTTracoCand.h:87
const DTBtiTrigData * _btitr
Definition: DTTracoCand.h:109
int step() const
Return Bunch crossing.
Definition: DTTracoCand.h:72
const DTBtiTrigData * BtiTrig() const
Return associated BTI trigger.
Definition: DTTracoCand.h:69
~DTTracoCand()
Destructor.
Definition: DTTracoCand.cc:101
void setBits(int itk)
set quality bits for first/second track
DTTracoCand & operator=(const DTTracoCand &tccand)
Assignment operator.
Definition: DTTracoCand.cc:107
DTTracoChip * Traco() const
Return parent TRACO.
Definition: DTTracoCand.h:66
int usable() const
Check if candidate is usable.
Definition: DTTracoCand.h:84
void setUsed()
set candidate used (unusable)
Definition: DTTracoCand.h:57
step
Definition: StallMonitor.cc:94
void setUnused()
set candidate unused (usable)
Definition: DTTracoCand.h:60
int X() const
Return local X coordinate.
Definition: DTTracoCand.h:81
int position() const
Return position inside TRACO.
Definition: DTTracoCand.h:75
DTTracoChip * _traco
Definition: DTTracoCand.h:107
void print() const
Print candidate.
Definition: DTTracoCand.cc:120