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 class DTLayer;
23 class GeomDet;
24 
25 class DTRecHit1D : public RecHit1D {
26 public:
29 
31  DTRecHit1D();
32 
38 
40  DTRecHit1D(
41  const DTWireId& wireId, DTEnums::DTCellSide lr, float digiTime, const LocalPoint& pos, const LocalError& err);
42 
44  ~DTRecHit1D() override;
45 
47  LocalPoint localPosition() const override { return theLocalPosition; }
48 
50  LocalError localPositionError() const override { return theLocalError; }
51 
52  DTRecHit1D* clone() const override;
53 
55  std::vector<const TrackingRecHit*> recHits() const override;
56 
58  std::vector<TrackingRecHit*> recHits() override;
59 
61  DTEnums::DTCellSide lrSide() const { return theLRSide; }
62 
65 
68 
73  }
74 
76  DTWireId wireId() const { return theWireId; }
77 
79  float digiTime() const { return theDigiTime; }
80 
82  bool operator==(const DTRecHit1D& hit) const;
83 
84 private:
85  // The wire id
87 
88  // Left/Right side code
90 
91  // The digi time used to reconstruct the hit
92  float theDigiTime;
93 
94  // Position and error in the Local Ref. Frame of the DTLayer
97 };
98 #endif
99 
101 std::ostream& operator<<(std::ostream& os, const DTRecHit1D& hit);
void setPosition(LocalPoint pos)
Set local position.
Definition: DTRecHit1D.h:64
DTCellSide
Which side of the DT cell.
Definition: DTEnums.h:15
void setError(LocalError err)
Set local position error.
Definition: DTRecHit1D.h:67
LocalError theLocalError
Definition: DTRecHit1D.h:96
float digiTime() const
Return the time (ns) of the digi used to build the rechit.
Definition: DTRecHit1D.h:79
float theDigiTime
Definition: DTRecHit1D.h:92
DTRecHit1D * clone() const override
Definition: DTRecHit1D.cc:55
std::vector< const TrackingRecHit * > recHits() const override
No components rechits: it returns a null vector.
Definition: DTRecHit1D.cc:59
DTRecHit1D()
Default constructor.
Definition: DTRecHit1D.cc:23
DTEnums::DTCellSide lrSide() const
The side of the cell.
Definition: DTRecHit1D.h:61
DTEnums::DTCellSide theLRSide
Definition: DTRecHit1D.h:89
std::ostream & operator<<(std::ostream &os, const DTRecHit1D &hit)
The ostream operator.
DTWireId theWireId
Definition: DTRecHit1D.h:86
LocalPoint theLocalPosition
Definition: DTRecHit1D.h:95
LocalError localPositionError() const override
Return the 3-dimensional error on the local position.
Definition: DTRecHit1D.h:50
DTWireId wireId() const
Return the wireId.
Definition: DTRecHit1D.h:76
bool operator==(const DTRecHit1D &hit) const
Comparison operator, based on the wireId and the digi time.
Definition: DTRecHit1D.cc:72
void setPositionAndError(LocalPoint pos, LocalError err)
Set the local position and its error.
Definition: DTRecHit1D.h:70
~DTRecHit1D() override
Destructor.
Definition: DTRecHit1D.cc:53
LocalPoint localPosition() const override
Return the 3-dimensional local position.
Definition: DTRecHit1D.h:47