CMS 3D CMS Logo

CSCShowerDigi.h
Go to the documentation of this file.
1 #ifndef DataFormats_CSCDigi_CSCShowerDigi_h
2 #define DataFormats_CSCDigi_CSCShowerDigi_h
3 
4 #include <cstdint>
5 #include <iosfwd>
6 #include <limits>
7 #include <vector>
8 
9 class CSCShowerDigi {
10 public:
11  // Run-3 definitions as provided in DN-20-033
12  enum Run3Shower { kInvalid = 0, kLoose = 1, kNominal = 2, kTight = 3 };
13  // Shower types. and showers from OTMB/TMB are assigned with kLCTShower
14  enum ShowerType {
21  };
22 
24  CSCShowerDigi(const uint16_t inTimeBits,
25  const uint16_t outTimeBits,
26  const uint16_t cscID,
27  const uint16_t bx = 0,
28  const uint16_t showerType = 4,
29  const uint16_t wireNHits = 0,
30  const uint16_t compNHits = 0);
32  CSCShowerDigi();
33 
35  void clear();
36 
38  bool isValid() const;
39 
40  bool isLooseInTime() const;
41  bool isNominalInTime() const;
42  bool isTightInTime() const;
43  bool isLooseOutOfTime() const;
44  bool isNominalOutOfTime() const;
45  bool isTightOutOfTime() const;
46  bool isValidShowerType() const;
47 
48  uint16_t bitsInTime() const { return bitsInTime_; }
49  uint16_t bitsOutOfTime() const { return bitsOutOfTime_; }
50 
51  uint16_t getBX() const { return bx_; }
52  uint16_t getCSCID() const { return cscID_; }
53  uint16_t getShowerType() const { return showerType_; }
54  uint16_t getWireNHits() const { return wireNHits_; }
55  uint16_t getComparatorNHits() const { return comparatorNHits_; }
56 
58  void setCSCID(const uint16_t c) { cscID_ = c; }
59  void setBX(const uint16_t bx) { bx_ = bx; }
60 
61 private:
62  uint16_t bitsInTime_;
63  uint16_t bitsOutOfTime_;
64  // 4-bit CSC chamber identifier
65  uint16_t cscID_;
66  uint16_t bx_;
67  uint16_t showerType_;
68  uint16_t wireNHits_;
69  uint16_t comparatorNHits_;
70 };
71 
72 std::ostream& operator<<(std::ostream& o, const CSCShowerDigi& digi);
73 #endif
bool isLooseOutOfTime() const
uint16_t wireNHits_
Definition: CSCShowerDigi.h:68
uint16_t comparatorNHits_
Definition: CSCShowerDigi.h:69
bool isValid() const
data
uint16_t getComparatorNHits() const
Definition: CSCShowerDigi.h:55
uint16_t bitsOutOfTime_
Definition: CSCShowerDigi.h:63
uint16_t showerType_
Definition: CSCShowerDigi.h:67
void setBX(const uint16_t bx)
Definition: CSCShowerDigi.h:59
uint16_t bitsOutOfTime() const
Definition: CSCShowerDigi.h:49
bool isValidShowerType() const
void setCSCID(const uint16_t c)
set cscID
Definition: CSCShowerDigi.h:58
bool isLooseInTime() const
uint16_t bx_
Definition: CSCShowerDigi.h:66
std::ostream & operator<<(std::ostream &o, const CSCShowerDigi &digi)
bool isTightInTime() const
uint16_t getBX() const
Definition: CSCShowerDigi.h:51
uint16_t getShowerType() const
Definition: CSCShowerDigi.h:53
bool isNominalInTime() const
bool isTightOutOfTime() const
uint16_t cscID_
Definition: CSCShowerDigi.h:65
uint16_t getCSCID() const
Definition: CSCShowerDigi.h:52
uint16_t bitsInTime() const
Definition: CSCShowerDigi.h:48
bool isNominalOutOfTime() const
uint16_t getWireNHits() const
Definition: CSCShowerDigi.h:54
uint16_t bitsInTime_
Definition: CSCShowerDigi.h:62
void clear()
clear this Shower
CSCShowerDigi()
default