CMS 3D CMS Logo

GEMPadDigiCluster.h
Go to the documentation of this file.
1 #ifndef DataFormats_GEMDigi_GEMPadDigiCluster_h
2 #define DataFormats_GEMDigi_GEMPadDigiCluster_h
3 
14 
15 #include <cstdint>
16 #include <iosfwd>
17 #include <vector>
18 
20 public:
21  enum InValid { GE11InValid = 255, GE21InValid = 511 };
22  // Newer GE2/1 geometries will have 16 eta partitions
23  // instead of the usual 8.
24  enum NumberPartitions { ME0 = 8, GE11 = 8, GE21 = 8, GE21SplitStrip = 16 };
25 
26  explicit GEMPadDigiCluster(std::vector<uint16_t> pads,
27  int16_t bx,
29  unsigned nPart = NumberPartitions::GE11);
31 
32  bool operator==(const GEMPadDigiCluster& digi) const;
33  bool operator!=(const GEMPadDigiCluster& digi) const;
34  bool operator<(const GEMPadDigiCluster& digi) const;
35  // only depends on the "InValid" enum so it also
36  // works on unpacked data
37  bool isValid() const;
38 
39  const std::vector<uint16_t>& pads() const { return v_; }
40  int bx() const { return bx_; }
41 
43 
44  unsigned nPartitions() const { return part_; }
45  void print() const;
46 
47  int alctMatchTime() const { return alctMatchTime_; }
48  void setAlctMatchTime(int matchWin) { alctMatchTime_ = matchWin; }
49 
50 private:
51  std::vector<uint16_t> v_;
52  int32_t bx_;
53  int alctMatchTime_ = -1;
55  // number of eta partitions
56  unsigned part_;
57 };
58 
59 std::ostream& operator<<(std::ostream& o, const GEMPadDigiCluster& digi);
60 
61 #endif
const std::vector< uint16_t > & pads() const
bool operator==(const GEMPadDigiCluster &digi) const
std::ostream & operator<<(std::ostream &o, const GEMPadDigiCluster &digi)
void setAlctMatchTime(int matchWin)
unsigned nPartitions() const
std::vector< uint16_t > v_
TString nPart(Int_t part, TString string, TString delimit=";", Bool_t removerest=true)
GEMSubDetId::Station station_
bool operator<(const GEMPadDigiCluster &digi) const
Precedence operator.
GEMSubDetId::Station station() const
int alctMatchTime() const
bool operator!=(const GEMPadDigiCluster &digi) const