CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RPCRecHit.h
Go to the documentation of this file.
1 #ifndef DataFormats_RPCRecHit_H
2 #define DataFormats_RPCRecHit_H
3 
15 
16 
17 class RPCRecHit : public RecHit2DLocalPos {
18  public:
19 
20  RPCRecHit(const RPCDetId& rpcId,
21  int bx);
22 
24  RPCRecHit();
25 
30  RPCRecHit(const RPCDetId& rpcId,
31  int bx,
32  const LocalPoint& pos);
33 
34 
36  RPCRecHit(const RPCDetId& rpcId,
37  int bx,
38  const LocalPoint& pos,
39  const LocalError& err);
40 
41 
43  RPCRecHit(const RPCDetId& rpcId,
44  int bx,
45  int firstStrip,
46  int clustSize,
47  const LocalPoint& pos,
48  const LocalError& err);
49 
51  virtual ~RPCRecHit();
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 RPCRecHit* 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  RPCDetId rpcId() const {
100  return theRPCId;
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 RPCRecHit& hit) const;
117 
118  private:
120  int theBx;
123  // Position and error in the Local Ref. Frame of the RPCLayer
126 
127 };
128 #endif
129 
131 std::ostream& operator<<(std::ostream& os, const RPCRecHit& hit);
int firstClusterStrip() const
Definition: RPCRecHit.h:107
int theFirstStrip
Definition: RPCRecHit.h:121
bool operator==(const RPCRecHit &hit) const
Comparison operator, based on the rpcId and the digi time.
Definition: RPCRecHit.cc:89
LocalPoint theLocalPosition
Definition: RPCRecHit.h:124
RPCDetId theRPCId
Definition: RPCRecHit.h:119
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
int clusterSize() const
Definition: RPCRecHit.h:111
void setPosition(LocalPoint pos)
Set local position.
Definition: RPCRecHit.h:80
RPCDetId rpcId() const
Return the rpcId.
Definition: RPCRecHit.h:99
virtual ~RPCRecHit()
Destructor.
Definition: RPCRecHit.cc:60
int theClusterSize
Definition: RPCRecHit.h:122
LocalError theLocalError
Definition: RPCRecHit.h:125
virtual std::vector< const TrackingRecHit * > recHits() const
Definition: RPCRecHit.cc:73
RPCRecHit()
Default constructor.
Definition: RPCRecHit.cc:18
int theBx
Definition: RPCRecHit.h:120
virtual LocalError localPositionError() const
Return the 3-dimensional error on the local position.
Definition: RPCRecHit.h:61
void setError(LocalError err)
Set local position error.
Definition: RPCRecHit.h:86
int BunchX() const
Definition: RPCRecHit.h:103
virtual LocalPoint localPosition() const
Return the 3-dimensional local position.
Definition: RPCRecHit.h:55
virtual RPCRecHit * clone() const
Definition: RPCRecHit.cc:66
void setPositionAndError(LocalPoint pos, LocalError err)
Set the local position and its error.
Definition: RPCRecHit.h:92