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 
13 
14 
15 class RPCRecHit : public RecHit2DLocalPos {
16  public:
17 
18  RPCRecHit(const RPCDetId& rpcId,
19  int bx);
20 
22  RPCRecHit();
23 
28  RPCRecHit(const RPCDetId& rpcId,
29  int bx,
30  const LocalPoint& pos);
31 
32 
34  RPCRecHit(const RPCDetId& rpcId,
35  int bx,
36  const LocalPoint& pos,
37  const LocalError& err);
38 
39 
41  RPCRecHit(const RPCDetId& rpcId,
42  int bx,
43  int firstStrip,
44  int clustSize,
45  const LocalPoint& pos,
46  const LocalError& err);
47 
49  virtual ~RPCRecHit();
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 RPCRecHit* 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  RPCDetId rpcId() const {
98  return theRPCId;
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 RPCRecHit& hit) const;
115 
116  private:
118  int theBx;
121  // Position and error in the Local Ref. Frame of the RPCLayer
124 
125 };
126 #endif
127 
129 std::ostream& operator<<(std::ostream& os, const RPCRecHit& hit);
int firstClusterStrip() const
Definition: RPCRecHit.h:105
int theFirstStrip
Definition: RPCRecHit.h:119
bool operator==(const RPCRecHit &hit) const
Comparison operator, based on the rpcId and the digi time.
Definition: RPCRecHit.cc:87
LocalPoint theLocalPosition
Definition: RPCRecHit.h:122
RPCDetId theRPCId
Definition: RPCRecHit.h:117
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
int clusterSize() const
Definition: RPCRecHit.h:109
void setPosition(LocalPoint pos)
Set local position.
Definition: RPCRecHit.h:78
RPCDetId rpcId() const
Return the rpcId.
Definition: RPCRecHit.h:97
virtual ~RPCRecHit()
Destructor.
Definition: RPCRecHit.cc:58
int theClusterSize
Definition: RPCRecHit.h:120
LocalError theLocalError
Definition: RPCRecHit.h:123
virtual std::vector< const TrackingRecHit * > recHits() const
Definition: RPCRecHit.cc:71
RPCRecHit()
Default constructor.
Definition: RPCRecHit.cc:16
int theBx
Definition: RPCRecHit.h:118
virtual LocalError localPositionError() const
Return the 3-dimensional error on the local position.
Definition: RPCRecHit.h:59
void setError(LocalError err)
Set local position error.
Definition: RPCRecHit.h:84
int BunchX() const
Definition: RPCRecHit.h:101
GloballyPositioned< float >::LocalPoint LocalPoint
virtual LocalPoint localPosition() const
Return the 3-dimensional local position.
Definition: RPCRecHit.h:53
virtual RPCRecHit * clone() const
Definition: RPCRecHit.cc:64
void setPositionAndError(LocalPoint pos, LocalError err)
Set the local position and its error.
Definition: RPCRecHit.h:90