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 
15 
16 
17 class GEMRecHit : public RecHit2DLocalPos {
18  public:
19 
20  GEMRecHit(const GEMDetId& gemId,
21  int bx);
22 
24  GEMRecHit();
25 
30  GEMRecHit(const GEMDetId& gemId,
31  int bx,
32  const LocalPoint& pos);
33 
34 
36  GEMRecHit(const GEMDetId& gemId,
37  int bx,
38  const LocalPoint& pos,
39  const LocalError& err);
40 
41 
43  GEMRecHit(const GEMDetId& gemId,
44  int bx,
45  int firstStrip,
46  int clustSize,
47  const LocalPoint& pos,
48  const LocalError& err);
49 
51  virtual ~GEMRecHit();
52 
53 
55  virtual LocalPoint localPosition() const {
56  return theLocalPosition;
57  }
58 
59 
61  virtual LocalError localPositionError() const {
62  return theLocalError;
63  }
64 
65 
66  virtual GEMRecHit* clone() const;
67 
68 
71  virtual std::vector<const TrackingRecHit*> recHits() const;
72 
73 
76  virtual std::vector<TrackingRecHit*> recHits();
77 
78 
80  void setPosition(LocalPoint pos) {
82  }
83 
84 
86  void setError(LocalError err) {
87  theLocalError = err;
88  }
89 
90 
94  theLocalError = err;
95  }
96 
97 
99  GEMDetId gemId() const {
100  return theGEMId;
101  }
102 
103  int BunchX() const {
104  return theBx;
105  }
106 
107  int firstClusterStrip() const {
108  return theFirstStrip;
109  }
110 
111  int clusterSize() const {
112  return theClusterSize;
113  }
114 
116  bool operator==(const GEMRecHit& hit) const;
117 
118  private:
120  int theBx;
123  // Position and error in the Local Ref. Frame of the GEMLayer
126 
127 };
128 #endif
129 
131 std::ostream& operator<<(std::ostream& os, const GEMRecHit& hit);
virtual LocalPoint localPosition() const
Return the 3-dimensional local position.
Definition: GEMRecHit.h:55
bool operator==(const GEMRecHit &hit) const
Comparison operator, based on the gemId and the digi time.
Definition: GEMRecHit.cc:89
int clusterSize() const
Definition: GEMRecHit.h:111
virtual GEMRecHit * clone() const
Definition: GEMRecHit.cc:66
int BunchX() const
Definition: GEMRecHit.h:103
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
virtual ~GEMRecHit()
Destructor.
Definition: GEMRecHit.cc:60
int theBx
Definition: GEMRecHit.h:120
void setError(LocalError err)
Set local position error.
Definition: GEMRecHit.h:86
LocalPoint theLocalPosition
Definition: GEMRecHit.h:124
GEMRecHit()
Default constructor.
Definition: GEMRecHit.cc:18
virtual std::vector< const TrackingRecHit * > recHits() const
Definition: GEMRecHit.cc:73
GEMDetId theGEMId
Definition: GEMRecHit.h:119
int theFirstStrip
Definition: GEMRecHit.h:121
virtual LocalError localPositionError() const
Return the 3-dimensional error on the local position.
Definition: GEMRecHit.h:61
LocalError theLocalError
Definition: GEMRecHit.h:125
int firstClusterStrip() const
Definition: GEMRecHit.h:107
void setPositionAndError(LocalPoint pos, LocalError err)
Set the local position and its error.
Definition: GEMRecHit.h:92
void setPosition(LocalPoint pos)
Set local position.
Definition: GEMRecHit.h:80
GloballyPositioned< float >::LocalPoint LocalPoint
GEMDetId gemId() const
Return the gemId.
Definition: GEMRecHit.h:99
int theClusterSize
Definition: GEMRecHit.h:122