File indexing completed on 2024-04-06 12:05:08
0001 #ifndef RPCDigi_RPCDigi_h
0002 #define RPCDigi_RPCDigi_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include <cstdint>
0017 #include <iosfwd>
0018
0019 class RPCDigi {
0020 public:
0021 explicit RPCDigi(int strip, int bx);
0022 RPCDigi();
0023
0024 bool operator==(const RPCDigi& digi) const;
0025 bool operator<(const RPCDigi& digi) const;
0026 void print() const;
0027 int strip() const { return strip_; }
0028 int bx() const { return bx_; }
0029 double time() const { return time_; }
0030 double coordinateX() const { return coordinateX_; }
0031 double coordinateY() const { return coordinateY_; }
0032 bool hasTime() const { return hasTime_; }
0033 bool hasX() const { return hasX_; }
0034 bool hasY() const { return hasY_; }
0035 void hasTime(bool has) { hasTime_ = has; }
0036 void hasX(bool has) { hasX_ = has; }
0037 void hasY(bool has) { hasY_ = has; }
0038 double deltaTime() const { return deltaTime_; }
0039 double deltaX() const { return deltaX_; }
0040 double deltaY() const { return deltaY_; }
0041 void setTime(double time) { time_ = time; }
0042 void setDeltaTime(double dt) { deltaTime_ = dt; }
0043 void setX(double x) { coordinateX_ = x; }
0044 void setY(double y) { coordinateY_ = y; }
0045 void setDeltaX(double dx) { deltaX_ = dx; }
0046 void setDeltaY(double dy) { deltaY_ = dy; }
0047 bool isPseudoDigi() const { return hasX_ || hasY_; }
0048
0049 private:
0050 uint16_t strip_;
0051 int32_t bx_;
0052 double time_;
0053 double coordinateX_;
0054 double coordinateY_;
0055 double deltaTime_;
0056 double deltaX_;
0057 double deltaY_;
0058 bool hasTime_;
0059 bool hasX_;
0060 bool hasY_;
0061 };
0062
0063 std::ostream& operator<<(std::ostream& o, const RPCDigi& digi);
0064
0065 #endif