File indexing completed on 2024-04-06 12:04:12
0001 #ifndef DataFormats_GEMDigi_GEMPadDigiCluster_h
0002 #define DataFormats_GEMDigi_GEMPadDigiCluster_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #include "DataFormats/MuonDetId/interface/GEMSubDetId.h"
0014
0015 #include <cstdint>
0016 #include <iosfwd>
0017 #include <vector>
0018
0019 class GEMPadDigiCluster {
0020 public:
0021 enum InValid { GE11InValid = 255, GE21InValid = 511 };
0022
0023
0024 enum NumberPartitions { ME0 = 8, GE11 = 8, GE21 = 8, GE21SplitStrip = 16 };
0025
0026 explicit GEMPadDigiCluster(std::vector<uint16_t> pads,
0027 int16_t bx,
0028 enum GEMSubDetId::Station station = GEMSubDetId::Station::GE11,
0029 unsigned nPart = NumberPartitions::GE11);
0030 GEMPadDigiCluster();
0031
0032 bool operator==(const GEMPadDigiCluster& digi) const;
0033 bool operator!=(const GEMPadDigiCluster& digi) const;
0034 bool operator<(const GEMPadDigiCluster& digi) const;
0035
0036
0037 bool isValid() const;
0038
0039 const std::vector<uint16_t>& pads() const { return v_; }
0040 int bx() const { return bx_; }
0041
0042 GEMSubDetId::Station station() const { return station_; }
0043
0044 unsigned nPartitions() const { return part_; }
0045 void print() const;
0046
0047 int alctMatchTime() const { return alctMatchTime_; }
0048 void setAlctMatchTime(int matchWin) { alctMatchTime_ = matchWin; }
0049
0050 private:
0051 std::vector<uint16_t> v_;
0052 int32_t bx_;
0053 int alctMatchTime_ = -1;
0054 GEMSubDetId::Station station_;
0055
0056 unsigned part_;
0057 };
0058
0059 std::ostream& operator<<(std::ostream& o, const GEMPadDigiCluster& digi);
0060
0061 #endif