CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  virtual ~ME0RecHit();
44 
45 
47  virtual LocalPoint localPosition() const {
48  return theLocalPosition;
49  }
50 
51 
53  virtual LocalError localPositionError() const {
54  return theLocalError;
55  }
56 
57 
58  virtual ME0RecHit* clone() const;
59 
60 
63  virtual std::vector<const TrackingRecHit*> recHits() const;
64 
65 
68  virtual std::vector<TrackingRecHit*> recHits();
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);
virtual ME0RecHit * clone() const
Definition: ME0RecHit.cc:47
ME0RecHit()
Default constructor.
Definition: ME0RecHit.cc:18
void setPosition(LocalPoint pos)
Set local position.
Definition: ME0RecHit.h:72
float theTOF
Definition: ME0RecHit.h:104
void setError(LocalError err)
Set local position error.
Definition: ME0RecHit.h:78
bool operator==(const ME0RecHit &hit) const
Comparison operator, based on the gemId and the digi time.
Definition: ME0RecHit.cc:66
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
virtual LocalError localPositionError() const
Return the 3-dimensional error on the local position.
Definition: ME0RecHit.h:53
virtual ~ME0RecHit()
Destructor.
Definition: ME0RecHit.cc:41
ME0DetId theME0Id
Definition: ME0RecHit.h:103
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
virtual LocalPoint localPosition() const
Return the 3-dimensional local position.
Definition: ME0RecHit.h:47
LocalPoint theLocalPosition
Definition: ME0RecHit.h:106
ME0DetId me0Id() const
Return the gemId.
Definition: ME0RecHit.h:91
GloballyPositioned< float >::LocalPoint LocalPoint
virtual std::vector< const TrackingRecHit * > recHits() const
Definition: ME0RecHit.cc:54