CMS 3D CMS Logo

DTRecHit1DPair.h
Go to the documentation of this file.
1 #ifndef DTRecHit_DTRecHit1DPair_H
2 #define DTRecHit_DTRecHit1DPair_H
3 
20 
21 #include <utility>
22 
23 class DTLayer;
24 class DTDigi;
25 
26 class DTRecHit1DPair : public RecHit1D {
27 public:
29  DTRecHit1DPair(const DTWireId& wireId, const DTDigi& digi);
30 
33 
35  ~DTRecHit1DPair() override;
36 
37  // Operations
38 
39  DTRecHit1DPair* clone() const override;
40 
44  LocalPoint localPosition() const override;
45 
49  LocalError localPositionError() const override;
50 
53  std::vector<const TrackingRecHit*> recHits() const override;
54 
57  std::vector<TrackingRecHit*> recHits() override;
58 
60  virtual DetId geographicalId() const;
61 
63  float digiTime() const { return theLeftHit.digiTime(); }
64 
66  bool operator==(const DTRecHit1DPair& hit) const;
67 
70  bool operator!=(const DTRecHit1DPair& hit) const { return !(*this == hit); }
71 
75 
79 
82  void setPosition(DTEnums::DTCellSide lrside, const LocalPoint& point);
83 
87 
88  // Return the wireId
89  DTWireId wireId() const { return theLeftHit.wireId(); }
90 
92  const DTRecHit1D* componentRecHit(DTEnums::DTCellSide lrSide) const;
93 
95  std::pair<const DTRecHit1D*, const DTRecHit1D*> componentRecHits() const;
96 
97 private:
100 
101  // The two rechits
104 };
105 
107 std::ostream& operator<<(std::ostream& os, const DTRecHit1DPair& hit);
108 
109 #endif
DTCellSide
Which side of the DT cell.
Definition: DTEnums.h:15
LocalPoint localPosition() const override
std::vector< const TrackingRecHit * > recHits() const override
float digiTime() const
Return the time (ns) of the digi used to build the rechit.
Definition: DTRecHit1D.h:79
virtual DetId geographicalId() const
Return the detId of the Det (a DTLayer).
DTRecHit1D theLeftHit
void setPositionAndError(DTEnums::DTCellSide lrside, const LocalPoint &point, const LocalError &err)
std::ostream & operator<<(std::ostream &os, const DTRecHit1DPair &hit)
Ostream operator.
bool operator!=(const DTRecHit1DPair &hit) const
DTRecHit1DPair * clone() const override
Definition: DTDigi.h:17
std::pair< const DTRecHit1D *, const DTRecHit1D * > componentRecHits() const
Get the left and right 1D rechits (first and second respectively).
DTRecHit1D theRightHit
Definition: DetId.h:17
bool operator==(const DTRecHit1DPair &hit) const
Comparison operator, based on the wireId and the digi time.
void setPosition(DTEnums::DTCellSide lrside, const LocalPoint &point)
DTWireId wireId() const
float digiTime() const
Return the digi time (ns) used to build the rechits.
DTWireId wireId() const
Return the wireId.
Definition: DTRecHit1D.h:76
~DTRecHit1DPair() override
Destructor.
DTRecHit1DPair()
Default constructor. Needed to write the RecHit into a STL container.
virtual TrackingRecHit const * hit() const
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
const DTRecHit1D * componentRecHit(DTEnums::DTCellSide lrSide) const
Return the left/right DTRecHit1D.
LocalError localPositionError() const override