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 
17  public:
18 
20  CSCCLCTDigi(const int valid, const int quality, const int pattern,
21  const int striptype, const int bend, const int strip,
22  const int cfeb, const int bx, const int trknmb = 0, const int fullbx=0);
24  CSCCLCTDigi();
25 
27  void clear();
28 
30  bool isValid() const {return valid_ ;}
31 
33  void setValid(const int valid) {valid_ = valid;}
34 
36  int getQuality() const {return quality_ ;}
37 
39  void setQuality(const int quality) {quality_ = quality;}
40 
42  int getPattern() const {return pattern_ ;}
43 
45  void setPattern(const int pattern) {pattern_ = pattern;}
46 
48  int getStripType() const {return striptype_ ;}
49 
51  void setStripType(const int stripType) {striptype_ = stripType;}
52 
54  int getBend() const {return bend_ ;}
55 
57  void setBend(const int bend) {bend_ = bend;}
58 
60  int getStrip() const {return strip_ ;}
61 
63  void setStrip(const int strip) {strip_ = strip;}
64 
66  int getCFEB() const {return cfeb_ ;}
67 
69  void setCFEB(const int cfeb) {cfeb_ = cfeb;}
70 
72  int getBX() const {return bx_ ;}
73 
75  void setBX(const int bx) {bx_ = bx;}
76 
78  int getTrknmb() const {return trknmb_ ;}
79 
89  int getKeyStrip() const {
90  int keyStrip = cfeb_ * 32 + strip_;
91  return keyStrip;
92  }
93 
95  void setTrknmb(const uint16_t number) {trknmb_ = number;}
96 
98  int getFullBX() const {return fullbx_ ;}
99 
101  void setFullBX(const uint16_t fullbx) {fullbx_ = fullbx;}
102 
103 
107  bool operator > (const CSCCLCTDigi&) const;
108 
110  bool operator == (const CSCCLCTDigi&) const;
111 
113  bool operator != (const CSCCLCTDigi&) const;
114 
116  void print() const;
117 
118  private:
119 
120  uint16_t valid_ ;
121  uint16_t quality_ ;
122  uint16_t pattern_ ;
123  uint16_t striptype_ ; // not used since mid-2008
124  uint16_t bend_ ;
125  uint16_t strip_ ;
126  uint16_t cfeb_ ;
127  uint16_t bx_ ;
128  uint16_t trknmb_ ;
129  uint16_t fullbx_ ;
130 
131 };
132 
133 std::ostream & operator<<(std::ostream & o, const CSCCLCTDigi& digi);
134 
135 #endif
int getQuality() const
return quality of a pattern (number of layers hit!)
Definition: CSCCLCTDigi.h:36
uint16_t trknmb_
Definition: CSCCLCTDigi.h:128
void setStrip(const int strip)
set strip
Definition: CSCCLCTDigi.h:63
uint16_t strip_
Definition: CSCCLCTDigi.h:125
void print() const
Print content of digi.
Definition: CSCCLCTDigi.cc:118
uint16_t pattern_
Definition: CSCCLCTDigi.h:122
uint16_t valid_
Definition: CSCCLCTDigi.h:120
void setValid(const int valid)
set valid
Definition: CSCCLCTDigi.h:33
int getStrip() const
return halfstrip that goes from 0 to 31
Definition: CSCCLCTDigi.h:60
void setStripType(const int stripType)
set stripType
Definition: CSCCLCTDigi.h:51
int getStripType() const
return striptype
Definition: CSCCLCTDigi.h:48
void setQuality(const int quality)
set quality
Definition: CSCCLCTDigi.h:39
int getBend() const
return bend
Definition: CSCCLCTDigi.h:54
uint16_t bx_
Definition: CSCCLCTDigi.h:127
CSCCLCTDigi()
default
Definition: CSCCLCTDigi.cc:42
void setBX(const int bx)
set bx
Definition: CSCCLCTDigi.h:75
uint16_t bend_
Definition: CSCCLCTDigi.h:124
bool operator>(const CSCCLCTDigi &) const
Definition: CSCCLCTDigi.cc:71
int getCFEB() const
return Key CFEB ID
Definition: CSCCLCTDigi.h:66
uint16_t fullbx_
Definition: CSCCLCTDigi.h:129
int getBX() const
return BX
Definition: CSCCLCTDigi.h:72
bool isValid() const
check CLCT validity (1 - valid CLCT)
Definition: CSCCLCTDigi.h:30
bool operator!=(const CSCCLCTDigi &) const
True if the preceding one is false.
Definition: CSCCLCTDigi.cc:110
int getTrknmb() const
return track number (1,2)
Definition: CSCCLCTDigi.h:78
void setBend(const int bend)
set bend
Definition: CSCCLCTDigi.h:57
int getPattern() const
return pattern
Definition: CSCCLCTDigi.h:42
uint16_t cfeb_
Definition: CSCCLCTDigi.h:126
void setFullBX(const uint16_t fullbx)
Set 12-bit full BX.
Definition: CSCCLCTDigi.h:101
void setCFEB(const int cfeb)
set Key CFEB ID
Definition: CSCCLCTDigi.h:69
void setPattern(const int pattern)
set pattern
Definition: CSCCLCTDigi.h:45
bool operator==(const CSCCLCTDigi &) const
True if the two LCTs have exactly the same members (except the number).
Definition: CSCCLCTDigi.cc:98
void clear()
clear this CLCT
Definition: CSCCLCTDigi.cc:58
uint16_t striptype_
Definition: CSCCLCTDigi.h:123
uint16_t quality_
Definition: CSCCLCTDigi.h:121
int getKeyStrip() const
Definition: CSCCLCTDigi.h:89
int getFullBX() const
return 12-bit full BX.
Definition: CSCCLCTDigi.h:98
std::ostream & operator<<(std::ostream &o, const CSCCLCTDigi &digi)
Definition: CSCCLCTDigi.cc:141
void setTrknmb(const uint16_t number)
Set track number (1,2) after sorting CLCTs.
Definition: CSCCLCTDigi.h:95