CMS 3D CMS Logo

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

#include <CSCCLCTDigi.h>

Public Types

enum  CLCTBXMask { kBXDataMask = 0x3 }
 
enum  CLCTKeyStripMasks { kEighthStripMask = 0x1, kQuartStripMask = 0x1, kHalfStripMask = 0x1f }
 
enum  CLCTKeyStripShifts { kEighthStripShift = 6, kQuartStripShift = 5, kHalfStripShift = 0 }
 
enum  CLCTPatternMasks { kRun3SlopeMask = 0xf, kRun3PatternMask = 0x7, kLegacyPatternMask = 0xf }
 
enum  CLCTPatternShifts { kRun3SlopeShift = 7, kRun3PatternShift = 4, kLegacyPatternShift = 0 }
 
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 ()
 default 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)
 Constructors. 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 getEighthStrip () 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 getQuartStrip () 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 setEighthStrip (const bool eighthStrip)
 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 setQuartStrip (const bool quartStrip)
 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...
 

Private Member Functions

uint16_t getDataWord (const uint16_t word, const unsigned shift, const unsigned mask) const
 
void setDataWord (const uint16_t newWord, uint16_t &word, const unsigned shift, const unsigned mask)
 

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_
 
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 28 of file CSCCLCTDigi.h.

28 { kBXDataMask = 0x3 };

◆ CLCTKeyStripMasks

Enumerator
kEighthStripMask 
kQuartStripMask 
kHalfStripMask 

Definition at line 21 of file CSCCLCTDigi.h.

21 { kEighthStripMask = 0x1, kQuartStripMask = 0x1, kHalfStripMask = 0x1f };

◆ CLCTKeyStripShifts

Enumerator
kEighthStripShift 
kQuartStripShift 
kHalfStripShift 

Definition at line 22 of file CSCCLCTDigi.h.

◆ CLCTPatternMasks

Enumerator
kRun3SlopeMask 
kRun3PatternMask 
kLegacyPatternMask 

Definition at line 24 of file CSCCLCTDigi.h.

24 { kRun3SlopeMask = 0xf, kRun3PatternMask = 0x7, kLegacyPatternMask = 0xf };

◆ CLCTPatternShifts

Enumerator
kRun3SlopeShift 
kRun3PatternShift 
kLegacyPatternShift 

Definition at line 25 of file CSCCLCTDigi.h.

◆ Version

enum CSCCLCTDigi::Version
strong
Enumerator
Legacy 
Run3 

Definition at line 26 of file CSCCLCTDigi.h.

26 { 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 
)

Constructors.

Definition at line 17 of file CSCCLCTDigi.cc.

29  : valid_(valid),
32  striptype_(striptype),
33  bend_(bend),
34  strip_(strip),
35  cfeb_(cfeb),
36  bx_(bx),
37  trknmb_(trknmb),
38  fullbx_(fullbx),
39  compCode_(compCode),
40  version_(version) {
41  hits_.resize(NUM_LAYERS);
42  for (auto& p : hits_) {
43  p.resize(CLCT_PATTERN_WIDTH);
44  }
45 }

References CLCT_PATTERN_WIDTH, hits_, NUM_LAYERS, and AlCaHLTBitMon_ParallelJobs::p.

◆ CSCCLCTDigi() [2/2]

CSCCLCTDigi::CSCCLCTDigi ( )

default

Default.

Definition at line 48 of file CSCCLCTDigi.cc.

49  : valid_(0),
50  quality_(0),
51  pattern_(0),
52  striptype_(0),
53  bend_(0),
54  strip_(0),
55  cfeb_(0),
56  bx_(0),
57  trknmb_(0),
58  fullbx_(0),
59  compCode_(-1),
61  hits_.resize(NUM_LAYERS);
62  for (auto& p : hits_) {
63  p.resize(CLCT_PATTERN_WIDTH);
64  }
65 }

References CLCT_PATTERN_WIDTH, hits_, NUM_LAYERS, and AlCaHLTBitMon_ParallelJobs::p.

Member Function Documentation

◆ clear()

void CSCCLCTDigi::clear ( void  )

clear this CLCT

Clears this CLCT.

Definition at line 68 of file CSCCLCTDigi.cc.

68  {
69  valid_ = 0;
70  quality_ = 0;
71  pattern_ = 0;
72  striptype_ = 0;
73  bend_ = 0;
74  strip_ = 0;
75  cfeb_ = 0;
76  bx_ = 0;
77  trknmb_ = 0;
78  fullbx_ = 0;
79  compCode_ = -1;
80  hits_.clear();
81  hits_.resize(NUM_LAYERS);
82  for (auto& p : hits_) {
83  p.resize(CLCT_PATTERN_WIDTH);
84  }
85  setSlope(0);
86 }

References bend_, bx_, cfeb_, CLCT_PATTERN_WIDTH, compCode_, fullbx_, hits_, NUM_LAYERS, AlCaHLTBitMon_ParallelJobs::p, pattern_, quality_, setSlope(), strip_, striptype_, trknmb_, and valid_.

Referenced by CSCCorrelatedLCTDigi::clear(), CSCCathodeLCTProcessor::clear(), CSCGEMMotherboardME21::correlateLCTsGEM(), CSCGEMMotherboardME11::correlateLCTsGEM(), CSCMotherboardME11::correlateLCTsME11(), and BeautifulSoup.Tag::setString().

◆ getBend()

uint16_t CSCCLCTDigi::getBend ( ) const
inline

return bending 0: left-bending (negative delta-strip / delta layer) 1: right-bending (positive delta-strip / delta layer)

Definition at line 93 of file CSCCLCTDigi.h.

93 { return bend_; }

References bend_.

Referenced by CSCTMBHeader2006::addCLCT0(), CSCTMBHeader2007::addCLCT0(), CSCTMBHeader2006::addCLCT1(), CSCTMBHeader2007::addCLCT1(), LCTQualityControl::checkValid(), CSCMotherboard::constructLCTs(), CSCGEMMotherboard::constructLCTsGEM(), getFractionalSlope(), operator<<(), operator==(), and print().

◆ 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.

126 { return bx_ & kBXDataMask; }

References bx_, and kBXDataMask.

◆ getCFEB()

uint16_t CSCCLCTDigi::getCFEB ( ) const
inline

◆ getCompCode()

int16_t CSCCLCTDigi::getCompCode ( ) const
inline

Definition at line 171 of file CSCCLCTDigi.h.

171 { return (isRun3() ? compCode_ : -1); }

References compCode_, and isRun3().

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

◆ getDataWord()

uint16_t CSCCLCTDigi::getDataWord ( const uint16_t  word,
const unsigned  shift,
const unsigned  mask 
) const
private

Definition at line 274 of file CSCCLCTDigi.cc.

274  {
275  return (word >> shift) & mask;
276 }

References edm::shift.

Referenced by getEighthStrip(), getPattern(), getQuartStrip(), getRun3Pattern(), getSlope(), and getStrip().

◆ getEighthStrip()

bool CSCCLCTDigi::getEighthStrip ( ) const

get single eighth strip bit

Definition at line 165 of file CSCCLCTDigi.cc.

165  {
166  if (!isRun3())
167  return false;
169 }

References getDataWord(), isRun3(), kEighthStripMask, kEighthStripShift, and strip_.

Referenced by CSCMotherboard::constructLCTs(), CSCGEMMotherboard::constructLCTsGEM(), and getKeyStrip().

◆ getFractionalSlope()

float CSCCLCTDigi::getFractionalSlope ( ) const

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

Definition at line 119 of file CSCCLCTDigi.cc.

119  {
120  if (isRun3()) {
121  // 4-bit slope
122  float slope[17] = {
123  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};
124  return (2 * getBend() - 1) * slope[getSlope()];
125  } else {
126  int slope[11] = {0, 0, -8, 8, -6, 6, -4, 4, -2, 2, 0};
127  return float(slope[getPattern()] / 5.);
128  }
129 }

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

◆ getFractionalStrip()

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

return the fractional strip (middle of the strip)

Definition at line 147 of file CSCCLCTDigi.cc.

147  {
148  if (compCode_ != -1 and n == 8) {
149  return 0.125f * (getKeyStrip(n) + 0.5);
150  } else if (compCode_ != -1 and n == 4) {
151  return 0.25f * (getKeyStrip(n) + 0.5);
152  } else {
153  return 0.5f * (getKeyStrip(n) + 0.5);
154  }
155 }

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

◆ getFullBX()

uint16_t CSCCLCTDigi::getFullBX ( ) const
inline

◆ getHits()

const ComparatorContainer& CSCCLCTDigi::getHits ( ) const
inline

Definition at line 176 of file CSCCLCTDigi.h.

176 { return hits_; }

References hits_.

Referenced by CSCCathodeLCTProcessor::cleanComparatorContainer(), and CSCCathodeLCTProcessor::runCCLUT().

◆ 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 131 of file CSCCLCTDigi.cc.

131  {
132  // 10-bit case for strip data word
133  if (compCode_ != -1 and n == 8) {
134  return getKeyStrip(4) * 2 + getEighthStrip();
135  }
136  // 9-bit case for strip data word
137  else if (compCode_ != -1 and n == 4) {
138  return getKeyStrip(2) * 2 + getQuartStrip();
139  }
140  // 8-bit case for strip data word (all other cases)
141  else {
142  return cfeb_ * 32 + getStrip();
143  }
144 }

References cfeb_, compCode_, getEighthStrip(), getQuartStrip(), getStrip(), and dqmiodumpmetadata::n.

Referenced by CSCTMBHeader2007_rev0x50c3::addCLCT0(), CSCTMBHeader2013::addCLCT0(), CSCTMBHeader2013::addCLCT1(), CSCTMBHeader2007_rev0x50c3::addCLCT1(), CSCGEMMotherboard::bestMatchingPad(), LCTQualityControl::checkValid(), CSCMotherboard::constructLCTs(), CSCGEMMotherboard::constructLCTsGEM(), getFractionalStrip(), CSCGEMMotherboard::getPad(), CSCCathodeLCTAnalyzer::lctDigis(), CSCGEMMotherboard::matchingPads(), operator<<(), operator==(), operator>(), print(), and CSCCathodeLCTProcessor::runCCLUT().

◆ getPattern()

uint16_t CSCCLCTDigi::getPattern ( ) const

◆ getQuality()

uint16_t CSCCLCTDigi::getQuality ( ) const
inline

◆ getQuartStrip()

bool CSCCLCTDigi::getQuartStrip ( ) const

get single quart strip bit

Definition at line 159 of file CSCCLCTDigi.cc.

159  {
160  if (!isRun3())
161  return false;
163 }

References getDataWord(), isRun3(), kQuartStripMask, kQuartStripShift, and strip_.

Referenced by CSCMotherboard::constructLCTs(), CSCGEMMotherboard::constructLCTsGEM(), getKeyStrip(), and CSCCathodeLCTProcessor::runCCLUT().

◆ getRun3Pattern()

uint16_t CSCCLCTDigi::getRun3Pattern ( ) const

return pattern

Definition at line 94 of file CSCCLCTDigi.cc.

94  {
95  if (!isRun3())
96  return 0;
98 }

References getDataWord(), isRun3(), kRun3PatternMask, kRun3PatternShift, and pattern_.

Referenced by LCTQualityControl::checkValid(), CSCMotherboard::constructLCTs(), and CSCGEMMotherboard::constructLCTsGEM().

◆ getSlope()

uint16_t CSCCLCTDigi::getSlope ( ) const

return the slope

Definition at line 106 of file CSCCLCTDigi.cc.

106  {
107  if (!isRun3())
108  return 0;
110 }

References getDataWord(), isRun3(), kRun3SlopeMask, kRun3SlopeShift, and pattern_.

Referenced by LCTQualityControl::checkValid(), CSCMotherboard::constructLCTs(), CSCGEMMotherboard::constructLCTsGEM(), and getFractionalSlope().

◆ getStrip()

uint16_t CSCCLCTDigi::getStrip ( ) const

◆ getStripType()

uint16_t CSCCLCTDigi::getStripType ( ) const
inline

return striptype

Definition at line 85 of file CSCCLCTDigi.h.

85 { return striptype_; }

References striptype_.

Referenced by CSCTMBHeader2006::addCLCT0(), CSCTMBHeader2006::addCLCT1(), CSCCathodeLCTAnalyzer::lctDigis(), operator<<(), operator==(), and print().

◆ getTrknmb()

uint16_t CSCCLCTDigi::getTrknmb ( ) const
inline

return track number (1,2)

Definition at line 132 of file CSCCLCTDigi.h.

132 { return trknmb_; }

References trknmb_.

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

◆ isRun3()

bool CSCCLCTDigi::isRun3 ( ) const
inline

Distinguish Run-1/2 from Run-3.

Definition at line 195 of file CSCCLCTDigi.h.

195 { return version_ == Version::Run3; }

References Run3, and version_.

Referenced by getCompCode(), getEighthStrip(), getFractionalSlope(), getQuartStrip(), getRun3Pattern(), getSlope(), setEighthStrip(), setQuartStrip(), setRun3(), setRun3Pattern(), and setSlope().

◆ 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 239 of file CSCCLCTDigi.cc.

239  {
240  // True if == is false.
241  bool returnValue = true;
242  if ((*this) == rhs)
243  returnValue = false;
244  return returnValue;
245 }

◆ operator==()

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

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

Definition at line 228 of file CSCCLCTDigi.cc.

228  {
229  // Exact equality.
230  bool returnValue = false;
231  if (isValid() == rhs.isValid() && getQuality() == rhs.getQuality() && getPattern() == rhs.getPattern() &&
232  getKeyStrip() == rhs.getKeyStrip() && getStripType() == rhs.getStripType() && getBend() == rhs.getBend() &&
233  getBX() == rhs.getBX() && getCompCode() == rhs.getCompCode()) {
234  returnValue = true;
235  }
236  return returnValue;
237 }

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

◆ 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 185 of file CSCCLCTDigi.cc.

185  {
186  // Several versions of CLCT sorting criteria were used before 2008.
187  // They are available in CMSSW versions prior to 3_1_0; here we only keep
188  // the latest one, used in TMB-07 firmware (w/o distrips).
189  bool returnValue = false;
190 
191  uint16_t quality1 = getQuality();
192  uint16_t quality2 = rhs.getQuality();
193 
194  // Run-3 case
195  if (version_ == Version::Run3) {
196  // Better-quality CLCTs are preferred.
197  // If two qualities are equal, smaller bending is preferred;
198  // left- and right-bend patterns are considered to be of
199  // the same quality. This corresponds to "pattern" being smaller!!!
200  // If both qualities and pattern id's are the same, lower keystrip
201  // is preferred.
202  if ((quality1 > quality2) || (quality1 == quality2 && getPattern() < rhs.getPattern()) ||
203  (quality1 == quality2 && getPattern() == rhs.getPattern() && getKeyStrip() < rhs.getKeyStrip())) {
204  returnValue = true;
205  }
206  }
207  // Legacy case:
208  else {
209  // The bend-direction bit pid[0] is ignored (left and right bends have
210  // equal quality).
211  uint16_t pattern1 = getPattern() & 14;
212  uint16_t pattern2 = rhs.getPattern() & 14;
213 
214  // Better-quality CLCTs are preferred.
215  // If two qualities are equal, larger pattern id (i.e., straighter pattern)
216  // is preferred; left- and right-bend patterns are considered to be of
217  // the same quality.
218  // If both qualities and pattern id's are the same, lower keystrip
219  // is preferred.
220  if ((quality1 > quality2) || (quality1 == quality2 && pattern1 > pattern2) ||
221  (quality1 == quality2 && pattern1 == pattern2 && getKeyStrip() < rhs.getKeyStrip())) {
222  returnValue = true;
223  }
224  }
225  return returnValue;
226 }

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

◆ print()

void CSCCLCTDigi::print ( void  ) const

Print content of digi.

Debug.

Definition at line 248 of file CSCCLCTDigi.cc.

248  {
249  if (isValid()) {
250  char stripType = (getStripType() == 0) ? 'D' : 'H';
251  char bend = (getBend() == 0) ? 'L' : 'R';
252 
253  edm::LogVerbatim("CSCDigi") << " CSC CLCT #" << std::setw(1) << getTrknmb() << ": Valid = " << std::setw(1)
254  << isValid() << " Key Strip = " << std::setw(3) << getKeyStrip()
255  << " Strip = " << std::setw(2) << getStrip() << " Quality = " << std::setw(1)
256  << getQuality() << " Pattern = " << std::setw(1) << getPattern()
257  << " Bend = " << std::setw(1) << bend << " Strip type = " << std::setw(1) << stripType
258  << " CFEB ID = " << std::setw(1) << getCFEB() << " BX = " << std::setw(1) << getBX()
259  << " Full BX= " << std::setw(1) << getFullBX() << " Comp Code= " << std::setw(1)
260  << getCompCode();
261  } else {
262  edm::LogVerbatim("CSCDigi") << "Not a valid Cathode LCT.";
263  }
264 }

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

◆ setBend()

void CSCCLCTDigi::setBend ( const uint16_t  bend)
inline

set bend

Definition at line 96 of file CSCCLCTDigi.h.

96 { bend_ = bend; }

References trklet::bend(), and bend_.

Referenced by CSCCathodeLCTProcessor::runCCLUT().

◆ 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.

120 { cfeb_ = cfeb; }

References cfeb_.

Referenced by CSCCathodeLCTProcessor::runCCLUT().

◆ setCompCode()

void CSCCLCTDigi::setCompCode ( const int16_t  code)
inline

Definition at line 173 of file CSCCLCTDigi.h.

173 { compCode_ = code; }

References compCode_.

Referenced by CSCCathodeLCTProcessor::runCCLUT().

◆ setDataWord()

void CSCCLCTDigi::setDataWord ( const uint16_t  newWord,
uint16_t &  word,
const unsigned  shift,
const unsigned  mask 
)
private

Definition at line 266 of file CSCCLCTDigi.cc.

266  {
267  // clear the old value
268  word &= ~(mask << shift);
269 
270  // set the new value
271  word |= newWord << shift;
272 }

References edm::shift.

Referenced by setEighthStrip(), setPattern(), setQuartStrip(), setRun3Pattern(), and setSlope().

◆ setEighthStrip()

void CSCCLCTDigi::setEighthStrip ( const bool  eighthStrip)

set single eighth strip bit

Definition at line 177 of file CSCCLCTDigi.cc.

177  {
178  if (!isRun3())
179  return;
181 }

References isRun3(), kEighthStripMask, kEighthStripShift, setDataWord(), and strip_.

Referenced by CSCCathodeLCTProcessor::runCCLUT().

◆ setFullBX()

void CSCCLCTDigi::setFullBX ( const uint16_t  fullbx)
inline

Set 12-bit full BX.

Definition at line 168 of file CSCCLCTDigi.h.

168 { fullbx_ = fullbx; }

References fullbx_.

Referenced by CSCUpgradeCathodeLCTProcessor::findLCTs().

◆ setHits()

void CSCCLCTDigi::setHits ( const ComparatorContainer hits)
inline

◆ setPattern()

void CSCCLCTDigi::setPattern ( const uint16_t  pattern)

◆ setQuality()

void CSCCLCTDigi::setQuality ( const uint16_t  quality)
inline

set quality

Definition at line 59 of file CSCCLCTDigi.h.

59 { quality_ = quality; }

References quality, and quality_.

◆ setQuartStrip()

void CSCCLCTDigi::setQuartStrip ( const bool  quartStrip)

set single quart strip bit

Definition at line 171 of file CSCCLCTDigi.cc.

171  {
172  if (!isRun3())
173  return;
175 }

References isRun3(), kQuartStripMask, kQuartStripShift, setDataWord(), and strip_.

Referenced by CSCCathodeLCTProcessor::runCCLUT().

◆ setRun3()

void CSCCLCTDigi::setRun3 ( bool  isRun3)

Definition at line 183 of file CSCCLCTDigi.cc.

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

Referenced by CSCCathodeLCTProcessor::runCCLUT().

◆ setRun3Pattern()

void CSCCLCTDigi::setRun3Pattern ( const uint16_t  pattern)

set pattern

Definition at line 100 of file CSCCLCTDigi.cc.

100  {
101  if (!isRun3())
102  return;
104 }

References isRun3(), kRun3PatternMask, kRun3PatternShift, topSingleLeptonDQM_PU_cfi::pattern, pattern_, and setDataWord().

Referenced by CSCCathodeLCTProcessor::runCCLUT().

◆ setSlope()

void CSCCLCTDigi::setSlope ( const uint16_t  slope)

set the slope

Definition at line 112 of file CSCCLCTDigi.cc.

112  {
113  if (!isRun3())
114  return;
116 }

References isRun3(), kRun3SlopeMask, kRun3SlopeShift, pattern_, setDataWord(), and slope.

Referenced by clear(), and CSCCathodeLCTProcessor::runCCLUT().

◆ setStrip()

void CSCCLCTDigi::setStrip ( const uint16_t  strip)
inline

set strip

Definition at line 102 of file CSCCLCTDigi.h.

102 { strip_ = strip; }

References digitizers_cfi::strip, and strip_.

Referenced by CSCCathodeLCTProcessor::runCCLUT().

◆ setStripType()

void CSCCLCTDigi::setStripType ( const uint16_t  stripType)
inline

set stripType

Definition at line 88 of file CSCCLCTDigi.h.

88 { striptype_ = stripType; }

References striptype_.

◆ 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.

162 { trknmb_ = number; }

References contentValuesFiles::number, and trknmb_.

Referenced by CSCCathodeLCTProcessor::run().

◆ setValid()

void CSCCLCTDigi::setValid ( const uint16_t  valid)
inline

set valid

Definition at line 53 of file CSCCLCTDigi.h.

53 { valid_ = valid; }

References RunInfoPI::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 219 of file CSCCLCTDigi.h.

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

◆ cfeb_

uint16_t CSCCLCTDigi::cfeb_
private

Definition at line 218 of file CSCCLCTDigi.h.

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

◆ compCode_

int16_t CSCCLCTDigi::compCode_
private

Definition at line 225 of file CSCCLCTDigi.h.

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

◆ fullbx_

uint16_t CSCCLCTDigi::fullbx_
private

Definition at line 221 of file CSCCLCTDigi.h.

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

◆ hits_

ComparatorContainer CSCCLCTDigi::hits_
private

Definition at line 227 of file CSCCLCTDigi.h.

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

◆ pattern_

uint16_t CSCCLCTDigi::pattern_
private

◆ quality_

uint16_t CSCCLCTDigi::quality_
private

Definition at line 204 of file CSCCLCTDigi.h.

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

◆ strip_

uint16_t CSCCLCTDigi::strip_
private

◆ 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 220 of file CSCCLCTDigi.h.

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

◆ valid_

uint16_t CSCCLCTDigi::valid_
private

Definition at line 203 of file CSCCLCTDigi.h.

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

◆ version_

Version CSCCLCTDigi::version_
private

Definition at line 229 of file CSCCLCTDigi.h.

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

CSCCLCTDigi::striptype_
uint16_t striptype_
Definition: CSCCLCTDigi.h:208
CSCCLCTDigi::strip_
uint16_t strip_
Definition: CSCCLCTDigi.h:216
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
CSCCLCTDigi::getTrknmb
uint16_t getTrknmb() const
return track number (1,2)
Definition: CSCCLCTDigi.h:132
CSCCLCTDigi::kBXDataMask
Definition: CSCCLCTDigi.h:28
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
CSCCLCTDigi::kRun3PatternMask
Definition: CSCCLCTDigi.h:24
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CSCCLCTDigi::getCompCode
int16_t getCompCode() const
Definition: CSCCLCTDigi.h:171
CSCCLCTDigi::kLegacyPatternShift
Definition: CSCCLCTDigi.h:25
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
CSCCLCTDigi::kHalfStripShift
Definition: CSCCLCTDigi.h:22
CSCCLCTDigi::valid_
uint16_t valid_
Definition: CSCCLCTDigi.h:203
CSCCLCTDigi::getDataWord
uint16_t getDataWord(const uint16_t word, const unsigned shift, const unsigned mask) const
Definition: CSCCLCTDigi.cc:274
CSCCLCTDigi::getKeyStrip
uint16_t getKeyStrip(const uint16_t n=2) const
Definition: CSCCLCTDigi.cc:131
CSCCLCTDigi::getEighthStrip
bool getEighthStrip() const
get single eighth strip bit
Definition: CSCCLCTDigi.cc:165
CLCT_PATTERN_WIDTH
Definition: CSCCLCTDigi.cc:14
CSCCLCTDigi::pattern_
uint16_t pattern_
Definition: CSCCLCTDigi.h:207
quality
const uint32_t *__restrict__ Quality * quality
Definition: CAHitNtupletGeneratorKernelsImpl.h:109
word
uint64_t word
Definition: CTPPSTotemDataFormatter.cc:29
CSCCLCTDigi::hits_
ComparatorContainer hits_
Definition: CSCCLCTDigi.h:227
CSCCLCTDigi::kLegacyPatternMask
Definition: CSCCLCTDigi.h:24
CSCCLCTDigi::getQuality
uint16_t getQuality() const
return quality of a pattern (number of layers hit!)
Definition: CSCCLCTDigi.h:56
CSCCLCTDigi::getBend
uint16_t getBend() const
Definition: CSCCLCTDigi.h:93
CSCCLCTDigi::isRun3
bool isRun3() const
Distinguish Run-1/2 from Run-3.
Definition: CSCCLCTDigi.h:195
CSCCLCTDigi::bend_
uint16_t bend_
Definition: CSCCLCTDigi.h:211
contentValuesFiles.number
number
Definition: contentValuesFiles.py:53
CSCCLCTDigi::fullbx_
uint16_t fullbx_
Definition: CSCCLCTDigi.h:221
CSCCLCTDigi::getFullBX
uint16_t getFullBX() const
return 12-bit full BX.
Definition: CSCCLCTDigi.h:165
CSCCLCTDigi::bx_
uint16_t bx_
Definition: CSCCLCTDigi.h:219
CSCCLCTDigi::getStrip
uint16_t getStrip() const
return halfstrip that goes from 0 to 31 in a (D)CFEB
Definition: CSCCLCTDigi.cc:157
CSCCLCTDigi::kRun3SlopeShift
Definition: CSCCLCTDigi.h:25
CSCCLCTDigi::kEighthStripMask
Definition: CSCCLCTDigi.h:21
CSCCLCTDigi::kRun3PatternShift
Definition: CSCCLCTDigi.h:25
CSCCLCTDigi::cfeb_
uint16_t cfeb_
Definition: CSCCLCTDigi.h:218
CSCCLCTDigi::Version::Run3
CSCCLCTDigi::getStripType
uint16_t getStripType() const
return striptype
Definition: CSCCLCTDigi.h:85
CSCCLCTDigi::getQuartStrip
bool getQuartStrip() const
get single quart strip bit
Definition: CSCCLCTDigi.cc:159
CSCCLCTDigi::setDataWord
void setDataWord(const uint16_t newWord, uint16_t &word, const unsigned shift, const unsigned mask)
Definition: CSCCLCTDigi.cc:266
CSCCLCTDigi::isValid
bool isValid() const
check CLCT validity (1 - valid CLCT)
Definition: CSCCLCTDigi.h:50
topSingleLeptonDQM_PU_cfi.pattern
pattern
Definition: topSingleLeptonDQM_PU_cfi.py:39
CSCCLCTDigi::setSlope
void setSlope(const uint16_t slope)
set the slope
Definition: CSCCLCTDigi.cc:112
CSCCLCTDigi::getSlope
uint16_t getSlope() const
return the slope
Definition: CSCCLCTDigi.cc:106
CSCCLCTDigi::kRun3SlopeMask
Definition: CSCCLCTDigi.h:24
CSCCLCTDigi::getBX
uint16_t getBX() const
return BX
Definition: CSCCLCTDigi.h:123
CSCCLCTDigi::compCode_
int16_t compCode_
Definition: CSCCLCTDigi.h:225
edm::shift
static unsigned const int shift
Definition: LuminosityBlockID.cc:7
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
trklet::bend
double bend(double r, double rinv, double stripPitch)
Definition: Util.h:166
CSCCLCTDigi::kQuartStripShift
Definition: CSCCLCTDigi.h:22
NUM_LAYERS
Definition: CSCCLCTDigi.cc:14
CSCCLCTDigi::quality_
uint16_t quality_
Definition: CSCCLCTDigi.h:204
CSCCLCTDigi::Version::Legacy
CSCCLCTDigi::getCFEB
uint16_t getCFEB() const
return Key CFEB ID
Definition: CSCCLCTDigi.h:117
CSCCLCTDigi::kQuartStripMask
Definition: CSCCLCTDigi.h:21
CSCCLCTDigi::trknmb_
uint16_t trknmb_
Definition: CSCCLCTDigi.h:220
RunInfoPI::valid
Definition: RunInfoPayloadInspectoHelper.h:16
CSCCLCTDigi::getPattern
uint16_t getPattern() const
return pattern
Definition: CSCCLCTDigi.cc:88
slope
static const double slope[3]
Definition: CastorTimeSlew.cc:6
CSCCLCTDigi::version_
Version version_
Definition: CSCCLCTDigi.h:229
CSCCLCTDigi::kHalfStripMask
Definition: CSCCLCTDigi.h:21
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45
CSCCLCTDigi::kEighthStripShift
Definition: CSCCLCTDigi.h:22