CMS 3D CMS Logo

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

#include <CSCALCTDigi.h>

Public Types

enum  Version { Version::Legacy = 0, Version::Run3 }
 
typedef std::vector< std::vector< uint16_t > > WireContainer
 

Public Member Functions

void clear ()
 clear this ALCT More...
 
 CSCALCTDigi ()
 default More...
 
 CSCALCTDigi (const uint16_t valid, const uint16_t quality, const uint16_t accel, const uint16_t patternb, const uint16_t keywire, const uint16_t bx, const uint16_t trknmb=0, const uint16_t hmt=0, const Version version=Version::Legacy)
 Constructors. More...
 
uint16_t getAccelerator () const
 
uint16_t getBX () const
 return BX - five low bits of BXN counter tagged by the ALCT More...
 
uint16_t getCollisionB () const
 
uint16_t getFullBX () const
 return 12-bit full BX. More...
 
const WireContainergetHits () const
 
uint16_t getHMT () const
 return the high multiplicity bits More...
 
uint16_t getKeyWG () const
 return key wire group More...
 
uint16_t getQuality () const
 return quality of a pattern 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 ALCT validity (1 - valid ALCT) More...
 
bool operator!= (const CSCALCTDigi &) const
 True if the preceding one is false. More...
 
bool operator== (const CSCALCTDigi &) const
 True if all members (except the number) of both ALCTs are equal. More...
 
bool operator> (const CSCALCTDigi &) const
 
void print () const
 Print content of digi. More...
 
void setAccelerator (const uint16_t accelerator)
 set accelerator bit More...
 
void setBX (const uint16_t BX)
 set BX More...
 
void setCollisionB (const uint16_t collision)
 set Collision Pattern B bit More...
 
void setFullBX (const uint16_t fullbx)
 Set 12-bit full BX. More...
 
void setHits (const WireContainer &hits)
 
void setHMT (const uint16_t hmt)
 set the high multiplicity bits More...
 
void setKeyWG (const uint16_t keyWG)
 set key wire group More...
 
void setQuality (const uint16_t quality)
 set quality More...
 
void setRun3 (const bool isRun3)
 
void setTrknmb (const uint16_t number)
 Set track number (1,2) after sorting ALCTs. More...
 
void setValid (const uint16_t valid)
 set valid More...
 
void setWireGroup (uint16_t wiregroup)
 set wiregroup number More...
 

Private Attributes

uint16_t accel_
 
uint16_t bx_
 
uint16_t fullbx_
 
WireContainer hits_
 
uint16_t hmt_
 
uint16_t keywire_
 
uint16_t patternb_
 
uint16_t quality_
 
uint16_t trknmb_
 
uint16_t valid_
 
Version version_
 

Detailed Description

Digi for ALCT trigger primitives.

Author
N. Terentiev, CMU

Definition at line 17 of file CSCALCTDigi.h.

Member Typedef Documentation

◆ WireContainer

typedef std::vector<std::vector<uint16_t> > CSCALCTDigi::WireContainer

Definition at line 21 of file CSCALCTDigi.h.

Member Enumeration Documentation

◆ Version

enum CSCALCTDigi::Version
strong
Enumerator
Legacy 
Run3 

Definition at line 19 of file CSCALCTDigi.h.

19 { Legacy = 0, Run3 };

Constructor & Destructor Documentation

◆ CSCALCTDigi() [1/2]

CSCALCTDigi::CSCALCTDigi ( const uint16_t  valid,
const uint16_t  quality,
const uint16_t  accel,
const uint16_t  patternb,
const uint16_t  keywire,
const uint16_t  bx,
const uint16_t  trknmb = 0,
const uint16_t  hmt = 0,
const Version  version = Version::Legacy 
)

Constructors.

Definition at line 19 of file CSCALCTDigi.cc.

28  : valid_(valid),
30  accel_(accel),
31  patternb_(patternb),
32  keywire_(keywire),
33  bx_(bx),
34  trknmb_(trknmb),
35  hmt_(hmt),
36  version_(version) {
37  hits_.resize(NUM_LAYERS);
38  for (auto& p : hits_) {
39  p.resize(ALCT_PATTERN_WIDTH);
40  }
41 }

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

◆ CSCALCTDigi() [2/2]

CSCALCTDigi::CSCALCTDigi ( )

default

Default.

Definition at line 44 of file CSCALCTDigi.cc.

44  {
45  clear(); // set contents to zero
47 }

References clear(), Legacy, and version_.

Member Function Documentation

◆ clear()

void CSCALCTDigi::clear ( void  )

clear this ALCT

Clears this ALCT.

Definition at line 50 of file CSCALCTDigi.cc.

50  {
51  valid_ = 0;
52  quality_ = 0;
53  accel_ = 0;
54  patternb_ = 0;
55  keywire_ = 0;
56  bx_ = 0;
57  trknmb_ = 0;
58  fullbx_ = 0;
59  hmt_ = 0;
60  hits_.resize(NUM_LAYERS);
61  for (auto& p : hits_) {
62  p.resize(ALCT_PATTERN_WIDTH);
63  }
64 }

References accel_, ALCT_PATTERN_WIDTH, bx_, fullbx_, hits_, hmt_, keywire_, NUM_LAYERS, AlCaHLTBitMon_ParallelJobs::p, patternb_, quality_, trknmb_, and valid_.

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

◆ getAccelerator()

uint16_t CSCALCTDigi::getAccelerator ( ) const
inline

return Accelerator bit 1-Accelerator pattern, 0-CollisionA or CollisionB pattern

Definition at line 53 of file CSCALCTDigi.h.

53 { return accel_; }

References accel_.

Referenced by CSCALCTs2006::addALCT0(), CSCALCTs2006::addALCT1(), CSCMotherboard::findQuality(), CSCGEMMotherboard::findQualityGEMv1(), CSCAnodeLCTProcessor::isBetterALCT(), CSCAnodeLCTAnalyzer::lctDigis(), operator<<(), operator==(), and print().

◆ getBX()

uint16_t CSCALCTDigi::getBX ( ) const
inline

◆ getCollisionB()

uint16_t CSCALCTDigi::getCollisionB ( ) const
inline

return Collision Pattern B bit 1-CollisionB pattern (accel_ = 0), 0-CollisionA pattern (accel_ = 0)

Definition at line 61 of file CSCALCTDigi.h.

61 { return patternb_; }

References patternb_.

Referenced by CSCALCTs2006::addALCT0(), CSCALCTs2006::addALCT1(), LCTQualityControl::checkValid(), CSCAnodeLCTAnalyzer::lctDigis(), operator<<(), operator==(), and print().

◆ getFullBX()

uint16_t CSCALCTDigi::getFullBX ( ) const
inline

return 12-bit full BX.

Definition at line 85 of file CSCALCTDigi.h.

85 { return fullbx_; }

References fullbx_.

Referenced by CSCAnodeLCTProcessor::lctSearch(), and print().

◆ getHits()

const WireContainer& CSCALCTDigi::getHits ( ) const
inline

Definition at line 118 of file CSCALCTDigi.h.

118 { return hits_; }

References hits_.

◆ getHMT()

uint16_t CSCALCTDigi::getHMT ( ) const

return the high multiplicity bits

Definition at line 66 of file CSCALCTDigi.cc.

References hmt_, isRun3(), and SiStripPI::max.

Referenced by operator<<(), operator==(), and print().

◆ getKeyWG()

uint16_t CSCALCTDigi::getKeyWG ( ) const
inline

◆ getQuality()

uint16_t CSCALCTDigi::getQuality ( ) const
inline

◆ getTrknmb()

uint16_t CSCALCTDigi::getTrknmb ( ) const
inline

return track number (1,2)

Definition at line 79 of file CSCALCTDigi.h.

79 { return trknmb_; }

References trknmb_.

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

◆ isRun3()

bool CSCALCTDigi::isRun3 ( ) const
inline

Distinguish Run-1/2 from Run-3.

Definition at line 113 of file CSCALCTDigi.h.

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

References Run3, and version_.

Referenced by getHMT(), setHMT(), and setRun3().

◆ isValid()

bool CSCALCTDigi::isValid ( void  ) const
inline

◆ operator!=()

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

True if the preceding one is false.

Definition at line 107 of file CSCALCTDigi.cc.

107  {
108  // True if == is false.
109  bool returnValue = true;
110  if ((*this) == rhs)
111  returnValue = false;
112  return returnValue;
113 }

◆ operator==()

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

True if all members (except the number) of both ALCTs are equal.

Definition at line 96 of file CSCALCTDigi.cc.

96  {
97  // Exact equality.
98  bool returnValue = false;
99  if (isValid() == rhs.isValid() && getQuality() == rhs.getQuality() && getAccelerator() == rhs.getAccelerator() &&
100  getCollisionB() == rhs.getCollisionB() && getKeyWG() == rhs.getKeyWG() && getBX() == rhs.getBX() &&
101  getHMT() == rhs.getHMT()) {
102  returnValue = true;
103  }
104  return returnValue;
105 }

References getAccelerator(), getBX(), getCollisionB(), getHMT(), getKeyWG(), getQuality(), and isValid().

◆ operator>()

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

True if the first ALCT has a larger quality, or if it has the same quality but a larger wire group.

Definition at line 72 of file CSCALCTDigi.cc.

72  {
73  bool returnValue = false;
74 
75  // Early ALCTs are always preferred to the ones found at later bx's.
76  if (getBX() < rhs.getBX()) {
77  returnValue = true;
78  }
79  if (getBX() != rhs.getBX()) {
80  return returnValue;
81  }
82 
83  // The > operator then checks the quality of ALCTs.
84  // If two qualities are equal, the ALCT furthest from the beam axis
85  // (lowest eta, highest wire group number) is selected.
86  uint16_t quality1 = getQuality();
87  uint16_t quality2 = rhs.getQuality();
88  if (quality1 > quality2) {
89  returnValue = true;
90  } else if (quality1 == quality2 && getKeyWG() > rhs.getKeyWG()) {
91  returnValue = true;
92  }
93  return returnValue;
94 }

References getBX(), getKeyWG(), and getQuality().

◆ print()

void CSCALCTDigi::print ( void  ) const

Print content of digi.

Debug.

Definition at line 116 of file CSCALCTDigi.cc.

116  {
117  if (isValid()) {
118  edm::LogVerbatim("CSCDigi") << "CSC ALCT #" << setw(1) << getTrknmb() << ": Valid = " << setw(1) << isValid()
119  << " Quality = " << setw(2) << getQuality() << " Accel. = " << setw(1)
120  << getAccelerator() << " PatternB = " << setw(1) << getCollisionB()
121  << " Key wire group = " << setw(3) << getKeyWG() << " BX = " << setw(2) << getBX()
122  << " Full BX = " << std::setw(1) << getFullBX() << " HMT = " << std::setw(1)
123  << getHMT();
124  } else {
125  edm::LogVerbatim("CSCDigi") << "Not a valid Anode LCT.";
126  }
127 }

References getAccelerator(), getBX(), getCollisionB(), getFullBX(), getHMT(), getKeyWG(), getQuality(), getTrknmb(), and isValid().

◆ setAccelerator()

void CSCALCTDigi::setAccelerator ( const uint16_t  accelerator)
inline

set accelerator bit

Definition at line 56 of file CSCALCTDigi.h.

56 { accel_ = accelerator; }

References accel_.

◆ setBX()

void CSCALCTDigi::setBX ( const uint16_t  BX)
inline

set BX

Definition at line 76 of file CSCALCTDigi.h.

76 { bx_ = BX; }

References L1TStage2uGTEmulatorClient_cff::BX, and bx_.

Referenced by CSCMotherboard::getBXShiftedALCT().

◆ setCollisionB()

void CSCALCTDigi::setCollisionB ( const uint16_t  collision)
inline

set Collision Pattern B bit

Definition at line 64 of file CSCALCTDigi.h.

64 { patternb_ = collision; }

References patternb_.

◆ setFullBX()

void CSCALCTDigi::setFullBX ( const uint16_t  fullbx)
inline

Set 12-bit full BX.

Definition at line 88 of file CSCALCTDigi.h.

88 { fullbx_ = fullbx; }

References fullbx_.

◆ setHits()

void CSCALCTDigi::setHits ( const WireContainer hits)
inline

Definition at line 120 of file CSCALCTDigi.h.

120 { hits_ = hits; }

References hfClusterShapes_cfi::hits, and hits_.

Referenced by CSCAnodeLCTProcessor::setWireContainer().

◆ setHMT()

void CSCALCTDigi::setHMT ( const uint16_t  hmt)

set the high multiplicity bits

Definition at line 68 of file CSCALCTDigi.cc.

References h, hmt_, isRun3(), and SiStripPI::max.

◆ setKeyWG()

void CSCALCTDigi::setKeyWG ( const uint16_t  keyWG)
inline

set key wire group

Definition at line 70 of file CSCALCTDigi.h.

70 { keywire_ = keyWG; }

References keywire_.

◆ setQuality()

void CSCALCTDigi::setQuality ( const uint16_t  quality)
inline

set quality

Definition at line 49 of file CSCALCTDigi.h.

49 { quality_ = quality; }

References qcdUeDQM_cfi::quality, and quality_.

◆ setRun3()

void CSCALCTDigi::setRun3 ( const bool  isRun3)

Definition at line 70 of file CSCALCTDigi.cc.

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

◆ setTrknmb()

void CSCALCTDigi::setTrknmb ( const uint16_t  number)
inline

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

Definition at line 82 of file CSCALCTDigi.h.

82 { trknmb_ = number; }

References contentValuesFiles::number, and trknmb_.

Referenced by CSCAnodeLCTProcessor::lctSearch().

◆ setValid()

void CSCALCTDigi::setValid ( const uint16_t  valid)
inline

set valid

Definition at line 43 of file CSCALCTDigi.h.

43 { valid_ = valid; }

References RunInfoPI::valid, and valid_.

◆ setWireGroup()

void CSCALCTDigi::setWireGroup ( uint16_t  wiregroup)
inline

set wiregroup number

Definition at line 110 of file CSCALCTDigi.h.

110 { keywire_ = wiregroup; }

References keywire_.

Member Data Documentation

◆ accel_

uint16_t CSCALCTDigi::accel_
private

Definition at line 125 of file CSCALCTDigi.h.

Referenced by clear(), getAccelerator(), and setAccelerator().

◆ bx_

uint16_t CSCALCTDigi::bx_
private

Definition at line 128 of file CSCALCTDigi.h.

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

◆ fullbx_

uint16_t CSCALCTDigi::fullbx_
private

Definition at line 130 of file CSCALCTDigi.h.

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

◆ hits_

WireContainer CSCALCTDigi::hits_
private

Definition at line 138 of file CSCALCTDigi.h.

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

◆ hmt_

uint16_t CSCALCTDigi::hmt_
private

Run-3 introduces high-multiplicity bits for CSCs. Note: In DN-20-016, 3 bits are allocated for HMT in the ALCT board. These bits are copied into the ALCT digi in CMSSW

Definition at line 134 of file CSCALCTDigi.h.

Referenced by clear(), getHMT(), and setHMT().

◆ keywire_

uint16_t CSCALCTDigi::keywire_
private

Definition at line 127 of file CSCALCTDigi.h.

Referenced by clear(), getKeyWG(), setKeyWG(), and setWireGroup().

◆ patternb_

uint16_t CSCALCTDigi::patternb_
private

Definition at line 126 of file CSCALCTDigi.h.

Referenced by clear(), getCollisionB(), and setCollisionB().

◆ quality_

uint16_t CSCALCTDigi::quality_
private

Definition at line 124 of file CSCALCTDigi.h.

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

◆ trknmb_

uint16_t CSCALCTDigi::trknmb_
private

Definition at line 129 of file CSCALCTDigi.h.

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

◆ valid_

uint16_t CSCALCTDigi::valid_
private

Definition at line 123 of file CSCALCTDigi.h.

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

◆ version_

Version CSCALCTDigi::version_
private

Definition at line 136 of file CSCALCTDigi.h.

Referenced by CSCALCTDigi(), isRun3(), and setRun3().

CSCALCTDigi::getHMT
uint16_t getHMT() const
return the high multiplicity bits
Definition: CSCALCTDigi.cc:66
CSCALCTDigi::getBX
uint16_t getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
Definition: CSCALCTDigi.h:73
CSCALCTDigi::patternb_
uint16_t patternb_
Definition: CSCALCTDigi.h:126
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
CSCALCTDigi::Version::Legacy
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
h
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Definition: L1TUtmAlgorithmRcd.h:4
CSCALCTDigi::clear
void clear()
clear this ALCT
Definition: CSCALCTDigi.cc:50
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
CSCALCTDigi::Version::Run3
CSCALCTDigi::bx_
uint16_t bx_
Definition: CSCALCTDigi.h:128
CSCALCTDigi::trknmb_
uint16_t trknmb_
Definition: CSCALCTDigi.h:129
CSCALCTDigi::getKeyWG
uint16_t getKeyWG() const
return key wire group
Definition: CSCALCTDigi.h:67
CSCALCTDigi::valid_
uint16_t valid_
Definition: CSCALCTDigi.h:123
contentValuesFiles.number
number
Definition: contentValuesFiles.py:53
CSCALCTDigi::keywire_
uint16_t keywire_
Definition: CSCALCTDigi.h:127
CSCALCTDigi::getCollisionB
uint16_t getCollisionB() const
Definition: CSCALCTDigi.h:61
CSCALCTDigi::getQuality
uint16_t getQuality() const
return quality of a pattern
Definition: CSCALCTDigi.h:46
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
ALCT_PATTERN_WIDTH
Definition: CSCALCTDigi.cc:14
CSCALCTDigi::fullbx_
uint16_t fullbx_
Definition: CSCALCTDigi.h:130
NUM_LAYERS
Definition: CSCALCTDigi.cc:14
CSCALCTDigi::getFullBX
uint16_t getFullBX() const
return 12-bit full BX.
Definition: CSCALCTDigi.h:85
CSCALCTDigi::quality_
uint16_t quality_
Definition: CSCALCTDigi.h:124
CSCALCTDigi::hits_
WireContainer hits_
Definition: CSCALCTDigi.h:138
qcdUeDQM_cfi.quality
quality
Definition: qcdUeDQM_cfi.py:31
CSCALCTDigi::getAccelerator
uint16_t getAccelerator() const
Definition: CSCALCTDigi.h:53
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
CSCALCTDigi::accel_
uint16_t accel_
Definition: CSCALCTDigi.h:125
L1TStage2uGTEmulatorClient_cff.BX
BX
Definition: L1TStage2uGTEmulatorClient_cff.py:9
CSCALCTDigi::isValid
bool isValid() const
check ALCT validity (1 - valid ALCT)
Definition: CSCALCTDigi.h:40
CSCALCTDigi::getTrknmb
uint16_t getTrknmb() const
return track number (1,2)
Definition: CSCALCTDigi.h:79
RunInfoPI::valid
Definition: RunInfoPayloadInspectoHelper.h:16
CSCALCTDigi::isRun3
bool isRun3() const
Distinguish Run-1/2 from Run-3.
Definition: CSCALCTDigi.h:113
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45
CSCALCTDigi::hmt_
uint16_t hmt_
Definition: CSCALCTDigi.h:134
CSCALCTDigi::version_
Version version_
Definition: CSCALCTDigi.h:136