File indexing completed on 2024-04-06 12:03:59
0001 #ifndef DataFormats_CSCDigi_CSCShowerDigi_h
0002 #define DataFormats_CSCDigi_CSCShowerDigi_h
0003
0004 #include <cstdint>
0005 #include <iosfwd>
0006 #include <limits>
0007 #include <vector>
0008
0009 class CSCShowerDigi {
0010 public:
0011
0012 enum Run3Shower { kInvalid = 0, kLoose = 1, kNominal = 2, kTight = 3 };
0013
0014 enum ShowerType {
0015 kInvalidShower = 0,
0016 kALCTShower = 1,
0017 kCLCTShower = 2,
0018 kLCTShower = 3,
0019 kEMTFShower = 4,
0020 kGMTShower = 5
0021 };
0022
0023
0024 CSCShowerDigi(const uint16_t inTimeBits,
0025 const uint16_t outTimeBits,
0026 const uint16_t cscID,
0027 const uint16_t bx = 0,
0028 const uint16_t showerType = 4,
0029 const uint16_t wireNHits = 0,
0030 const uint16_t compNHits = 0);
0031
0032 CSCShowerDigi();
0033
0034
0035 void clear();
0036
0037
0038 bool isValid() const;
0039
0040 bool isLooseInTime() const;
0041 bool isNominalInTime() const;
0042 bool isTightInTime() const;
0043 bool isLooseOutOfTime() const;
0044 bool isNominalOutOfTime() const;
0045 bool isTightOutOfTime() const;
0046 bool isValidShowerType() const;
0047
0048 uint16_t bitsInTime() const { return bitsInTime_; }
0049 uint16_t bitsOutOfTime() const { return bitsOutOfTime_; }
0050
0051 uint16_t getBX() const { return bx_; }
0052 uint16_t getCSCID() const { return cscID_; }
0053 uint16_t getShowerType() const { return showerType_; }
0054 uint16_t getWireNHits() const { return wireNHits_; }
0055 uint16_t getComparatorNHits() const { return comparatorNHits_; }
0056
0057
0058 void setCSCID(const uint16_t c) { cscID_ = c; }
0059 void setBX(const uint16_t bx) { bx_ = bx; }
0060
0061 private:
0062 uint16_t bitsInTime_;
0063 uint16_t bitsOutOfTime_;
0064
0065 uint16_t cscID_;
0066 uint16_t bx_;
0067 uint16_t showerType_;
0068 uint16_t wireNHits_;
0069 uint16_t comparatorNHits_;
0070 };
0071
0072 std::ostream& operator<<(std::ostream& o, const CSCShowerDigi& digi);
0073 #endif