CMS 3D CMS Logo

ME0RecHit.h
Go to the documentation of this file.
1 #ifndef DataFormats_ME0RecHit_H
2 #define DataFormats_ME0RecHit_H
3 
15 
16 
17 class ME0RecHit : public RecHit2DLocalPos {
18  public:
19 
20  ME0RecHit(const ME0DetId& me0Id,
21 float tof);
22 
24  ME0RecHit();
25 
27  ME0RecHit(const ME0DetId& me0Id,
28 float tof,
29 const LocalPoint& pos);
30 
31 
36  ME0RecHit(const ME0DetId& me0Id,
37 float tof,
38 const LocalPoint& pos,
39 const LocalError& err);
40 
41 
43  ~ME0RecHit() override;
44 
45 
47  LocalPoint localPosition() const override {
48  return theLocalPosition;
49  }
50 
51 
53  LocalError localPositionError() const override {
54  return theLocalError;
55  }
56 
57 
58  ME0RecHit* clone() const override;
59 
60 
63  std::vector<const TrackingRecHit*> recHits() const override;
64 
65 
68  std::vector<TrackingRecHit*> recHits() override;
69 
70 
72  void setPosition(LocalPoint pos) {
73  theLocalPosition = pos;
74  }
75 
76 
78  void setError(LocalError err) {
79  theLocalError = err;
80  }
81 
82 
85  theLocalPosition = pos;
86  theLocalError = err;
87  }
88 
89 
91  ME0DetId me0Id() const {
92  return theME0Id;
93  }
94 
95  float tof() const {
96  return theTOF;
97  }
98 
100  bool operator==(const ME0RecHit& hit) const;
101 
102  private:
104  float theTOF;
105  // Position and error in the Local Ref. Frame of the ME0Layer
108 
109 };
110 #endif
111 
113 std::ostream& operator<<(std::ostream& os, const ME0RecHit& hit);
LocalError localPositionError() const override
Return the 3-dimensional error on the local position.
Definition: ME0RecHit.h:53
ME0RecHit()
Default constructor.
Definition: ME0RecHit.cc:18
void setPosition(LocalPoint pos)
Set local position.
Definition: ME0RecHit.h:72
std::ostream & operator<<(std::ostream &os, const ME0RecHit &hit)
The ostream operator.
Definition: ME0RecHit.cc:72
float theTOF
Definition: ME0RecHit.h:104
void setError(LocalError err)
Set local position error.
Definition: ME0RecHit.h:78
~ME0RecHit() override
Destructor.
Definition: ME0RecHit.cc:41
bool operator==(const ME0RecHit &hit) const
Comparison operator, based on the gemId and the digi time.
Definition: ME0RecHit.cc:66
ME0DetId theME0Id
Definition: ME0RecHit.h:103
LocalPoint localPosition() const override
Return the 3-dimensional local position.
Definition: ME0RecHit.h:47
float tof() const
Definition: ME0RecHit.h:95
void setPositionAndError(LocalPoint pos, LocalError err)
Set the local position and its error.
Definition: ME0RecHit.h:84
LocalError theLocalError
Definition: ME0RecHit.h:107
LocalPoint theLocalPosition
Definition: ME0RecHit.h:106
ME0RecHit * clone() const override
Definition: ME0RecHit.cc:47
ME0DetId me0Id() const
Return the gemId.
Definition: ME0RecHit.h:91
std::vector< const TrackingRecHit * > recHits() const override
Definition: ME0RecHit.cc:54
GloballyPositioned< float >::LocalPoint LocalPoint