CMS 3D CMS Logo

CSCALCTDigi.h
Go to the documentation of this file.
1 #ifndef CSCDigi_CSCALCTDigi_h
2 #define CSCDigi_CSCALCTDigi_h
3 
12 #include <cstdint>
13 #include <iosfwd>
14 #include <limits>
15 #include <vector>
16 
17 class CSCALCTDigi {
18 public:
19  enum class Version { Legacy = 0, Run3 };
20 
21  typedef std::vector<std::vector<uint16_t>> WireContainer;
22 
24  CSCALCTDigi(const uint16_t valid,
25  const uint16_t quality,
26  const uint16_t accel,
27  const uint16_t patternb,
28  const uint16_t keywire,
29  const uint16_t bx,
30  const uint16_t trknmb = 0,
31  const uint16_t hmt = 0,
34  CSCALCTDigi();
35 
37  void clear();
38 
40  bool isValid() const { return valid_; }
41 
43  void setValid(const uint16_t valid) { valid_ = valid; }
44 
46  uint16_t getQuality() const { return quality_; }
47 
49  void setQuality(const uint16_t quality) { quality_ = quality; }
50 
53  uint16_t getAccelerator() const { return accel_; }
54 
56  void setAccelerator(const uint16_t accelerator) { accel_ = accelerator; }
57 
61  uint16_t getCollisionB() const { return patternb_; }
62 
64  void setCollisionB(const uint16_t collision) { patternb_ = collision; }
65 
67  uint16_t getKeyWG() const { return keywire_; }
68 
70  void setKeyWG(const uint16_t keyWG) { keywire_ = keyWG; }
71 
73  uint16_t getBX() const { return bx_; }
74 
76  void setBX(const uint16_t BX) { bx_ = BX; }
77 
79  uint16_t getTrknmb() const { return trknmb_; }
80 
82  void setTrknmb(const uint16_t number) { trknmb_ = number; }
83 
85  uint16_t getFullBX() const { return fullbx_; }
86 
88  void setFullBX(const uint16_t fullbx) { fullbx_ = fullbx; }
89 
91  uint16_t getHMT() const;
92 
94  void setHMT(const uint16_t hmt);
95 
98  bool operator>(const CSCALCTDigi&) const;
99 
101  bool operator==(const CSCALCTDigi&) const;
102 
104  bool operator!=(const CSCALCTDigi&) const;
105 
107  void print() const;
108 
110  void setWireGroup(uint16_t wiregroup) { keywire_ = wiregroup; }
111 
113  bool isRun3() const { return version_ == Version::Run3; }
114 
115  void setRun3(const bool isRun3);
116 
117  // wire hits in this ALCT
118  const WireContainer& getHits() const { return hits_; }
119 
120  void setHits(const WireContainer& hits) { hits_ = hits; }
121 
122 private:
123  uint16_t valid_;
124  uint16_t quality_;
125  uint16_t accel_;
126  uint16_t patternb_; // not used since 2007
127  uint16_t keywire_;
128  uint16_t bx_;
129  uint16_t trknmb_;
130  uint16_t fullbx_;
134  uint16_t hmt_;
135 
137  // which hits are in this ALCT?
139 };
140 
141 std::ostream& operator<<(std::ostream& o, const CSCALCTDigi& digi);
142 #endif
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
CSCALCTDigi::clear
void clear()
clear this ALCT
Definition: CSCALCTDigi.cc:50
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
CSCALCTDigi::Version::Run3
CSCALCTDigi::print
void print() const
Print content of digi.
Definition: CSCALCTDigi.cc:116
CSCALCTDigi::bx_
uint16_t bx_
Definition: CSCALCTDigi.h:128
CSCALCTDigi::setValid
void setValid(const uint16_t valid)
set valid
Definition: CSCALCTDigi.h:43
CSCALCTDigi::trknmb_
uint16_t trknmb_
Definition: CSCALCTDigi.h:129
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
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
operator<<
std::ostream & operator<<(std::ostream &o, const CSCALCTDigi &digi)
Definition: CSCALCTDigi.cc:129
CSCALCTDigi::keywire_
uint16_t keywire_
Definition: CSCALCTDigi.h:127
CSCALCTDigi::CSCALCTDigi
CSCALCTDigi()
default
Definition: CSCALCTDigi.cc:44
CSCALCTDigi::setHMT
void setHMT(const uint16_t hmt)
set the high multiplicity bits
Definition: CSCALCTDigi.cc:68
CSCALCTDigi::getCollisionB
uint16_t getCollisionB() const
Definition: CSCALCTDigi.h:61
CSCALCTDigi::setRun3
void setRun3(const bool isRun3)
Definition: CSCALCTDigi.cc:70
CSCALCTDigi::setBX
void setBX(const uint16_t BX)
set BX
Definition: CSCALCTDigi.h:76
CSCALCTDigi::getQuality
uint16_t getQuality() const
return quality of a pattern
Definition: CSCALCTDigi.h:46
CSCALCTDigi::operator!=
bool operator!=(const CSCALCTDigi &) const
True if the preceding one is false.
Definition: CSCALCTDigi.cc:107
CSCALCTDigi::operator>
bool operator>(const CSCALCTDigi &) const
Definition: CSCALCTDigi.cc:72
CSCALCTDigi::setAccelerator
void setAccelerator(const uint16_t accelerator)
set accelerator bit
Definition: CSCALCTDigi.h:56
CSCALCTDigi::setKeyWG
void setKeyWG(const uint16_t keyWG)
set key wire group
Definition: CSCALCTDigi.h:70
CSCALCTDigi::fullbx_
uint16_t fullbx_
Definition: CSCALCTDigi.h:130
CSCALCTDigi::setQuality
void setQuality(const uint16_t quality)
set quality
Definition: CSCALCTDigi.h:49
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
CSCALCTDigi::getHits
const WireContainer & getHits() const
Definition: CSCALCTDigi.h:118
CSCALCTDigi
Definition: CSCALCTDigi.h:17
CSCALCTDigi::WireContainer
std::vector< std::vector< uint16_t > > WireContainer
Definition: CSCALCTDigi.h:21
CSCALCTDigi::setFullBX
void setFullBX(const uint16_t fullbx)
Set 12-bit full BX.
Definition: CSCALCTDigi.h:88
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
CSCALCTDigi::operator==
bool operator==(const CSCALCTDigi &) const
True if all members (except the number) of both ALCTs are equal.
Definition: CSCALCTDigi.cc:96
CSCALCTDigi::setTrknmb
void setTrknmb(const uint16_t number)
Set track number (1,2) after sorting ALCTs.
Definition: CSCALCTDigi.h:82
Version
Definition: InitMessage.h:39
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45
CSCALCTDigi::setHits
void setHits(const WireContainer &hits)
Definition: CSCALCTDigi.h:120
CSCALCTDigi::setWireGroup
void setWireGroup(uint16_t wiregroup)
set wiregroup number
Definition: CSCALCTDigi.h:110
CSCALCTDigi::setCollisionB
void setCollisionB(const uint16_t collision)
set Collision Pattern B bit
Definition: CSCALCTDigi.h:64
CSCALCTDigi::hmt_
uint16_t hmt_
Definition: CSCALCTDigi.h:134
CSCALCTDigi::version_
Version version_
Definition: CSCALCTDigi.h:136