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 public:
42 
44  DTTracoCand(DTTracoChip *tc, const DTBtiTrigData *btitr, int pos, int step);
45 
47  DTTracoCand(const DTTracoCand &tccand);
48 
50  DTTracoCand &operator=(const DTTracoCand &tccand);
51 
53  ~DTTracoCand();
54 
56  inline void setUsed() { _usable = 0; }
57 
59  inline void setUnused() { _usable = 1; }
60 
62  void setBits(int itk);
63 
65  inline DTTracoChip *Traco() const { return _traco; }
66 
68  inline const DTBtiTrigData *BtiTrig() const { return _btitr; }
69 
71  inline int step() const { return _step; }
72 
74  inline int position() const { return _position; }
75 
77  inline int K() const { return _tcK; }
78 
80  inline int X() const { return _tcX; }
81 
83  inline int usable() const { return _usable; }
84 
86  bool operator<(const DTTracoCand &c) const { return _tcK < c._tcK; }
87  // bool operator < ( const DTTracoCand& c) const { return
88  // _dataword<c._dataword; }
89 
90  /*
92  inline bool closer ( const DTTracoCand& cand1, const DTTracoCand& cand2) const
93  { return cand1<cand2;
94  }
95 
97  inline bool wider ( const DTTracoCand& cand1, const DTTracoCand& cand2) const
98  { return cand2<cand1;
99  }
100  */
101 
103  void print() const;
104 
105 private:
106  DTTracoChip *_traco; // Parent DTTracoChip
107 
108  const DTBtiTrigData *_btitr; // Associated BTI trigger
109 
110  // Other variables
111  BitArray<7> _dataword; // the word on which sorting is done
112  int _step;
114  int _usable;
115  int _tcX;
116  int _tcK;
117 };
118 
119 #endif
int K() const
Return K-KRAD.
Definition: DTTracoCand.h:77
DTTracoCand()
Constructor.
Definition: DTTracoCand.h:41
BitArray< 7 > _dataword
Definition: DTTracoCand.h:111
bool operator<(const DTTracoCand &c) const
returns true if it has smaller K w.r.t. DTTracoChip center K (sort ascend)
Definition: DTTracoCand.h:86
const DTBtiTrigData * _btitr
Definition: DTTracoCand.h:108
int step() const
Return Bunch crossing.
Definition: DTTracoCand.h:71
const DTBtiTrigData * BtiTrig() const
Return associated BTI trigger.
Definition: DTTracoCand.h:68
~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:65
int usable() const
Check if candidate is usable.
Definition: DTTracoCand.h:83
void setUsed()
set candidate used (unusable)
Definition: DTTracoCand.h:56
step
Definition: StallMonitor.cc:94
void setUnused()
set candidate unused (usable)
Definition: DTTracoCand.h:59
int X() const
Return local X coordinate.
Definition: DTTracoCand.h:80
int position() const
Return position inside TRACO.
Definition: DTTracoCand.h:74
DTTracoChip * _traco
Definition: DTTracoCand.h:106
void print() const
Print candidate.
Definition: DTTracoCand.cc:120