CMS 3D CMS Logo

RPCRecHit.h
Go to the documentation of this file.
1 #ifndef DataFormats_RPCRecHit_H
2 #define DataFormats_RPCRecHit_H
3 
13 
14 
15 class RPCRecHit : public RecHit2DLocalPos {
16  public:
17 
18  RPCRecHit(const RPCDetId& rpcId,
19  int bx);
20 
22  RPCRecHit();
23 
28  RPCRecHit(const RPCDetId& rpcId,
29  int bx,
30  const LocalPoint& pos);
31 
32 
34  RPCRecHit(const RPCDetId& rpcId,
35  int bx,
36  const LocalPoint& pos,
37  const LocalError& err);
38 
39 
41  RPCRecHit(const RPCDetId& rpcId,
42  int bx,
43  int firstStrip,
44  int clustSize,
45  const LocalPoint& pos,
46  const LocalError& err);
47 
49  ~RPCRecHit() override;
50 
51 
53  LocalPoint localPosition() const override {
54  return theLocalPosition;
55  }
56 
57 
59  LocalError localPositionError() const override {
60  return theLocalError;
61  }
62 
63 
64  RPCRecHit* clone() const override;
65 
66 
69  std::vector<const TrackingRecHit*> recHits() const override;
70 
71 
74  std::vector<TrackingRecHit*> recHits() override;
75 
76 
78  void setPosition(LocalPoint pos) {
79  theLocalPosition = pos;
80  }
81 
82 
84  void setError(LocalError err) {
85  theLocalError = err;
86  }
87 
88 
91  theLocalPosition = pos;
92  theLocalError = err;
93  }
94 
96  void setTimeAndError(float time, float err ) {
97  theTime = time;
98  theTimeError = err;
99  }
100 
101 
103  RPCDetId rpcId() const {
104  return theRPCId;
105  }
106 
107  int BunchX() const {
108  return theBx;
109  }
110 
111  int firstClusterStrip() const {
112  return theFirstStrip;
113  }
114 
115  int clusterSize() const {
116  return theClusterSize;
117  }
118 
119  float time() const {
120  return theTime;
121  }
122 
123  float timeError() const {
124  return theTimeError;
125  }
126 
128  bool operator==(const RPCRecHit& hit) const;
129 
130  private:
132  int theBx;
135  // Position and error in the Local Ref. Frame of the RPCLayer
139 
140 };
141 #endif
142 
144 std::ostream& operator<<(std::ostream& os, const RPCRecHit& hit);
RPCRecHit * clone() const override
Definition: RPCRecHit.cc:69
int firstClusterStrip() const
Definition: RPCRecHit.h:111
int theFirstStrip
Definition: RPCRecHit.h:133
bool operator==(const RPCRecHit &hit) const
Comparison operator, based on the rpcId and the digi time.
Definition: RPCRecHit.cc:92
float time() const
Definition: RPCRecHit.h:119
LocalPoint theLocalPosition
Definition: RPCRecHit.h:136
LocalError localPositionError() const override
Return the 3-dimensional error on the local position.
Definition: RPCRecHit.h:59
RPCDetId theRPCId
Definition: RPCRecHit.h:131
std::vector< const TrackingRecHit * > recHits() const override
Definition: RPCRecHit.cc:76
LocalPoint localPosition() const override
Return the 3-dimensional local position.
Definition: RPCRecHit.h:53
int clusterSize() const
Definition: RPCRecHit.h:115
void setPosition(LocalPoint pos)
Set local position.
Definition: RPCRecHit.h:78
RPCDetId rpcId() const
Return the rpcId.
Definition: RPCRecHit.h:103
~RPCRecHit() override
Destructor.
Definition: RPCRecHit.cc:63
int theClusterSize
Definition: RPCRecHit.h:134
std::ostream & operator<<(std::ostream &os, const RPCRecHit &hit)
The ostream operator.
Definition: RPCRecHit.cc:98
LocalError theLocalError
Definition: RPCRecHit.h:137
void setTimeAndError(float time, float err)
Set the time and its error.
Definition: RPCRecHit.h:96
RPCRecHit()
Default constructor.
Definition: RPCRecHit.cc:17
float theTime
Definition: RPCRecHit.h:138
float theTimeError
Definition: RPCRecHit.h:138
int theBx
Definition: RPCRecHit.h:132
void setError(LocalError err)
Set local position error.
Definition: RPCRecHit.h:84
int BunchX() const
Definition: RPCRecHit.h:107
GloballyPositioned< float >::LocalPoint LocalPoint
float timeError() const
Definition: RPCRecHit.h:123
void setPositionAndError(LocalPoint pos, LocalError err)
Set the local position and its error.
Definition: RPCRecHit.h:90