CMS 3D CMS Logo

CSCComparatorDigi.h
Go to the documentation of this file.
1 #ifndef CSCComparatorDigi_CSCComparatorDigi_h
2 #define CSCComparatorDigi_CSCComparatorDigi_h
3 
12 #include <iosfwd>
13 #include <vector>
14 #include <cstdint>
15 
17 public:
19  CSCComparatorDigi(int strip, int comparator, int timeBinWord);
21 
24 
26  bool operator==(const CSCComparatorDigi& digi) const;
27 
29  bool operator<(const CSCComparatorDigi& digi) const;
30 
32  int getStrip() const { return strip_; }
33 
35  int getComparator() const { return comparator_; }
36 
38  int getTimeBinWord() const { return timeBinWord_; }
39 
41  int getTimeBin() const;
42 
44  int getHalfStrip() const;
45 
47  float getFractionalStrip() const;
48 
52  std::vector<int> getTimeBinsOn() const;
53 
55  void setStrip(int strip);
56 
58  void setComparator(int comparator);
59 
61  void print() const;
62 
63 private:
64  uint16_t strip_;
65  uint16_t comparator_;
66  uint16_t timeBinWord_;
67 };
68 
70 std::ostream& operator<<(std::ostream& o, const CSCComparatorDigi& digi);
71 
72 #endif
CSCComparatorDigi::setComparator
void setComparator(int comparator)
Set Comparator data.
Definition: CSCComparatorDigi.cc:90
CSCComparatorDigi::print
void print() const
Print content of digi.
Definition: CSCComparatorDigi.cc:94
CSCComparatorDigi::getFractionalStrip
float getFractionalStrip() const
Return the fractional half-strip. Counts from 0.25.
Definition: CSCComparatorDigi.cc:70
CSCComparatorDigi::operator==
bool operator==(const CSCComparatorDigi &digi) const
Digis are equal if they are on the same strip and have same Comparator data.
Definition: CSCComparatorDigi.cc:22
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
CSCComparatorDigi::setStrip
void setStrip(int strip)
Set the strip number.
Definition: CSCComparatorDigi.cc:89
CSCComparatorDigi::timeBinWord_
uint16_t timeBinWord_
Definition: CSCComparatorDigi.h:66
CSCComparatorDigi::getComparator
int getComparator() const
Get Comparator readings. Can be 0 or 1.
Definition: CSCComparatorDigi.h:35
CSCComparatorDigi::getTimeBin
int getTimeBin() const
Return bin number of first time bin which is ON. Counts from 0.
Definition: CSCComparatorDigi.cc:50
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:42
CSCComparatorDigi::CSCComparatorDigi
CSCComparatorDigi()
comparator here can be either 0 or 1 for left or right halfstrip of given strip
Definition: CSCComparatorDigi.cc:18
CSCComparatorDigi::comparator_
uint16_t comparator_
Definition: CSCComparatorDigi.h:65
CSCComparatorDigi
Definition: CSCComparatorDigi.h:16
CSCComparatorDigi::getTimeBinsOn
std::vector< int > getTimeBinsOn() const
Definition: CSCComparatorDigi.cc:72
operator<<
std::ostream & operator<<(std::ostream &o, const CSCComparatorDigi &digi)
Output operator.
Definition: CSCComparatorDigi.cc:102
CSCComparatorDigi::getTimeBinWord
int getTimeBinWord() const
Return the word with each bit corresponding to a time bin.
Definition: CSCComparatorDigi.h:38
CSCComparatorDigi::getHalfStrip
int getHalfStrip() const
Get the associated halfstrip number for this comparator digi. Counts from 0.
Definition: CSCComparatorDigi.cc:67
CSCComparatorDigi::operator<
bool operator<(const CSCComparatorDigi &digi) const
sort by time first, then by strip
Definition: CSCComparatorDigi.cc:40
CSCComparatorDigi::getStrip
int getStrip() const
Get the strip number. Counts from 1.
Definition: CSCComparatorDigi.h:32
CSCComparatorDigi::strip_
uint16_t strip_
Definition: CSCComparatorDigi.h:64