CMS 3D CMS Logo

CSCCorrelatedLCTDigi.h
Go to the documentation of this file.
1 #ifndef CSCDigi_CSCCorrelatedLCTDigi_h
2 #define CSCDigi_CSCCorrelatedLCTDigi_h
3 
12 #include <cstdint>
13 #include <iosfwd>
17 
19 public:
21  CSCCorrelatedLCTDigi(const int trknmb,
22  const int valid,
23  const int quality,
24  const int keywire,
25  const int strip,
26  const int pattern,
27  const int bend,
28  const int bx,
29  const int mpclink = 0,
30  const uint16_t bx0 = 0,
31  const uint16_t syncErr = 0,
32  const uint16_t cscID = 0);
34 
36  void clear();
37 
39  int getTrknmb() const { return trknmb; }
40 
42  bool isValid() const { return valid; }
43 
45  int getQuality() const { return quality; }
46 
48  int getKeyWG() const { return keywire; }
49 
51  int getStrip() const { return strip; }
52 
54  float getFractionalStrip() const;
55 
57  int getPattern() const { return pattern; }
58 
60  int getBend() const { return bend; }
61 
63  int getBX() const { return bx; }
64 
66  int getCLCTPattern() const { return (pattern & 0xF); }
67 
69  int getStripType() const { return ((pattern & 0x8) >> 3); }
70 
72  int getMPCLink() const { return mpclink; }
73 
74  uint16_t getCSCID() const { return cscID; }
75  uint16_t getBX0() const { return bx0; }
76  uint16_t getSyncErr() const { return syncErr; }
77 
79  void setTrknmb(const uint16_t number) { trknmb = number; }
80 
82  void setMPCLink(const uint16_t& link) { mpclink = link; }
83 
85  void print() const;
86 
88  bool operator==(const CSCCorrelatedLCTDigi&) const;
89  bool operator!=(const CSCCorrelatedLCTDigi& rhs) const { return !(this->operator==(rhs)); }
90 
92  void setWireGroup(unsigned int wiregroup) { keywire = wiregroup; }
93 
95  void setQuality(unsigned int q) { quality = q; }
96 
98  void setValid(unsigned int v) { valid = v; }
99 
101  void setStrip(unsigned int s) { strip = s; }
102 
104  void setPattern(unsigned int p) { pattern = p; }
105 
107  void setBend(unsigned int b) { bend = b; }
108 
110  void setBX(unsigned int b) { bx = b; }
111 
113  void setBX0(unsigned int b) { bx0 = b; }
114 
116  void setSyncErr(unsigned int s) { syncErr = s; }
117 
119  void setCSCID(unsigned int c) { cscID = c; }
120 
122  enum Type {
123  CLCTALCT, // CLCT-centric
124  ALCTCLCT, // ALCT-centric
125  ALCTCLCTGEM, // ALCT-CLCT-1 GEM pad
126  ALCTCLCT2GEM, // ALCT-CLCT-2 GEM pads in coincidence
127  ALCT2GEM, // ALCT-2 GEM pads in coincidence
128  CLCT2GEM, // CLCT-2 GEM pads in coincidence
129  CLCTONLY, // Missing ALCT
130  ALCTONLY // Missing CLCT
131  };
132 
133  int getType() const { return type_; }
134  void setType(int type) { type_ = type; }
135 
136  void setALCT(const CSCALCTDigi& alct) { alct_ = alct; }
137  void setCLCT(const CSCCLCTDigi& clct) { clct_ = clct; }
138  void setGEM1(const GEMPadDigi& gem) { gem1_ = gem; }
139  void setGEM2(const GEMPadDigi& gem) { gem2_ = gem; }
140  const CSCALCTDigi& getALCT() const { return alct_; }
141  const CSCCLCTDigi& getCLCT() const { return clct_; }
142  const GEMPadDigi& getGEM1() const { return gem1_; }
143  const GEMPadDigi& getGEM2() const { return gem2_; }
144 
145 private:
146  uint16_t trknmb;
147  uint16_t valid;
148  uint16_t quality;
149  uint16_t keywire;
150  uint16_t strip;
151  uint16_t pattern;
152  uint16_t bend;
153  uint16_t bx;
154  uint16_t mpclink;
155  uint16_t bx0;
156  uint16_t syncErr;
157  uint16_t cscID;
158 
160  int type_;
161 
166 };
167 
168 std::ostream& operator<<(std::ostream& o, const CSCCorrelatedLCTDigi& digi);
169 
170 #endif
const CSCALCTDigi & getALCT() const
type
Definition: HCALResponse.h:21
int getStrip() const
return the key halfstrip from 0,159
void setALCT(const CSCALCTDigi &alct)
void setGEM2(const GEMPadDigi &gem)
uint16_t getSyncErr() const
void setWireGroup(unsigned int wiregroup)
set wiregroup number
void setBend(unsigned int b)
set bend
int getCLCTPattern() const
return CLCT pattern number (in use again Feb 2011)
const GEMPadDigi & getGEM1() const
Type
SIMULATION ONLY ////.
int getQuality() const
return the 4 bit Correlated LCT Quality
void setBX0(unsigned int b)
set bx0
int getBend() const
return bend
void setQuality(unsigned int q)
set quality code
const CSCCLCTDigi & getCLCT() const
Definition: AMC13Event.h:6
int getStripType() const
return strip type (obsolete since mid-2008)
void setMPCLink(const uint16_t &link)
Set mpc link number after MPC sorting.
void setPattern(unsigned int p)
set pattern
float getFractionalStrip() const
return the fractional strip. counts from 0.25
void setValid(unsigned int v)
set valid
bool operator==(const CSCCorrelatedLCTDigi &) const
Comparison.
int type_
SIMULATION ONLY ////.
void setSyncErr(unsigned int s)
set syncErr
bool operator!=(const CSCCorrelatedLCTDigi &rhs) const
void setStrip(unsigned int s)
set strip
uint16_t getCSCID() const
void setCSCID(unsigned int c)
set cscID
int getTrknmb() const
return track number
int getBX() const
return BX
uint16_t getBX0() const
const GEMPadDigi & getGEM2() const
void setBX(unsigned int b)
set bx
double b
Definition: hdecay.h:120
int getMPCLink() const
return MPC link number, 0 means not sorted, 1-3 give MPC sorting rank
bool isValid() const
return valid pattern bit
int getPattern() const
return pattern
std::ostream & operator<<(std::ostream &o, const CSCCorrelatedLCTDigi &digi)
void setTrknmb(const uint16_t number)
Set track number (1,2) after sorting LCTs.
void setCLCT(const CSCCLCTDigi &clct)
void print() const
Print content of correlated LCT digi.
void setGEM1(const GEMPadDigi &gem)
int getKeyWG() const
return the key wire group. counts from 0.