CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCCorrelatedLCTDigi.cc
Go to the documentation of this file.
1 
11 #include <iostream>
12 
14 CSCCorrelatedLCTDigi::CSCCorrelatedLCTDigi(const int itrknmb, const int ivalid,
15  const int iquality,
16  const int ikeywire,
17  const int istrip,
18  const int ipattern, const int ibend,
19  const int ibx, const int impclink,
20  const uint16_t ibx0,
21  const uint16_t isyncErr,
22  const uint16_t icscID):
23  trknmb(itrknmb),
24  valid(ivalid),
25  quality(iquality),
26  keywire(ikeywire),
27  strip(istrip),
28  pattern(ipattern),
29  bend(ibend),
30  bx(ibx),
31  mpclink(impclink),
32  bx0(ibx0),
33  syncErr(isyncErr),
34  cscID(icscID)
35 {}
36 
39  clear(); // set contents to zero
40 }
41 
44  trknmb = 0;
45  valid = 0;
46  quality = 0;
47  keywire = 0;
48  strip = 0;
49  pattern = 0;
50  bend = 0;
51  bx = 0;
52  mpclink = 0;
53  bx0 = 0;
54  syncErr = 0;
55  cscID = 0;
56 }
57 
60  return ((trknmb == rhs.trknmb) && (quality == rhs.quality) &&
61  (keywire == rhs.keywire) && (strip == rhs.strip) &&
62  (pattern == rhs.pattern) && (bend == rhs.bend) &&
63  (bx == rhs.bx) && (valid == rhs.valid) && (mpclink == rhs.mpclink) );
64 }
65 
68  if (isValid()) {
69  edm::LogVerbatim("CSCDigi")
70  << "CSC LCT #" << getTrknmb()
71  << ": Valid = " << isValid()
72  << " Quality = " << getQuality()
73  << " Key Wire = " << getKeyWG()
74  << " Strip = " << getStrip()
75  << " Pattern = " << getPattern()
76  << " Bend = " << ( (getBend() == 0) ? 'L' : 'R' )
77  << " BX = " << getBX()
78  << " MPC Link = " << getMPCLink();
79  }
80  else {
81  edm::LogVerbatim("CSCDigi") << "Not a valid correlated LCT.";
82  }
83 }
84 
85 std::ostream & operator<<(std::ostream & o,
86  const CSCCorrelatedLCTDigi& digi) {
87  return o << "CSC LCT #" << digi.getTrknmb()
88  << ": Valid = " << digi.isValid()
89  << " Quality = " << digi.getQuality()
90  << " MPC Link = " << digi.getMPCLink()
91  << " cscID = " << digi.getCSCID() << "\n"
92  <<" cathode info: Strip = " << digi.getStrip()
93  << " Pattern = " << digi.getPattern()
94  << " Bend = " << ((digi.getBend() == 0) ? 'L' : 'R') << "\n"
95  <<" anode info: Key wire = " << digi.getKeyWG()
96  << " BX = " << digi.getBX()
97  << " bx0 = " << digi.getBX0()
98  << " syncErr = " << digi.getSyncErr() << "\n";
99 }
int getStrip() const
return the key halfstrip from 0,159
uint16_t getSyncErr() const
int getQuality() const
return the 4 bit Correlated LCT Quality
int getBend() const
return bend
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
bool operator==(const CSCCorrelatedLCTDigi &) const
Comparison.
uint16_t getCSCID() const
int getTrknmb() const
return track number
int getBX() const
return BX
uint16_t getBX0() const
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
void print() const
Print content of correlated LCT digi.
int getKeyWG() const
return the key wire group