File indexing completed on 2024-04-06 12:04:12
0001 #ifndef DataFormats_GEMRecHit_H
0002 #define DataFormats_GEMRecHit_H
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include "DataFormats/TrackingRecHit/interface/RecHit2DLocalPos.h"
0012 #include "DataFormats/MuonDetId/interface/GEMDetId.h"
0013
0014 class GEMRecHit : public RecHit2DLocalPos {
0015 public:
0016 GEMRecHit(const GEMDetId& gemId, int bx);
0017
0018
0019 GEMRecHit();
0020
0021
0022
0023
0024
0025 GEMRecHit(const GEMDetId& gemId, int bx, const LocalPoint& pos);
0026
0027
0028 GEMRecHit(const GEMDetId& gemId, int bx, const LocalPoint& pos, const LocalError& err);
0029
0030
0031 GEMRecHit(const GEMDetId& gemId, int bx, int firstStrip, int clustSize, const LocalPoint& pos, const LocalError& err);
0032
0033
0034 ~GEMRecHit() override;
0035
0036
0037 LocalPoint localPosition() const override { return theLocalPosition; }
0038
0039
0040 LocalError localPositionError() const override { return theLocalError; }
0041
0042 GEMRecHit* 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 GEMDetId gemId() const { return theGEMId; }
0066
0067 int BunchX() const { return theBx; }
0068
0069 int firstClusterStrip() const { return theFirstStrip; }
0070
0071 int clusterSize() const { return theClusterSize; }
0072
0073
0074 bool operator==(const GEMRecHit& hit) const;
0075
0076 private:
0077 GEMDetId theGEMId;
0078 int theBx;
0079 int theFirstStrip;
0080 int theClusterSize;
0081
0082 LocalPoint theLocalPosition;
0083 LocalError theLocalError;
0084 };
0085 #endif
0086
0087
0088 std::ostream& operator<<(std::ostream& os, const GEMRecHit& hit);