CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RPCRecHit.h
Go to the documentation of this file.
1 #ifndef DataFormats_RPCRecHit_H
2 #define DataFormats_RPCRecHit_H
3 
13 
14 class RPCRecHit : public RecHit2DLocalPos {
15 public:
16  RPCRecHit(const RPCDetId& rpcId, int bx);
17 
19  RPCRecHit();
20 
25  RPCRecHit(const RPCDetId& rpcId, int bx, const LocalPoint& pos);
26 
28  RPCRecHit(const RPCDetId& rpcId, int bx, const LocalPoint& pos, const LocalError& err);
29 
31  RPCRecHit(const RPCDetId& rpcId, int bx, int firstStrip, int clustSize, const LocalPoint& pos, const LocalError& err);
32 
34  ~RPCRecHit() override;
35 
37  LocalPoint localPosition() const override { return theLocalPosition; }
38 
40  LocalError localPositionError() const override { return theLocalError; }
41 
42  RPCRecHit* clone() const override;
43 
46  std::vector<const TrackingRecHit*> recHits() const override;
47 
50  std::vector<TrackingRecHit*> recHits() override;
51 
54 
57 
60  theLocalPosition = pos;
62  }
63 
65  void setTimeAndError(float time, float err) {
66  theTime = time;
67  theTimeError = err;
68  }
69 
71  RPCDetId rpcId() const { return theRPCId; }
72 
73  int BunchX() const { return theBx; }
74 
75  int firstClusterStrip() const { return theFirstStrip; }
76 
77  int clusterSize() const { return theClusterSize; }
78 
79  float time() const { return theTime; }
80 
81  float timeError() const { return theTimeError; }
82 
84  bool operator==(const RPCRecHit& hit) const;
85 
86 private:
88  int theBx;
91  // Position and error in the Local Ref. Frame of the RPCLayer
95 };
96 #endif
97 
99 std::ostream& operator<<(std::ostream& os, const RPCRecHit& hit);
int firstClusterStrip() const
Definition: RPCRecHit.h:75
int theFirstStrip
Definition: RPCRecHit.h:89
bool operator==(const RPCRecHit &hit) const
Comparison operator, based on the rpcId and the digi time.
Definition: RPCRecHit.cc:90
LocalPoint localPosition() const override
Return the 3-dimensional local position.
Definition: RPCRecHit.h:37
float time() const
Definition: RPCRecHit.h:79
LocalPoint theLocalPosition
Definition: RPCRecHit.h:92
RPCDetId theRPCId
Definition: RPCRecHit.h:87
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
RPCRecHit * clone() const override
Definition: RPCRecHit.cc:73
std::vector< const TrackingRecHit * > recHits() const override
Definition: RPCRecHit.cc:77
int clusterSize() const
Definition: RPCRecHit.h:77
void setPosition(LocalPoint pos)
Set local position.
Definition: RPCRecHit.h:53
RPCDetId rpcId() const
Return the rpcId.
Definition: RPCRecHit.h:71
~RPCRecHit() override
Destructor.
Definition: RPCRecHit.cc:71
int theClusterSize
Definition: RPCRecHit.h:90
LocalError theLocalError
Definition: RPCRecHit.h:93
void setTimeAndError(float time, float err)
Set the time and its error.
Definition: RPCRecHit.h:65
RPCRecHit()
Default constructor.
Definition: RPCRecHit.cc:20
float theTime
Definition: RPCRecHit.h:94
float theTimeError
Definition: RPCRecHit.h:94
int theBx
Definition: RPCRecHit.h:88
LocalError localPositionError() const override
Return the 3-dimensional error on the local position.
Definition: RPCRecHit.h:40
void setError(LocalError err)
Set local position error.
Definition: RPCRecHit.h:56
int BunchX() const
Definition: RPCRecHit.h:73
GloballyPositioned< float >::LocalPoint LocalPoint
float timeError() const
Definition: RPCRecHit.h:81
void setPositionAndError(LocalPoint pos, LocalError err)
Set the local position and its error.
Definition: RPCRecHit.h:59