CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GEMPadDigi.h
Go to the documentation of this file.
1 #ifndef DataFormats_GEMDigi_GEMPadDigi_h
2 #define DataFormats_GEMDigi_GEMPadDigi_h
3 
13 
14 #include <cstdint>
15 #include <iosfwd>
16 
17 class GEMPadDigi {
18 public:
19  enum InValid { ME0InValid = 255, GE11InValid = 255, GE21InValid = 511 };
20  // Newer GE2/1 geometries will have 16 eta partitions
21  // instead of the usual 8.
22  enum NumberPartitions { ME0 = 8, GE11 = 8, GE21 = 8, GE21SplitStrip = 16 };
23 
24  explicit GEMPadDigi(uint16_t pad,
25  int16_t bx,
27  unsigned nPart = NumberPartitions::GE11);
28  GEMPadDigi();
29 
30  bool operator==(const GEMPadDigi& digi) const;
31  bool operator!=(const GEMPadDigi& digi) const;
32  bool operator<(const GEMPadDigi& digi) const;
33  // only depends on the "InValid" enum so it also
34  // works on unpacked data
35  bool isValid() const;
36 
37  // return the pad number. counts from 0.
38  uint16_t pad() const { return pad_; }
39  int16_t bx() const { return bx_; }
41 
42  unsigned nPartitions() const { return part_; }
43  void print() const;
44 
45 private:
46  uint16_t pad_;
47  int16_t bx_;
49  // number of eta partitions
50  unsigned part_;
51 };
52 
53 std::ostream& operator<<(std::ostream& o, const GEMPadDigi& digi);
54 
55 #endif
bool isValid() const
Definition: GEMPadDigi.cc:26
bool operator==(const GEMPadDigi &digi) const
Definition: GEMPadDigi.cc:11
unsigned part_
Definition: GEMPadDigi.h:50
uint16_t pad() const
Definition: GEMPadDigi.h:38
bool operator!=(const GEMPadDigi &digi) const
Definition: GEMPadDigi.cc:16
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
unsigned nPartitions() const
Definition: GEMPadDigi.h:42
uint16_t pad_
Definition: GEMPadDigi.h:46
GEMSubDetId::Station station_
Definition: GEMPadDigi.h:48
void print() const
Definition: GEMPadDigi.cc:40
TString nPart(Int_t part, TString string, TString delimit=";", Bool_t removerest=true)
bool operator<(const GEMPadDigi &digi) const
Precedence operator.
Definition: GEMPadDigi.cc:19
GEMSubDetId::Station station() const
Definition: GEMPadDigi.h:40
int16_t bx() const
Definition: GEMPadDigi.h:39
int16_t bx_
Definition: GEMPadDigi.h:47