CMS 3D CMS Logo

DTRecHit1D.h
Go to the documentation of this file.
1 #ifndef DTRecHit_DTRecHit1D_H
2 #define DTRecHit_DTRecHit1D_H
3 
15 //#include "DataFormats/GeometrySurface/interface/LocalError.h"
16 
18 
21 
22 
23 class DTLayer;
24 class GeomDet;
25 
26 class DTRecHit1D : public RecHit1D {
27  public:
28 
30  DTRecHit1D(const DTWireId& wireId,
32  float digiTime);
33 
35  DTRecHit1D();
36 
41  DTRecHit1D(const DTWireId& wireId,
43  float digiTime,
44  const LocalPoint& pos);
45 
46 
48  DTRecHit1D(const DTWireId& wireId,
50  float digiTime,
51  const LocalPoint& pos,
52  const LocalError& err);
53 
54 
56  ~DTRecHit1D() override;
57 
58 
60  LocalPoint localPosition() const override {
61  return theLocalPosition;
62  }
63 
64 
66  LocalError localPositionError() const override {
67  return theLocalError;
68  }
69 
70  DTRecHit1D* clone() const override;
71 
72 
74  std::vector<const TrackingRecHit*> recHits() const override;
75 
76 
78  std::vector<TrackingRecHit*> recHits() override;
79 
80 
83  return theLRSide;
84  }
85 
86 
88  void setPosition(LocalPoint pos) {
89  theLocalPosition = pos;
90  }
91 
92 
94  void setError(LocalError err) {
95  theLocalError = err;
96  }
97 
98 
101  theLocalPosition = pos;
102  theLocalError = err;
103  }
104 
105 
107  DTWireId wireId() const {
108  return theWireId;
109  }
110 
111 
113  float digiTime() const {
114  return theDigiTime;
115  }
116 
117 
119  bool operator==(const DTRecHit1D& hit) const;
120 
121  private:
122  // The wire id
124 
125  // Left/Right side code
127 
128  // The digi time used to reconstruct the hit
129  float theDigiTime;
130 
131  // Position and error in the Local Ref. Frame of the DTLayer
134 
135 
136 };
137 #endif
138 
139 
141 std::ostream& operator<<(std::ostream& os, const DTRecHit1D& hit);
142 
143 
LocalPoint localPosition() const override
Return the 3-dimensional local position.
Definition: DTRecHit1D.h:60
void setPosition(LocalPoint pos)
Set local position.
Definition: DTRecHit1D.h:88
LocalError localPositionError() const override
Return the 3-dimensional error on the local position.
Definition: DTRecHit1D.h:66
DTCellSide
Which side of the DT cell.
Definition: DTEnums.h:15
DTRecHit1D * clone() const override
Definition: DTRecHit1D.cc:74
void setError(LocalError err)
Set local position error.
Definition: DTRecHit1D.h:94
LocalError theLocalError
Definition: DTRecHit1D.h:133
float theDigiTime
Definition: DTRecHit1D.h:129
DTRecHit1D()
Default constructor.
Definition: DTRecHit1D.cc:27
std::vector< const TrackingRecHit * > recHits() const override
No components rechits: it returns a null vector.
Definition: DTRecHit1D.cc:81
DTEnums::DTCellSide theLRSide
Definition: DTRecHit1D.h:126
float digiTime() const
Return the time (ns) of the digi used to build the rechit.
Definition: DTRecHit1D.h:113
std::ostream & operator<<(std::ostream &os, const DTRecHit1D &hit)
The ostream operator.
DTWireId theWireId
Definition: DTRecHit1D.h:123
LocalPoint theLocalPosition
Definition: DTRecHit1D.h:132
void setPositionAndError(LocalPoint pos, LocalError err)
Set the local position and its error.
Definition: DTRecHit1D.h:100
bool operator==(const DTRecHit1D &hit) const
Comparison operator, based on the wireId and the digi time.
Definition: DTRecHit1D.cc:97
~DTRecHit1D() override
Destructor.
Definition: DTRecHit1D.cc:70
DTEnums::DTCellSide lrSide() const
The side of the cell.
Definition: DTRecHit1D.h:82
DTWireId wireId() const
Return the wireId.
Definition: DTRecHit1D.h:107