CMS 3D CMS Logo

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 
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);
RPCRecHit::theBx
int theBx
Definition: RPCRecHit.h:88
RPCRecHit::setError
void setError(LocalError err)
Set local position error.
Definition: RPCRecHit.h:56
RPCRecHit::operator==
bool operator==(const RPCRecHit &hit) const
Comparison operator, based on the rpcId and the digi time.
Definition: RPCRecHit.cc:90
RPCDetId
Definition: RPCDetId.h:16
pos
Definition: PixelAliasList.h:18
RPCRecHit::BunchX
int BunchX() const
Definition: RPCRecHit.h:73
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
RPCRecHit::clone
RPCRecHit * clone() const override
Definition: RPCRecHit.cc:73
RPCRecHit::theRPCId
RPCDetId theRPCId
Definition: RPCRecHit.h:87
RPCRecHit::theFirstStrip
int theFirstStrip
Definition: RPCRecHit.h:89
RPCRecHit::theClusterSize
int theClusterSize
Definition: RPCRecHit.h:90
RPCRecHit::setTimeAndError
void setTimeAndError(float time, float err)
Set the time and its error.
Definition: RPCRecHit.h:65
RPCRecHit::time
float time() const
Definition: RPCRecHit.h:79
RPCRecHit
Definition: RPCRecHit.h:14
RecHit2DLocalPos::LocalPoint
GloballyPositioned< float >::LocalPoint LocalPoint
Definition: RecHit2DLocalPos.h:10
RPCRecHit::theLocalPosition
LocalPoint theLocalPosition
Definition: RPCRecHit.h:92
RPCRecHit::localPositionError
LocalError localPositionError() const override
Return the 3-dimensional error on the local position.
Definition: RPCRecHit.h:40
RPCRecHit::~RPCRecHit
~RPCRecHit() override
Destructor.
Definition: RPCRecHit.cc:71
RPCDetId.h
RPCRecHit::setPositionAndError
void setPositionAndError(LocalPoint pos, LocalError err)
Set the local position and its error.
Definition: RPCRecHit.h:59
runTheMatrix.err
err
Definition: runTheMatrix.py:288
LocalError
Definition: LocalError.h:12
RPCRecHit::localPosition
LocalPoint localPosition() const override
Return the 3-dimensional local position.
Definition: RPCRecHit.h:37
RPCRecHit::clusterSize
int clusterSize() const
Definition: RPCRecHit.h:77
RPCRecHit::recHits
std::vector< const TrackingRecHit * > recHits() const override
Definition: RPCRecHit.cc:77
RPCRecHit::setPosition
void setPosition(LocalPoint pos)
Set local position.
Definition: RPCRecHit.h:53
RPCRecHit::theLocalError
LocalError theLocalError
Definition: RPCRecHit.h:93
RPCRecHit::theTime
float theTime
Definition: RPCRecHit.h:94
RPCRecHit::timeError
float timeError() const
Definition: RPCRecHit.h:81
RecHit2DLocalPos
Definition: RecHit2DLocalPos.h:8
RPCRecHit::theTimeError
float theTimeError
Definition: RPCRecHit.h:94
operator<<
std::ostream & operator<<(std::ostream &os, const RPCRecHit &hit)
The ostream operator.
Definition: RPCRecHit.cc:93
RPCRecHit::RPCRecHit
RPCRecHit()
Default constructor.
Definition: RPCRecHit.cc:20
RPCRecHit::rpcId
RPCDetId rpcId() const
Return the rpcId.
Definition: RPCRecHit.h:71
RPCRecHit::firstClusterStrip
int firstClusterStrip() const
Definition: RPCRecHit.h:75
hit
Definition: SiStripHitEffFromCalibTree.cc:88
RecHit2DLocalPos.h