CMS 3D CMS Logo

RPCDigi.h
Go to the documentation of this file.
1 #ifndef RPCDigi_RPCDigi_h
2 #define RPCDigi_RPCDigi_h
3 
16 #include <cstdint>
17 #include <iosfwd>
18 
19 class RPCDigi{
20 
21 public:
22  explicit RPCDigi (int strip, int bx);
23  RPCDigi ();
24 
25  bool operator==(const RPCDigi& digi) const;
26  bool operator<(const RPCDigi& digi) const;
27  void print() const;
28  int strip() const { return strip_; }
29  int bx() const { return bx_; }
30  double time() const { return time_; }
31  double coordinateX() const { return coordinateX_; }
32  double coordinateY() const { return coordinateY_; }
33  bool hasTime() const { return hasTime_; }
34  bool hasX() const { return hasX_; }
35  bool hasY() const { return hasY_; }
36  void hasTime(bool has) { hasTime_ = has; }
37  void hasX(bool has) { hasX_ = has; }
38  void hasY(bool has) { hasY_ = has; }
39  double deltaTime() const { return deltaTime_; }
40  double deltaX() const { return deltaX_; }
41  double deltaY() const { return deltaY_; }
42  void setTime(double time) { time_ = time;}
43  void setDeltaTime(double dt) { deltaTime_ = dt; }
44  void setX(double x) { coordinateX_ = x; }
45  void setY(double y) { coordinateY_ = y; }
46  void setDeltaX(double dx) { deltaX_ = dx; }
47  void setDeltaY(double dy) { deltaY_ = dy; }
48  bool isPseudoDigi() const { return hasX_ || hasY_ ; }
49 
50 
51 
52 private:
53  uint16_t strip_;
54  int32_t bx_;
55  double time_;
56  double coordinateX_;
57  double coordinateY_;
58  double deltaTime_;
59  double deltaX_;
60  double deltaY_;
61  bool hasTime_;
62  bool hasX_;
63  bool hasY_;
64 };
65 
66 std::ostream & operator<<(std::ostream & o, const RPCDigi& digi);
67 
68 #endif
69 
float dt
Definition: AMPTWrapper.h:126
bool hasY_
Definition: RPCDigi.h:63
bool hasY() const
Definition: RPCDigi.h:35
double deltaY_
Definition: RPCDigi.h:60
uint16_t strip_
Definition: RPCDigi.h:53
bool hasX_
Definition: RPCDigi.h:62
double time_
Definition: RPCDigi.h:55
int bx() const
Definition: RPCDigi.h:29
RPCDigi()
Definition: RPCDigi.cc:30
void setY(double y)
Definition: RPCDigi.h:45
double time() const
Definition: RPCDigi.h:30
double deltaTime() const
Definition: RPCDigi.h:39
std::ostream & operator<<(std::ostream &o, const RPCDigi &digi)
Definition: RPCDigi.cc:60
double coordinateY() const
Definition: RPCDigi.h:32
double coordinateY_
Definition: RPCDigi.h:57
int strip() const
Definition: RPCDigi.h:28
bool hasX() const
Definition: RPCDigi.h:34
void hasY(bool has)
Definition: RPCDigi.h:38
double deltaX() const
Definition: RPCDigi.h:40
void hasTime(bool has)
Definition: RPCDigi.h:36
bool isPseudoDigi() const
Definition: RPCDigi.h:48
double coordinateX_
Definition: RPCDigi.h:56
double deltaY() const
Definition: RPCDigi.h:41
int32_t bx_
Definition: RPCDigi.h:54
void setDeltaX(double dx)
Definition: RPCDigi.h:46
void hasX(bool has)
Definition: RPCDigi.h:37
bool hasTime() const
Definition: RPCDigi.h:33
bool operator==(const RPCDigi &digi) const
Definition: RPCDigi.cc:46
double deltaX_
Definition: RPCDigi.h:59
void print() const
Definition: RPCDigi.cc:65
void setDeltaY(double dy)
Definition: RPCDigi.h:47
bool hasTime_
Definition: RPCDigi.h:61
double deltaTime_
Definition: RPCDigi.h:58
bool operator<(const RPCDigi &digi) const
Precedence operator.
Definition: RPCDigi.cc:53
void setTime(double time)
Definition: RPCDigi.h:42
double coordinateX() const
Definition: RPCDigi.h:31
void setX(double x)
Definition: RPCDigi.h:44
void setDeltaTime(double dt)
Definition: RPCDigi.h:43