File indexing completed on 2024-04-06 12:04:12
0001 #ifndef DataFormats_ME0RecHit_H
0002 #define DataFormats_ME0RecHit_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #include "DataFormats/TrackingRecHit/interface/RecHit2DLocalPos.h"
0014 #include "DataFormats/MuonDetId/interface/ME0DetId.h"
0015
0016 class ME0RecHit : public RecHit2DLocalPos {
0017 public:
0018 ME0RecHit(const ME0DetId& me0Id, float tof);
0019
0020
0021 ME0RecHit();
0022
0023
0024 ME0RecHit(const ME0DetId& me0Id, float tof, const LocalPoint& pos);
0025
0026
0027
0028
0029
0030 ME0RecHit(const ME0DetId& me0Id, float tof, const LocalPoint& pos, const LocalError& err);
0031
0032
0033 ~ME0RecHit() override;
0034
0035
0036 LocalPoint localPosition() const override { return theLocalPosition; }
0037
0038
0039 LocalError localPositionError() const override { return theLocalError; }
0040
0041 ME0RecHit* clone() const override;
0042
0043
0044
0045 std::vector<const TrackingRecHit*> recHits() const override;
0046
0047
0048
0049 std::vector<TrackingRecHit*> recHits() override;
0050
0051
0052 void setPosition(LocalPoint pos) { theLocalPosition = pos; }
0053
0054
0055 void setError(LocalError err) { theLocalError = err; }
0056
0057
0058 void setPositionAndError(LocalPoint pos, LocalError err) {
0059 theLocalPosition = pos;
0060 theLocalError = err;
0061 }
0062
0063
0064 ME0DetId me0Id() const { return theME0Id; }
0065
0066 float tof() const { return theTOF; }
0067
0068
0069 bool operator==(const ME0RecHit& hit) const;
0070
0071 private:
0072 ME0DetId theME0Id;
0073 float theTOF;
0074
0075 LocalPoint theLocalPosition;
0076 LocalError theLocalError;
0077 };
0078 #endif
0079
0080
0081 std::ostream& operator<<(std::ostream& os, const ME0RecHit& hit);