CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  virtual ~GEMRecHit();
50 
51 
53  virtual LocalPoint localPosition() const {
54  return theLocalPosition;
55  }
56 
57 
59  virtual LocalError localPositionError() const {
60  return theLocalError;
61  }
62 
63 
64  virtual GEMRecHit* clone() const;
65 
66 
69  virtual std::vector<const TrackingRecHit*> recHits() const;
70 
71 
74  virtual std::vector<TrackingRecHit*> recHits();
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);
virtual LocalPoint localPosition() const
Return the 3-dimensional local position.
Definition: GEMRecHit.h:53
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
virtual GEMRecHit * clone() const
Definition: GEMRecHit.cc:64
int BunchX() const
Definition: GEMRecHit.h:101
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
virtual ~GEMRecHit()
Destructor.
Definition: GEMRecHit.cc:58
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
virtual std::vector< const TrackingRecHit * > recHits() const
Definition: GEMRecHit.cc:71
GEMDetId theGEMId
Definition: GEMRecHit.h:117
int theFirstStrip
Definition: GEMRecHit.h:119
virtual LocalError localPositionError() const
Return the 3-dimensional error on the local position.
Definition: GEMRecHit.h:59
LocalError theLocalError
Definition: GEMRecHit.h:123
int firstClusterStrip() const
Definition: GEMRecHit.h:105
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