CMS 3D CMS Logo

TotemRPRecHit.h
Go to the documentation of this file.
1 /****************************************************************************
2 *
3 * This is a part of TOTEM offline software.
4 * Authors:
5 * Hubert Niewiadomski
6 * Jan Kašpar (jan.kaspar@gmail.com)
7 *
8 ****************************************************************************/
9 
10 #ifndef DataFormats_CTPPSReco_TotemRPRecHit
11 #define DataFormats_CTPPSReco_TotemRPRecHit
12 
19 public:
20  TotemRPRecHit(double position = 0, double sigma = 0) : position_(position), sigma_(sigma) {}
21 
22  inline double position() const { return position_; }
23  inline void setPosition(double position) { position_ = position; }
24 
25  inline double sigma() const { return sigma_; }
26  inline void setSigma(double sigma) { sigma_ = sigma; }
27 
28 private:
30  double position_;
31 
33  double sigma_;
34 };
35 
36 //----------------------------------------------------------------------------------------------------
37 
38 inline bool operator<(const TotemRPRecHit &l, const TotemRPRecHit &r) {
39  if (l.position() < r.position())
40  return true;
41  if (l.position() > r.position())
42  return false;
43 
44  if (l.sigma() < r.sigma())
45  return true;
46 
47  return false;
48 }
49 
50 #endif
double sigma_
position uncertainty, in mm
Definition: TotemRPRecHit.h:33
TotemRPRecHit(double position=0, double sigma=0)
Definition: TotemRPRecHit.h:20
void setSigma(double sigma)
Definition: TotemRPRecHit.h:26
double position_
position of the hit in mm, wrt detector center (see RPTopology::GetHitPositionInReadoutDirection) ...
Definition: TotemRPRecHit.h:30
bool operator<(const TotemRPRecHit &l, const TotemRPRecHit &r)
Definition: TotemRPRecHit.h:38
Reconstructed hit in TOTEM RP.
Definition: TotemRPRecHit.h:18
void setPosition(double position)
Definition: TotemRPRecHit.h:23
double position() const
Definition: TotemRPRecHit.h:22
double sigma() const
Definition: TotemRPRecHit.h:25