CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  virtual ~DTRecHit1D();
57 
58 
60  virtual LocalPoint localPosition() const {
61  return theLocalPosition;
62  }
63 
64 
66  virtual LocalError localPositionError() const {
67  return theLocalError;
68  }
69 
70  virtual DTRecHit1D* clone() const;
71 
72 
74  virtual std::vector<const TrackingRecHit*> recHits() const;
75 
76 
78  virtual std::vector<TrackingRecHit*> recHits();
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 
void setPosition(LocalPoint pos)
Set local position.
Definition: DTRecHit1D.h:88
DTCellSide
Which side of the DT cell.
Definition: DTEnums.h:15
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
void setError(LocalError err)
Set local position error.
Definition: DTRecHit1D.h:94
LocalError theLocalError
Definition: DTRecHit1D.h:133
virtual DTRecHit1D * clone() const
Definition: DTRecHit1D.cc:74
float theDigiTime
Definition: DTRecHit1D.h:129
virtual ~DTRecHit1D()
Destructor.
Definition: DTRecHit1D.cc:70
DTRecHit1D()
Default constructor.
Definition: DTRecHit1D.cc:27
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
virtual LocalError localPositionError() const
Return the 3-dimensional error on the local position.
Definition: DTRecHit1D.h:66
virtual LocalPoint localPosition() const
Return the 3-dimensional local position.
Definition: DTRecHit1D.h:60
DTWireId theWireId
Definition: DTRecHit1D.h:123
LocalPoint theLocalPosition
Definition: DTRecHit1D.h:132
virtual std::vector< const TrackingRecHit * > recHits() const
No components rechits: it returns a null vector.
Definition: DTRecHit1D.cc:81
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
DTEnums::DTCellSide lrSide() const
The side of the cell.
Definition: DTRecHit1D.h:82
DTWireId wireId() const
Return the wireId.
Definition: DTRecHit1D.h:107