CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Private Member Functions | Private Attributes
CSCCLCTDigi Class Reference

#include <CSCCLCTDigi.h>

Public Types

enum  CLCTBXMask { kBXDataMask = 0x3 }
 
typedef std::vector< std::vector< uint16_t > > ComparatorContainer
 
enum  Version { Version::Legacy = 0, Version::Run3 }
 

Public Member Functions

void clear ()
 clear this CLCT More...
 
 CSCCLCTDigi (const uint16_t valid, const uint16_t quality, const uint16_t pattern, const uint16_t striptype, const uint16_t bend, const uint16_t strip, const uint16_t cfeb, const uint16_t bx, const uint16_t trknmb=0, const uint16_t fullbx=0, const int16_t compCode=-1, const Version version=Version::Legacy, const bool run3_quart_strip_bit=false, const bool run3_eighth_strip_bit=false, const uint16_t run3_pattern=0, const uint16_t run3_slope=0)
 Constructors. More...
 
 CSCCLCTDigi ()
 default (calls clear()) More...
 
uint16_t getBend () const
 
uint16_t getBX () const
 return BX More...
 
uint16_t getBXData () const
 return 2-bit BX as in data More...
 
uint16_t getCFEB () const
 return Key CFEB ID More...
 
int16_t getCompCode () const
 
bool getEighthStripBit () const
 get single eighth strip bit More...
 
float getFractionalSlope () const
 
float getFractionalStrip (const uint16_t n=2) const
 return the fractional strip (middle of the strip) More...
 
uint16_t getFullBX () const
 return 12-bit full BX. More...
 
const ComparatorContainergetHits () const
 
uint16_t getKeyStrip (const uint16_t n=2) const
 
uint16_t getPattern () const
 return pattern More...
 
uint16_t getQuality () const
 return quality of a pattern (number of layers hit!) More...
 
bool getQuartStripBit () const
 get single quart strip bit More...
 
uint16_t getRun3Pattern () const
 return pattern More...
 
uint16_t getSlope () const
 return the slope More...
 
uint16_t getStrip () const
 return halfstrip that goes from 0 to 31 in a (D)CFEB More...
 
uint16_t getStripType () const
 return striptype More...
 
uint16_t getTrknmb () const
 return track number (1,2) More...
 
bool isRun3 () const
 Distinguish Run-1/2 from Run-3. More...
 
bool isValid () const
 check CLCT validity (1 - valid CLCT) More...
 
bool operator!= (const CSCCLCTDigi &) const
 True if the preceding one is false. More...
 
bool operator== (const CSCCLCTDigi &) const
 True if the two LCTs have exactly the same members (except the number). More...
 
bool operator> (const CSCCLCTDigi &) const
 
void print () const
 Print content of digi. More...
 
void setBend (const uint16_t bend)
 set bend More...
 
void setBX (const uint16_t bx)
 set bx More...
 
void setCFEB (const uint16_t cfeb)
 set Key CFEB ID More...
 
void setCompCode (const int16_t code)
 
void setEighthStripBit (const bool eighthStripBit)
 set single eighth strip bit More...
 
void setFullBX (const uint16_t fullbx)
 Set 12-bit full BX. More...
 
void setHits (const ComparatorContainer &hits)
 
void setPattern (const uint16_t pattern)
 set pattern More...
 
void setQuality (const uint16_t quality)
 set quality More...
 
void setQuartStripBit (const bool quartStripBit)
 set single quart strip bit More...
 
void setRun3 (bool isRun3)
 
void setRun3Pattern (const uint16_t pattern)
 set pattern More...
 
void setSlope (const uint16_t slope)
 set the slope More...
 
void setStrip (const uint16_t strip)
 set strip More...
 
void setStripType (const uint16_t stripType)
 set stripType More...
 
void setTrknmb (const uint16_t number)
 Set track number (1,2) after sorting CLCTs. More...
 
void setValid (const uint16_t valid)
 set valid More...
 

Static Private Member Functions

static const ComparatorContaineremptyContainer ()
 

Private Attributes

uint16_t bend_
 
uint16_t bx_
 
uint16_t cfeb_
 
int16_t compCode_
 
uint16_t fullbx_
 
ComparatorContainer hits_
 
uint16_t pattern_
 
uint16_t quality_
 
bool run3_eighth_strip_bit_
 
uint16_t run3_pattern_
 
bool run3_quart_strip_bit_
 
uint16_t run3_slope_
 
uint16_t strip_
 
uint16_t striptype_
 
uint16_t trknmb_
 
uint16_t valid_
 
Version version_
 

Detailed Description

Digi for CLCT trigger primitives.

Author
N. Terentiev, CMU

Definition at line 17 of file CSCCLCTDigi.h.

Member Typedef Documentation

◆ ComparatorContainer

typedef std::vector<std::vector<uint16_t> > CSCCLCTDigi::ComparatorContainer

Definition at line 19 of file CSCCLCTDigi.h.

Member Enumeration Documentation

◆ CLCTBXMask

Enumerator
kBXDataMask 

Definition at line 23 of file CSCCLCTDigi.h.

◆ Version

enum CSCCLCTDigi::Version
strong
Enumerator
Legacy 
Run3 

Definition at line 21 of file CSCCLCTDigi.h.

21 { Legacy = 0, Run3 };

Constructor & Destructor Documentation

◆ CSCCLCTDigi() [1/2]

CSCCLCTDigi::CSCCLCTDigi ( const uint16_t  valid,
const uint16_t  quality,
const uint16_t  pattern,
const uint16_t  striptype,
const uint16_t  bend,
const uint16_t  strip,
const uint16_t  cfeb,
const uint16_t  bx,
const uint16_t  trknmb = 0,
const uint16_t  fullbx = 0,
const int16_t  compCode = -1,
const Version  version = Version::Legacy,
const bool  run3_quart_strip_bit = false,
const bool  run3_eighth_strip_bit = false,
const uint16_t  run3_pattern = 0,
const uint16_t  run3_slope = 0 
)

Constructors.

Definition at line 33 of file CSCCLCTDigi.cc.

49  : valid_(valid),
52  striptype_(striptype),
53  bend_(bend),
54  strip_(strip),
55  cfeb_(cfeb),
56  bx_(bx),
57  trknmb_(trknmb),
58  fullbx_(fullbx),
59  compCode_(compCode),
60  run3_quart_strip_bit_(run3_quart_strip_bit),
61  run3_eighth_strip_bit_(run3_eighth_strip_bit),
62  run3_pattern_(run3_pattern),
63  run3_slope_(run3_slope),
64  hits_(),
65  version_(version) {}
uint16_t trknmb_
Definition: CSCCLCTDigi.h:217
uint16_t run3_slope_
Definition: CSCCLCTDigi.h:232
uint16_t strip_
Definition: CSCCLCTDigi.h:213
uint16_t pattern_
Definition: CSCCLCTDigi.h:207
uint16_t valid_
Definition: CSCCLCTDigi.h:201
bool run3_eighth_strip_bit_
Definition: CSCCLCTDigi.h:228
uint16_t bx_
Definition: CSCCLCTDigi.h:216
uint16_t run3_pattern_
Definition: CSCCLCTDigi.h:230
string quality
uint16_t bend_
Definition: CSCCLCTDigi.h:211
uint16_t fullbx_
Definition: CSCCLCTDigi.h:218
ComparatorContainer hits_
Definition: CSCCLCTDigi.h:235
uint16_t cfeb_
Definition: CSCCLCTDigi.h:215
bool run3_quart_strip_bit_
Definition: CSCCLCTDigi.h:226
uint16_t striptype_
Definition: CSCCLCTDigi.h:208
uint16_t quality_
Definition: CSCCLCTDigi.h:202
int16_t compCode_
Definition: CSCCLCTDigi.h:224
Version version_
Definition: CSCCLCTDigi.h:236

◆ CSCCLCTDigi() [2/2]

CSCCLCTDigi::CSCCLCTDigi ( )

default (calls clear())

Default.

Definition at line 68 of file CSCCLCTDigi.cc.

References clear().

68  {
69  clear(); // set contents to zero
70 }
void clear()
clear this CLCT
Definition: CSCCLCTDigi.cc:73

Member Function Documentation

◆ clear()

void CSCCLCTDigi::clear ( void  )

clear this CLCT

Clears this CLCT.

Definition at line 73 of file CSCCLCTDigi.cc.

References bend_, bx_, cfeb_, compCode_, fullbx_, hits_, Legacy, pattern_, quality_, run3_eighth_strip_bit_, run3_pattern_, run3_quart_strip_bit_, run3_slope_, strip_, striptype_, trknmb_, valid_, and version_.

Referenced by CSCCorrelatedLCTDigi::clear(), CSCCathodeLCTProcessor::clear(), CSCMotherboard::correlateLCTs(), and CSCCLCTDigi().

73  {
74  valid_ = 0;
75  quality_ = 0;
76  pattern_ = 0;
77  striptype_ = 0;
78  bend_ = 0;
79  strip_ = 0;
80  cfeb_ = 0;
81  bx_ = 0;
82  trknmb_ = 0;
83  fullbx_ = 0;
84  // Run-3 variables
85  compCode_ = -1;
86  run3_quart_strip_bit_ = false;
87  run3_eighth_strip_bit_ = false;
88  run3_pattern_ = 0;
89  run3_slope_ = 0;
91  hits_.clear();
92 }
uint16_t trknmb_
Definition: CSCCLCTDigi.h:217
uint16_t run3_slope_
Definition: CSCCLCTDigi.h:232
uint16_t strip_
Definition: CSCCLCTDigi.h:213
uint16_t pattern_
Definition: CSCCLCTDigi.h:207
uint16_t valid_
Definition: CSCCLCTDigi.h:201
bool run3_eighth_strip_bit_
Definition: CSCCLCTDigi.h:228
uint16_t bx_
Definition: CSCCLCTDigi.h:216
uint16_t run3_pattern_
Definition: CSCCLCTDigi.h:230
uint16_t bend_
Definition: CSCCLCTDigi.h:211
uint16_t fullbx_
Definition: CSCCLCTDigi.h:218
ComparatorContainer hits_
Definition: CSCCLCTDigi.h:235
uint16_t cfeb_
Definition: CSCCLCTDigi.h:215
bool run3_quart_strip_bit_
Definition: CSCCLCTDigi.h:226
uint16_t striptype_
Definition: CSCCLCTDigi.h:208
uint16_t quality_
Definition: CSCCLCTDigi.h:202
int16_t compCode_
Definition: CSCCLCTDigi.h:224
Version version_
Definition: CSCCLCTDigi.h:236

◆ emptyContainer()

CSCCLCTDigi::ComparatorContainer const & CSCCLCTDigi::emptyContainer ( )
staticprivate

Definition at line 27 of file CSCCLCTDigi.cc.

Referenced by getHits().

27  {
28  static ComparatorContainer const s_container = makeEmptyContainer();
29  return s_container;
30 }
std::vector< std::vector< uint16_t > > ComparatorContainer
Definition: CSCCLCTDigi.h:19

◆ getBend()

uint16_t CSCCLCTDigi::getBend ( ) const
inline

◆ getBX()

uint16_t CSCCLCTDigi::getBX ( ) const
inline

◆ getBXData()

uint16_t CSCCLCTDigi::getBXData ( ) const
inline

return 2-bit BX as in data

Definition at line 126 of file CSCCLCTDigi.h.

References bx_, and kBXDataMask.

126 { return bx_ & kBXDataMask; }
uint16_t bx_
Definition: CSCCLCTDigi.h:216

◆ getCFEB()

uint16_t CSCCLCTDigi::getCFEB ( ) const
inline

◆ getCompCode()

int16_t CSCCLCTDigi::getCompCode ( ) const
inline

◆ getEighthStripBit()

bool CSCCLCTDigi::getEighthStripBit ( ) const
inline

◆ getFractionalSlope()

float CSCCLCTDigi::getFractionalSlope ( ) const

slope in number of half-strips/layer negative means left-bending positive means right-bending

Definition at line 95 of file CSCCLCTDigi.cc.

References ALCARECOEcalPhiSym_cff::float, getBend(), getPattern(), getSlope(), isRun3(), and slope.

95  {
96  if (isRun3()) {
97  // 4-bit slope
98  float slope[17] = {
99  0.0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1.0, 1.125, 1.25, 1.375, 1.5, 1.625, 1.75, 2.0, 2.5};
100  return (2 * getBend() - 1) * slope[getSlope()];
101  } else {
102  int slope[11] = {0, 0, -8, 8, -6, 6, -4, 4, -2, 2, 0};
103  return float(slope[getPattern()] / 5.);
104  }
105 }
static const double slope[3]
bool isRun3() const
Distinguish Run-1/2 from Run-3.
Definition: CSCCLCTDigi.h:195
uint16_t getBend() const
Definition: CSCCLCTDigi.h:93
uint16_t getPattern() const
return pattern
Definition: CSCCLCTDigi.h:62
uint16_t getSlope() const
return the slope
Definition: CSCCLCTDigi.h:74

◆ getFractionalStrip()

float CSCCLCTDigi::getFractionalStrip ( const uint16_t  n = 2) const

return the fractional strip (middle of the strip)

Definition at line 123 of file CSCCLCTDigi.cc.

References compCode_, getKeyStrip(), and create_idmaps::n.

123  {
124  if (compCode_ != -1 and n == 8) {
125  return 0.125f * (getKeyStrip(n) + 0.5);
126  } else if (compCode_ != -1 and n == 4) {
127  return 0.25f * (getKeyStrip(n) + 0.5);
128  } else {
129  return 0.5f * (getKeyStrip(n) + 0.5);
130  }
131 }
uint16_t getKeyStrip(const uint16_t n=2) const
Definition: CSCCLCTDigi.cc:107
int16_t compCode_
Definition: CSCCLCTDigi.h:224

◆ getFullBX()

uint16_t CSCCLCTDigi::getFullBX ( ) const
inline

◆ getHits()

const ComparatorContainer& CSCCLCTDigi::getHits ( ) const
inline

Definition at line 176 of file CSCCLCTDigi.h.

References emptyContainer(), and hits_.

Referenced by CSCCathodeLCTProcessor::cleanComparatorContainer(), CSCGEMMatcher::mitigatedSlopeByConsistency(), and ComparatorCodeLUT::run().

176 { return hits_.empty() ? emptyContainer() : hits_; }
static const ComparatorContainer & emptyContainer()
Definition: CSCCLCTDigi.cc:27
ComparatorContainer hits_
Definition: CSCCLCTDigi.h:235

◆ getKeyStrip()

uint16_t CSCCLCTDigi::getKeyStrip ( const uint16_t  n = 2) const

Convert strip_ and cfeb_ to keyStrip. Each CFEB has up to 16 strips (32 halfstrips). There are 5 cfebs. The "strip_" variable is one of 32 halfstrips on the keylayer of a single CFEB, so that Halfstrip = (cfeb*32 + strip). This function can also return the quartstrip or eighthstrip when the comparator code has been set

Definition at line 107 of file CSCCLCTDigi.cc.

References cfeb_, compCode_, getEighthStripBit(), getQuartStripBit(), getStrip(), and create_idmaps::n.

Referenced by CSCTMBHeader2007_rev0x50c3::addCLCT0(), CSCTMBHeader2013::addCLCT0(), CSCTMBHeader2020_TMB::addCLCT0(), CSCTMBHeader2020_Run2::addCLCT0(), CSCTMBHeader2020_CCLUT::addCLCT0(), CSCTMBHeader2020_GEM::addCLCT0(), CSCTMBHeader2007_rev0x50c3::addCLCT1(), CSCTMBHeader2020_Run2::addCLCT1(), CSCTMBHeader2020_TMB::addCLCT1(), CSCTMBHeader2013::addCLCT1(), CSCTMBHeader2020_CCLUT::addCLCT1(), CSCTMBHeader2020_GEM::addCLCT1(), L1TdeCSCTPG::areSameCLCTs(), CSCGEMMatcher::calculateGEMCSCBending(), CSCCathodeLCTProcessor::checkLocalShower(), LCTQualityControl::checkValid(), CSCMotherboard::constructLCTs(), CSCGEMMotherboard::constructLCTsGEM(), CSCGEMMotherboard::correlateLCTsGEM(), CSCUpgradeCathodeLCTProcessor::findLCTs(), CSCCathodeLCTProcessor::findLCTs(), getFractionalStrip(), CSCGEMMatcher::matchedClusterDistES(), CSCGEMMatcher::matchingClustersLoc(), CSCGEMMatcher::mitigatedSlopeByConsistency(), operator<<(), operator==(), operator>(), print(), and ComparatorCodeLUT::run().

107  {
108  // 10-bit case for strip data word
109  if (compCode_ != -1 and n == 8) {
110  return getKeyStrip(4) * 2 + getEighthStripBit();
111  }
112  // 9-bit case for strip data word
113  else if (compCode_ != -1 and n == 4) {
114  return getKeyStrip(2) * 2 + getQuartStripBit();
115  }
116  // 8-bit case for strip data word (all other cases)
117  else {
118  return cfeb_ * 32 + getStrip();
119  }
120 }
uint16_t getKeyStrip(const uint16_t n=2) const
Definition: CSCCLCTDigi.cc:107
bool getEighthStripBit() const
get single eighth strip bit
Definition: CSCCLCTDigi.h:114
uint16_t getStrip() const
return halfstrip that goes from 0 to 31 in a (D)CFEB
Definition: CSCCLCTDigi.h:99
bool getQuartStripBit() const
get single quart strip bit
Definition: CSCCLCTDigi.h:108
uint16_t cfeb_
Definition: CSCCLCTDigi.h:215
int16_t compCode_
Definition: CSCCLCTDigi.h:224

◆ getPattern()

uint16_t CSCCLCTDigi::getPattern ( ) const
inline

◆ getQuality()

uint16_t CSCCLCTDigi::getQuality ( ) const
inline

◆ getQuartStripBit()

bool CSCCLCTDigi::getQuartStripBit ( ) const
inline

◆ getRun3Pattern()

uint16_t CSCCLCTDigi::getRun3Pattern ( ) const
inline

◆ getSlope()

uint16_t CSCCLCTDigi::getSlope ( ) const
inline

◆ getStrip()

uint16_t CSCCLCTDigi::getStrip ( ) const
inline

return halfstrip that goes from 0 to 31 in a (D)CFEB

Definition at line 99 of file CSCCLCTDigi.h.

References strip_.

Referenced by CSCTMBHeader2006::addCLCT0(), CSCTMBHeader2007::addCLCT0(), CSCTMBHeader2006::addCLCT1(), CSCTMBHeader2007::addCLCT1(), LCTQualityControl::checkValid(), getKeyStrip(), operator<<(), and print().

99 { return strip_; }
uint16_t strip_
Definition: CSCCLCTDigi.h:213

◆ getStripType()

uint16_t CSCCLCTDigi::getStripType ( ) const
inline

return striptype

Definition at line 85 of file CSCCLCTDigi.h.

References striptype_.

Referenced by CSCTMBHeader2006::addCLCT0(), CSCTMBHeader2006::addCLCT1(), L1TdeCSCTPG::areSameCLCTs(), operator==(), and print().

85 { return striptype_; }
uint16_t striptype_
Definition: CSCCLCTDigi.h:208

◆ getTrknmb()

uint16_t CSCCLCTDigi::getTrknmb ( ) const
inline

return track number (1,2)

Definition at line 132 of file CSCCLCTDigi.h.

References trknmb_.

Referenced by LCTQualityControl::checkValid(), operator<<(), and print().

132 { return trknmb_; }
uint16_t trknmb_
Definition: CSCCLCTDigi.h:217

◆ isRun3()

bool CSCCLCTDigi::isRun3 ( ) const
inline

Distinguish Run-1/2 from Run-3.

Definition at line 195 of file CSCCLCTDigi.h.

References Run3, and version_.

Referenced by getCompCode(), getFractionalSlope(), operator<<(), setRun3(), and CSCMotherboard::sortCLCTByQualBend().

◆ isValid()

bool CSCCLCTDigi::isValid ( void  ) const
inline

◆ operator!=()

bool CSCCLCTDigi::operator!= ( const CSCCLCTDigi rhs) const

True if the preceding one is false.

Definition at line 189 of file CSCCLCTDigi.cc.

189  {
190  // True if == is false.
191  bool returnValue = true;
192  if ((*this) == rhs)
193  returnValue = false;
194  return returnValue;
195 }

◆ operator==()

bool CSCCLCTDigi::operator== ( const CSCCLCTDigi rhs) const

True if the two LCTs have exactly the same members (except the number).

Definition at line 178 of file CSCCLCTDigi.cc.

References getBend(), getBX(), getCompCode(), getKeyStrip(), getPattern(), getQuality(), getStripType(), and isValid().

178  {
179  // Exact equality.
180  bool returnValue = false;
181  if (isValid() == rhs.isValid() && getQuality() == rhs.getQuality() && getPattern() == rhs.getPattern() &&
182  getKeyStrip() == rhs.getKeyStrip() && getStripType() == rhs.getStripType() && getBend() == rhs.getBend() &&
183  getBX() == rhs.getBX() && getCompCode() == rhs.getCompCode()) {
184  returnValue = true;
185  }
186  return returnValue;
187 }
uint16_t getQuality() const
return quality of a pattern (number of layers hit!)
Definition: CSCCLCTDigi.h:56
uint16_t getKeyStrip(const uint16_t n=2) const
Definition: CSCCLCTDigi.cc:107
int16_t getCompCode() const
Definition: CSCCLCTDigi.h:171
uint16_t getBend() const
Definition: CSCCLCTDigi.h:93
uint16_t getStripType() const
return striptype
Definition: CSCCLCTDigi.h:85
bool isValid() const
check CLCT validity (1 - valid CLCT)
Definition: CSCCLCTDigi.h:50
uint16_t getBX() const
return BX
Definition: CSCCLCTDigi.h:123
uint16_t getPattern() const
return pattern
Definition: CSCCLCTDigi.h:62

◆ operator>()

bool CSCCLCTDigi::operator> ( const CSCCLCTDigi rhs) const

True if the left-hand side has a larger "quality". Full definition of "quality" depends on quality word itself, pattern type, and strip number.

Definition at line 135 of file CSCCLCTDigi.cc.

References getKeyStrip(), getPattern(), getQuality(), Run3, and version_.

135  {
136  // Several versions of CLCT sorting criteria were used before 2008.
137  // They are available in CMSSW versions prior to 3_1_0; here we only keep
138  // the latest one, used in TMB-07 firmware (w/o distrips).
139  bool returnValue = false;
140 
141  uint16_t quality1 = getQuality();
142  uint16_t quality2 = rhs.getQuality();
143 
144  // Run-3 case
145  if (version_ == Version::Run3) {
146  // Better-quality CLCTs are preferred.
147  // If two qualities are equal, smaller bending is preferred;
148  // left- and right-bend patterns are considered to be of
149  // the same quality. This corresponds to "pattern" being smaller!!!
150  // If both qualities and pattern id's are the same, lower keystrip
151  // is preferred.
152  if ((quality1 > quality2) || (quality1 == quality2 && getPattern() < rhs.getPattern()) ||
153  (quality1 == quality2 && getPattern() == rhs.getPattern() && getKeyStrip() < rhs.getKeyStrip())) {
154  returnValue = true;
155  }
156  }
157  // Legacy case:
158  else {
159  // The bend-direction bit pid[0] is ignored (left and right bends have
160  // equal quality).
161  uint16_t pattern1 = getPattern() & 14;
162  uint16_t pattern2 = rhs.getPattern() & 14;
163 
164  // Better-quality CLCTs are preferred.
165  // If two qualities are equal, larger pattern id (i.e., straighter pattern)
166  // is preferred; left- and right-bend patterns are considered to be of
167  // the same quality.
168  // If both qualities and pattern id's are the same, lower keystrip
169  // is preferred.
170  if ((quality1 > quality2) || (quality1 == quality2 && pattern1 > pattern2) ||
171  (quality1 == quality2 && pattern1 == pattern2 && getKeyStrip() < rhs.getKeyStrip())) {
172  returnValue = true;
173  }
174  }
175  return returnValue;
176 }
uint16_t getQuality() const
return quality of a pattern (number of layers hit!)
Definition: CSCCLCTDigi.h:56
uint16_t getKeyStrip(const uint16_t n=2) const
Definition: CSCCLCTDigi.cc:107
uint16_t getPattern() const
return pattern
Definition: CSCCLCTDigi.h:62
Version version_
Definition: CSCCLCTDigi.h:236

◆ print()

void CSCCLCTDigi::print ( void  ) const

Print content of digi.

Debug.

Definition at line 198 of file CSCCLCTDigi.cc.

References getBend(), getBX(), getCFEB(), getCompCode(), getFullBX(), getKeyStrip(), getPattern(), getQuality(), getStrip(), getStripType(), getTrknmb(), and isValid().

198  {
199  if (isValid()) {
200  char stripType = (getStripType() == 0) ? 'D' : 'H';
201  char bend = (getBend() == 0) ? 'L' : 'R';
202 
203  edm::LogVerbatim("CSCDigi") << " CSC CLCT #" << std::setw(1) << getTrknmb() << ": Valid = " << std::setw(1)
204  << isValid() << " Key Strip = " << std::setw(3) << getKeyStrip()
205  << " Strip = " << std::setw(2) << getStrip() << " Quality = " << std::setw(1)
206  << getQuality() << " Pattern = " << std::setw(1) << getPattern()
207  << " Bend = " << std::setw(1) << bend << " Strip type = " << std::setw(1) << stripType
208  << " CFEB ID = " << std::setw(1) << getCFEB() << " BX = " << std::setw(1) << getBX()
209  << " Full BX= " << std::setw(1) << getFullBX() << " Comp Code= " << std::setw(1)
210  << getCompCode();
211  } else {
212  edm::LogVerbatim("CSCDigi") << "Not a valid Cathode LCT.";
213  }
214 }
Log< level::Info, true > LogVerbatim
uint16_t getTrknmb() const
return track number (1,2)
Definition: CSCCLCTDigi.h:132
uint16_t getQuality() const
return quality of a pattern (number of layers hit!)
Definition: CSCCLCTDigi.h:56
uint16_t getKeyStrip(const uint16_t n=2) const
Definition: CSCCLCTDigi.cc:107
int16_t getCompCode() const
Definition: CSCCLCTDigi.h:171
uint16_t getStrip() const
return halfstrip that goes from 0 to 31 in a (D)CFEB
Definition: CSCCLCTDigi.h:99
uint16_t getFullBX() const
return 12-bit full BX.
Definition: CSCCLCTDigi.h:165
uint16_t getBend() const
Definition: CSCCLCTDigi.h:93
uint16_t getStripType() const
return striptype
Definition: CSCCLCTDigi.h:85
bool isValid() const
check CLCT validity (1 - valid CLCT)
Definition: CSCCLCTDigi.h:50
uint16_t getCFEB() const
return Key CFEB ID
Definition: CSCCLCTDigi.h:117
uint16_t getBX() const
return BX
Definition: CSCCLCTDigi.h:123
uint16_t getPattern() const
return pattern
Definition: CSCCLCTDigi.h:62

◆ setBend()

void CSCCLCTDigi::setBend ( const uint16_t  bend)
inline

set bend

Definition at line 96 of file CSCCLCTDigi.h.

References bend_.

Referenced by ComparatorCodeLUT::run().

96 { bend_ = bend; }
uint16_t bend_
Definition: CSCCLCTDigi.h:211

◆ setBX()

void CSCCLCTDigi::setBX ( const uint16_t  bx)
inline

◆ setCFEB()

void CSCCLCTDigi::setCFEB ( const uint16_t  cfeb)
inline

set Key CFEB ID

Definition at line 120 of file CSCCLCTDigi.h.

References cfeb_.

Referenced by ComparatorCodeLUT::run().

120 { cfeb_ = cfeb; }
uint16_t cfeb_
Definition: CSCCLCTDigi.h:215

◆ setCompCode()

void CSCCLCTDigi::setCompCode ( const int16_t  code)
inline

Definition at line 173 of file CSCCLCTDigi.h.

References compCode_.

Referenced by ComparatorCodeLUT::run().

173 { compCode_ = code; }
int16_t compCode_
Definition: CSCCLCTDigi.h:224

◆ setEighthStripBit()

void CSCCLCTDigi::setEighthStripBit ( const bool  eighthStripBit)
inline

set single eighth strip bit

Definition at line 111 of file CSCCLCTDigi.h.

References run3_eighth_strip_bit_.

Referenced by ComparatorCodeLUT::run().

111 { run3_eighth_strip_bit_ = eighthStripBit; }
bool run3_eighth_strip_bit_
Definition: CSCCLCTDigi.h:228

◆ setFullBX()

void CSCCLCTDigi::setFullBX ( const uint16_t  fullbx)
inline

Set 12-bit full BX.

Definition at line 168 of file CSCCLCTDigi.h.

References fullbx_.

168 { fullbx_ = fullbx; }
uint16_t fullbx_
Definition: CSCCLCTDigi.h:218

◆ setHits()

void CSCCLCTDigi::setHits ( const ComparatorContainer hits)
inline

◆ setPattern()

void CSCCLCTDigi::setPattern ( const uint16_t  pattern)
inline

set pattern

Definition at line 65 of file CSCCLCTDigi.h.

References topSingleLeptonDQM_PU_cfi::pattern, and pattern_.

Referenced by ComparatorCodeLUT::run().

◆ setQuality()

void CSCCLCTDigi::setQuality ( const uint16_t  quality)
inline

set quality

Definition at line 59 of file CSCCLCTDigi.h.

References quality, and quality_.

59 { quality_ = quality; }
string quality
uint16_t quality_
Definition: CSCCLCTDigi.h:202

◆ setQuartStripBit()

void CSCCLCTDigi::setQuartStripBit ( const bool  quartStripBit)
inline

set single quart strip bit

Definition at line 105 of file CSCCLCTDigi.h.

References run3_quart_strip_bit_.

Referenced by ComparatorCodeLUT::run().

105 { run3_quart_strip_bit_ = quartStripBit; }
bool run3_quart_strip_bit_
Definition: CSCCLCTDigi.h:226

◆ setRun3()

void CSCCLCTDigi::setRun3 ( bool  isRun3)

Definition at line 133 of file CSCCLCTDigi.cc.

References isRun3(), Legacy, Run3, and version_.

Referenced by ComparatorCodeLUT::run().

bool isRun3() const
Distinguish Run-1/2 from Run-3.
Definition: CSCCLCTDigi.h:195
Version version_
Definition: CSCCLCTDigi.h:236

◆ setRun3Pattern()

void CSCCLCTDigi::setRun3Pattern ( const uint16_t  pattern)
inline

set pattern

Definition at line 71 of file CSCCLCTDigi.h.

References topSingleLeptonDQM_PU_cfi::pattern, and run3_pattern_.

Referenced by ComparatorCodeLUT::run().

◆ setSlope()

void CSCCLCTDigi::setSlope ( const uint16_t  slope)
inline

set the slope

Definition at line 77 of file CSCCLCTDigi.h.

References run3_slope_, and slope.

Referenced by ComparatorCodeLUT::run().

77 { run3_slope_ = slope; }
uint16_t run3_slope_
Definition: CSCCLCTDigi.h:232
static const double slope[3]

◆ setStrip()

void CSCCLCTDigi::setStrip ( const uint16_t  strip)
inline

set strip

Definition at line 102 of file CSCCLCTDigi.h.

References nano_mu_digi_cff::strip, and strip_.

Referenced by ComparatorCodeLUT::run().

◆ setStripType()

void CSCCLCTDigi::setStripType ( const uint16_t  stripType)
inline

set stripType

Definition at line 88 of file CSCCLCTDigi.h.

References striptype_.

88 { striptype_ = stripType; }
uint16_t striptype_
Definition: CSCCLCTDigi.h:208

◆ setTrknmb()

void CSCCLCTDigi::setTrknmb ( const uint16_t  number)
inline

Set track number (1,2) after sorting CLCTs.

Definition at line 162 of file CSCCLCTDigi.h.

References ConfigBuilder::number, and trknmb_.

Referenced by CSCCathodeLCTProcessor::run().

162 { trknmb_ = number; }
uint16_t trknmb_
Definition: CSCCLCTDigi.h:217

◆ setValid()

void CSCCLCTDigi::setValid ( const uint16_t  valid)
inline

set valid

Definition at line 53 of file CSCCLCTDigi.h.

References validateGeometry_cfg::valid, and valid_.

Member Data Documentation

◆ bend_

uint16_t CSCCLCTDigi::bend_
private

Definition at line 211 of file CSCCLCTDigi.h.

Referenced by clear(), getBend(), and setBend().

◆ bx_

uint16_t CSCCLCTDigi::bx_
private

Definition at line 216 of file CSCCLCTDigi.h.

Referenced by clear(), getBX(), getBXData(), and setBX().

◆ cfeb_

uint16_t CSCCLCTDigi::cfeb_
private

Definition at line 215 of file CSCCLCTDigi.h.

Referenced by clear(), getCFEB(), getKeyStrip(), and setCFEB().

◆ compCode_

int16_t CSCCLCTDigi::compCode_
private

Definition at line 224 of file CSCCLCTDigi.h.

Referenced by clear(), getCompCode(), getFractionalStrip(), getKeyStrip(), and setCompCode().

◆ fullbx_

uint16_t CSCCLCTDigi::fullbx_
private

Definition at line 218 of file CSCCLCTDigi.h.

Referenced by clear(), getFullBX(), and setFullBX().

◆ hits_

ComparatorContainer CSCCLCTDigi::hits_
private

Definition at line 235 of file CSCCLCTDigi.h.

Referenced by clear(), getHits(), and setHits().

◆ pattern_

uint16_t CSCCLCTDigi::pattern_
private

Definition at line 207 of file CSCCLCTDigi.h.

Referenced by clear(), getPattern(), and setPattern().

◆ quality_

uint16_t CSCCLCTDigi::quality_
private

Definition at line 202 of file CSCCLCTDigi.h.

Referenced by clear(), getQuality(), and setQuality().

◆ run3_eighth_strip_bit_

bool CSCCLCTDigi::run3_eighth_strip_bit_
private

Definition at line 228 of file CSCCLCTDigi.h.

Referenced by clear(), getEighthStripBit(), and setEighthStripBit().

◆ run3_pattern_

uint16_t CSCCLCTDigi::run3_pattern_
private

Definition at line 230 of file CSCCLCTDigi.h.

Referenced by clear(), getRun3Pattern(), and setRun3Pattern().

◆ run3_quart_strip_bit_

bool CSCCLCTDigi::run3_quart_strip_bit_
private

Definition at line 226 of file CSCCLCTDigi.h.

Referenced by clear(), getQuartStripBit(), and setQuartStripBit().

◆ run3_slope_

uint16_t CSCCLCTDigi::run3_slope_
private

Definition at line 232 of file CSCCLCTDigi.h.

Referenced by clear(), getSlope(), and setSlope().

◆ strip_

uint16_t CSCCLCTDigi::strip_
private

Definition at line 213 of file CSCCLCTDigi.h.

Referenced by clear(), getStrip(), and setStrip().

◆ striptype_

uint16_t CSCCLCTDigi::striptype_
private

Definition at line 208 of file CSCCLCTDigi.h.

Referenced by clear(), getStripType(), and setStripType().

◆ trknmb_

uint16_t CSCCLCTDigi::trknmb_
private

Definition at line 217 of file CSCCLCTDigi.h.

Referenced by clear(), getTrknmb(), and setTrknmb().

◆ valid_

uint16_t CSCCLCTDigi::valid_
private

Definition at line 201 of file CSCCLCTDigi.h.

Referenced by clear(), isValid(), and setValid().

◆ version_

Version CSCCLCTDigi::version_
private

Definition at line 236 of file CSCCLCTDigi.h.

Referenced by clear(), isRun3(), operator>(), and setRun3().