File indexing completed on 2024-04-06 12:04:02
0001 #ifndef DTRecHit_DTRecHit1D_H
0002 #define DTRecHit_DTRecHit1D_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #include "DataFormats/TrackingRecHit/interface/RecHit1D.h"
0018
0019 #include "DataFormats/DTRecHit/interface/DTEnums.h"
0020 #include "DataFormats/MuonDetId/interface/DTWireId.h"
0021
0022 class DTLayer;
0023 class GeomDet;
0024
0025 class DTRecHit1D : public RecHit1D {
0026 public:
0027
0028 DTRecHit1D(const DTWireId& wireId, DTEnums::DTCellSide lr, float digiTime);
0029
0030
0031 DTRecHit1D();
0032
0033
0034
0035
0036
0037 DTRecHit1D(const DTWireId& wireId, DTEnums::DTCellSide lr, float digiTime, const LocalPoint& pos);
0038
0039
0040 DTRecHit1D(
0041 const DTWireId& wireId, DTEnums::DTCellSide lr, float digiTime, const LocalPoint& pos, const LocalError& err);
0042
0043
0044 ~DTRecHit1D() override;
0045
0046
0047 LocalPoint localPosition() const override { return theLocalPosition; }
0048
0049
0050 LocalError localPositionError() const override { return theLocalError; }
0051
0052 DTRecHit1D* clone() const override;
0053
0054
0055 std::vector<const TrackingRecHit*> recHits() const override;
0056
0057
0058 std::vector<TrackingRecHit*> recHits() override;
0059
0060
0061 DTEnums::DTCellSide lrSide() const { return theLRSide; }
0062
0063
0064 void setPosition(LocalPoint pos) { theLocalPosition = pos; }
0065
0066
0067 void setError(LocalError err) { theLocalError = err; }
0068
0069
0070 void setPositionAndError(LocalPoint pos, LocalError err) {
0071 theLocalPosition = pos;
0072 theLocalError = err;
0073 }
0074
0075
0076 DTWireId wireId() const { return theWireId; }
0077
0078
0079 float digiTime() const { return theDigiTime; }
0080
0081
0082 bool operator==(const DTRecHit1D& hit) const;
0083
0084 private:
0085
0086 DTWireId theWireId;
0087
0088
0089 DTEnums::DTCellSide theLRSide;
0090
0091
0092 float theDigiTime;
0093
0094
0095 LocalPoint theLocalPosition;
0096 LocalError theLocalError;
0097 };
0098 #endif
0099
0100
0101 std::ostream& operator<<(std::ostream& os, const DTRecHit1D& hit);