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 class GEMRecHit : public RecHit2DLocalPos {
15 public:
16  GEMRecHit(const GEMDetId& gemId, int bx);
17 
19  GEMRecHit();
20 
25  GEMRecHit(const GEMDetId& gemId, int bx, const LocalPoint& pos);
26 
28  GEMRecHit(const GEMDetId& gemId, int bx, const LocalPoint& pos, const LocalError& err);
29 
31  GEMRecHit(const GEMDetId& gemId, int bx, int firstStrip, int clustSize, const LocalPoint& pos, const LocalError& err);
32 
34  ~GEMRecHit() override;
35 
37  LocalPoint localPosition() const override { return theLocalPosition; }
38 
40  LocalError localPositionError() const override { return theLocalError; }
41 
42  GEMRecHit* clone() const override;
43 
46  std::vector<const TrackingRecHit*> recHits() const override;
47 
50  std::vector<TrackingRecHit*> recHits() override;
51 
54 
57 
62  }
63 
65  GEMDetId gemId() const { return theGEMId; }
66 
67  int BunchX() const { return theBx; }
68 
69  int firstClusterStrip() const { return theFirstStrip; }
70 
71  int clusterSize() const { return theClusterSize; }
72 
74  bool operator==(const GEMRecHit& hit) const;
75 
76 private:
78  int theBx;
81  // Position and error in the Local Ref. Frame of the GEMLayer
84 };
85 #endif
86 
88 std::ostream& operator<<(std::ostream& os, const GEMRecHit& hit);
LocalPoint localPosition() const override
Return the 3-dimensional local position.
Definition: GEMRecHit.h:37
int theBx
Definition: GEMRecHit.h:78
bool operator==(const GEMRecHit &hit) const
Comparison operator, based on the gemId and the digi time.
Definition: GEMRecHit.cc:75
void setError(LocalError err)
Set local position error.
Definition: GEMRecHit.h:56
LocalPoint theLocalPosition
Definition: GEMRecHit.h:82
GEMRecHit()
Default constructor.
Definition: GEMRecHit.cc:18
~GEMRecHit() override
Destructor.
Definition: GEMRecHit.cc:56
GEMRecHit * clone() const override
Definition: GEMRecHit.cc:58
LocalError localPositionError() const override
Return the 3-dimensional error on the local position.
Definition: GEMRecHit.h:40
GEMDetId theGEMId
Definition: GEMRecHit.h:77
int BunchX() const
Definition: GEMRecHit.h:67
int theFirstStrip
Definition: GEMRecHit.h:79
GEMDetId gemId() const
Return the gemId.
Definition: GEMRecHit.h:65
LocalError theLocalError
Definition: GEMRecHit.h:83
std::ostream & operator<<(std::ostream &os, const GEMRecHit &hit)
The ostream operator.
Definition: GEMRecHit.cc:78
int firstClusterStrip() const
Definition: GEMRecHit.h:69
void setPositionAndError(LocalPoint pos, LocalError err)
Set the local position and its error.
Definition: GEMRecHit.h:59
std::vector< const TrackingRecHit * > recHits() const override
Definition: GEMRecHit.cc:62
void setPosition(LocalPoint pos)
Set local position.
Definition: GEMRecHit.h:53
int clusterSize() const
Definition: GEMRecHit.h:71
GloballyPositioned< float >::LocalPoint LocalPoint
int theClusterSize
Definition: GEMRecHit.h:80