CMS 3D CMS Logo

CSCCLCTDigi.h
Go to the documentation of this file.
1 #ifndef CSCDigi_CSCCLCTDigi_h
2 #define CSCDigi_CSCCLCTDigi_h
3 
12 #include <cstdint>
13 #include <iosfwd>
14 
15 class CSCCLCTDigi {
16 public:
18  CSCCLCTDigi(const int valid,
19  const int quality,
20  const int pattern,
21  const int striptype,
22  const int bend,
23  const int strip,
24  const int cfeb,
25  const int bx,
26  const int trknmb = 0,
27  const int fullbx = 0);
29  CSCCLCTDigi();
30 
32  void clear();
33 
35  bool isValid() const { return valid_; }
36 
38  void setValid(const int valid) { valid_ = valid; }
39 
41  int getQuality() const { return quality_; }
42 
44  void setQuality(const int quality) { quality_ = quality; }
45 
47  int getPattern() const { return pattern_; }
48 
50  void setPattern(const int pattern) { pattern_ = pattern; }
51 
53  int getStripType() const { return striptype_; }
54 
56  void setStripType(const int stripType) { striptype_ = stripType; }
57 
59  int getBend() const { return bend_; }
60 
62  void setBend(const int bend) { bend_ = bend; }
63 
65  int getStrip() const { return strip_; }
66 
68  void setStrip(const int strip) { strip_ = strip; }
69 
71  int getCFEB() const { return cfeb_; }
72 
74  void setCFEB(const int cfeb) { cfeb_ = cfeb; }
75 
77  int getBX() const { return bx_; }
78 
80  void setBX(const int bx) { bx_ = bx; }
81 
83  int getTrknmb() const { return trknmb_; }
84 
94  int getKeyStrip() const {
95  int keyStrip = cfeb_ * 32 + strip_;
96  return keyStrip;
97  }
98 
100  void setTrknmb(const uint16_t number) { trknmb_ = number; }
101 
103  int getFullBX() const { return fullbx_; }
104 
106  void setFullBX(const uint16_t fullbx) { fullbx_ = fullbx; }
107 
111  bool operator>(const CSCCLCTDigi&) const;
112 
114  bool operator==(const CSCCLCTDigi&) const;
115 
117  bool operator!=(const CSCCLCTDigi&) const;
118 
120  void print() const;
121 
122 private:
123  uint16_t valid_;
124  uint16_t quality_;
125  uint16_t pattern_;
126  uint16_t striptype_; // not used since mid-2008
127  uint16_t bend_;
128  uint16_t strip_;
129  uint16_t cfeb_;
130  uint16_t bx_;
131  uint16_t trknmb_;
132  uint16_t fullbx_;
133 };
134 
135 std::ostream& operator<<(std::ostream& o, const CSCCLCTDigi& digi);
136 
137 #endif
int getQuality() const
return quality of a pattern (number of layers hit!)
Definition: CSCCLCTDigi.h:41
uint16_t trknmb_
Definition: CSCCLCTDigi.h:131
void setStrip(const int strip)
set strip
Definition: CSCCLCTDigi.h:68
uint16_t strip_
Definition: CSCCLCTDigi.h:128
void print() const
Print content of digi.
Definition: CSCCLCTDigi.cc:114
uint16_t pattern_
Definition: CSCCLCTDigi.h:125
uint16_t valid_
Definition: CSCCLCTDigi.h:123
void setValid(const int valid)
set valid
Definition: CSCCLCTDigi.h:38
int getStrip() const
return halfstrip that goes from 0 to 31
Definition: CSCCLCTDigi.h:65
void setStripType(const int stripType)
set stripType
Definition: CSCCLCTDigi.h:56
int getStripType() const
return striptype
Definition: CSCCLCTDigi.h:53
void setQuality(const int quality)
set quality
Definition: CSCCLCTDigi.h:44
int getBend() const
return bend
Definition: CSCCLCTDigi.h:59
uint16_t bx_
Definition: CSCCLCTDigi.h:130
CSCCLCTDigi()
default
Definition: CSCCLCTDigi.cc:48
void setBX(const int bx)
set bx
Definition: CSCCLCTDigi.h:80
uint16_t bend_
Definition: CSCCLCTDigi.h:127
bool operator>(const CSCCLCTDigi &) const
Definition: CSCCLCTDigi.cc:67
int getCFEB() const
return Key CFEB ID
Definition: CSCCLCTDigi.h:71
uint16_t fullbx_
Definition: CSCCLCTDigi.h:132
int getBX() const
return BX
Definition: CSCCLCTDigi.h:77
bool isValid() const
check CLCT validity (1 - valid CLCT)
Definition: CSCCLCTDigi.h:35
bool operator!=(const CSCCLCTDigi &) const
True if the preceding one is false.
Definition: CSCCLCTDigi.cc:105
int getTrknmb() const
return track number (1,2)
Definition: CSCCLCTDigi.h:83
void setBend(const int bend)
set bend
Definition: CSCCLCTDigi.h:62
int getPattern() const
return pattern
Definition: CSCCLCTDigi.h:47
uint16_t cfeb_
Definition: CSCCLCTDigi.h:129
void setFullBX(const uint16_t fullbx)
Set 12-bit full BX.
Definition: CSCCLCTDigi.h:106
void setCFEB(const int cfeb)
set Key CFEB ID
Definition: CSCCLCTDigi.h:74
void setPattern(const int pattern)
set pattern
Definition: CSCCLCTDigi.h:50
bool operator==(const CSCCLCTDigi &) const
True if the two LCTs have exactly the same members (except the number).
Definition: CSCCLCTDigi.cc:94
void clear()
clear this CLCT
Definition: CSCCLCTDigi.cc:54
uint16_t striptype_
Definition: CSCCLCTDigi.h:126
uint16_t quality_
Definition: CSCCLCTDigi.h:124
int getKeyStrip() const
Definition: CSCCLCTDigi.h:94
int getFullBX() const
return 12-bit full BX.
Definition: CSCCLCTDigi.h:103
std::ostream & operator<<(std::ostream &o, const CSCCLCTDigi &digi)
Definition: CSCCLCTDigi.cc:131
void setTrknmb(const uint16_t number)
Set track number (1,2) after sorting CLCTs.
Definition: CSCCLCTDigi.h:100