File indexing completed on 2024-04-06 12:05:08
0001 #ifndef DataFormats_RPCRecHit_H
0002 #define DataFormats_RPCRecHit_H
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include "DataFormats/TrackingRecHit/interface/RecHit2DLocalPos.h"
0012 #include "DataFormats/MuonDetId/interface/RPCDetId.h"
0013
0014 class RPCRecHit : public RecHit2DLocalPos {
0015 public:
0016 RPCRecHit(const RPCDetId& rpcId, int bx);
0017
0018
0019 RPCRecHit();
0020
0021
0022
0023
0024
0025 RPCRecHit(const RPCDetId& rpcId, int bx, const LocalPoint& pos);
0026
0027
0028 RPCRecHit(const RPCDetId& rpcId, int bx, const LocalPoint& pos, const LocalError& err);
0029
0030
0031 RPCRecHit(const RPCDetId& rpcId, int bx, int firstStrip, int clustSize, const LocalPoint& pos, const LocalError& err);
0032
0033
0034 ~RPCRecHit() override;
0035
0036
0037 LocalPoint localPosition() const override { return theLocalPosition; }
0038
0039
0040 LocalError localPositionError() const override { return theLocalError; }
0041
0042 RPCRecHit* clone() const override;
0043
0044
0045
0046 std::vector<const TrackingRecHit*> recHits() const override;
0047
0048
0049
0050 std::vector<TrackingRecHit*> recHits() override;
0051
0052
0053 void setPosition(LocalPoint pos) { theLocalPosition = pos; }
0054
0055
0056 void setError(LocalError err) { theLocalError = err; }
0057
0058
0059 void setPositionAndError(LocalPoint pos, LocalError err) {
0060 theLocalPosition = pos;
0061 theLocalError = err;
0062 }
0063
0064
0065 void setTimeAndError(float time, float err) {
0066 theTime = time;
0067 theTimeError = err;
0068 }
0069
0070
0071 RPCDetId rpcId() const { return theRPCId; }
0072
0073 int BunchX() const { return theBx; }
0074
0075 int firstClusterStrip() const { return theFirstStrip; }
0076
0077 int clusterSize() const { return theClusterSize; }
0078
0079 float time() const { return theTime; }
0080
0081 float timeError() const { return theTimeError; }
0082
0083
0084 bool operator==(const RPCRecHit& hit) const;
0085
0086 private:
0087 RPCDetId theRPCId;
0088 int theBx;
0089 int theFirstStrip;
0090 int theClusterSize;
0091
0092 LocalPoint theLocalPosition;
0093 LocalError theLocalError;
0094 float theTime, theTimeError;
0095 };
0096 #endif
0097
0098
0099 std::ostream& operator<<(std::ostream& os, const RPCRecHit& hit);