CMS 3D CMS Logo

GEMRecHit.h
Go to the documentation of this file.
1 #ifndef DataFormats_GEMRecHit_H
2 #define DataFormats_GEMRecHit_H
3 
13 
14 
15 class GEMRecHit : public RecHit2DLocalPos {
16  public:
17 
18  GEMRecHit(const GEMDetId& gemId,
19  int bx);
20 
22  GEMRecHit();
23 
28  GEMRecHit(const GEMDetId& gemId,
29  int bx,
30  const LocalPoint& pos);
31 
32 
34  GEMRecHit(const GEMDetId& gemId,
35  int bx,
36  const LocalPoint& pos,
37  const LocalError& err);
38 
39 
41  GEMRecHit(const GEMDetId& gemId,
42  int bx,
43  int firstStrip,
44  int clustSize,
45  const LocalPoint& pos,
46  const LocalError& err);
47 
49  ~GEMRecHit() override;
50 
51 
53  LocalPoint localPosition() const override {
54  return theLocalPosition;
55  }
56 
57 
59  LocalError localPositionError() const override {
60  return theLocalError;
61  }
62 
63 
64  GEMRecHit* clone() const override;
65 
66 
69  std::vector<const TrackingRecHit*> recHits() const override;
70 
71 
74  std::vector<TrackingRecHit*> recHits() override;
75 
76 
78  void setPosition(LocalPoint pos) {
79  theLocalPosition = pos;
80  }
81 
82 
84  void setError(LocalError err) {
85  theLocalError = err;
86  }
87 
88 
91  theLocalPosition = pos;
92  theLocalError = err;
93  }
94 
95 
97  GEMDetId gemId() const {
98  return theGEMId;
99  }
100 
101  int BunchX() const {
102  return theBx;
103  }
104 
105  int firstClusterStrip() const {
106  return theFirstStrip;
107  }
108 
109  int clusterSize() const {
110  return theClusterSize;
111  }
112 
114  bool operator==(const GEMRecHit& hit) const;
115 
116  private:
118  int theBx;
121  // Position and error in the Local Ref. Frame of the GEMLayer
124 
125 };
126 #endif
127 
129 std::ostream& operator<<(std::ostream& os, const GEMRecHit& hit);
bool operator==(const GEMRecHit &hit) const
Comparison operator, based on the gemId and the digi time.
Definition: GEMRecHit.cc:87
int clusterSize() const
Definition: GEMRecHit.h:109
LocalPoint localPosition() const override
Return the 3-dimensional local position.
Definition: GEMRecHit.h:53
int BunchX() const
Definition: GEMRecHit.h:101
int theBx
Definition: GEMRecHit.h:118
void setError(LocalError err)
Set local position error.
Definition: GEMRecHit.h:84
LocalPoint theLocalPosition
Definition: GEMRecHit.h:122
GEMRecHit()
Default constructor.
Definition: GEMRecHit.cc:16
~GEMRecHit() override
Destructor.
Definition: GEMRecHit.cc:58
LocalError localPositionError() const override
Return the 3-dimensional error on the local position.
Definition: GEMRecHit.h:59
GEMDetId theGEMId
Definition: GEMRecHit.h:117
int theFirstStrip
Definition: GEMRecHit.h:119
std::vector< const TrackingRecHit * > recHits() const override
Definition: GEMRecHit.cc:71
GEMRecHit * clone() const override
Definition: GEMRecHit.cc:64
LocalError theLocalError
Definition: GEMRecHit.h:123
int firstClusterStrip() const
Definition: GEMRecHit.h:105
std::ostream & operator<<(std::ostream &os, const GEMRecHit &hit)
The ostream operator.
Definition: GEMRecHit.cc:93
void setPositionAndError(LocalPoint pos, LocalError err)
Set the local position and its error.
Definition: GEMRecHit.h:90
void setPosition(LocalPoint pos)
Set local position.
Definition: GEMRecHit.h:78
GloballyPositioned< float >::LocalPoint LocalPoint
GEMDetId gemId() const
Return the gemId.
Definition: GEMRecHit.h:97
int theClusterSize
Definition: GEMRecHit.h:120