CMS 3D CMS Logo

CTPPSTimingRecHit.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * This is a part of CTPPS offline software.
4  * Authors:
5  * Laurent Forthomme (laurent.forthomme@cern.ch)
6  * Nicola Minafra (nicola.minafra@cern.ch)
7  *
8  ****************************************************************************/
9 
10 #ifndef DataFormats_CTPPSReco_CTPPSTimingRecHit
11 #define DataFormats_CTPPSReco_CTPPSTimingRecHit
12 
15 {
16  public:
18  x_( 0. ), xWidth_( 0. ), y_( 0. ), yWidth_( 0. ), z_( 0. ), zWidth_( 0. ), t_( 0. ) {}
19  CTPPSTimingRecHit( float x, float xWidth, float y, float yWidth, float z, float zWidth, float t ) :
20  x_( x ), xWidth_( xWidth ), y_( y ), yWidth_( yWidth ), z_( z ), zWidth_( zWidth ), t_( t ) {}
21 
22  inline void setX( float x ) { x_ = x; }
23  inline float getX() const { return x_; }
24 
25  inline void setY( float y ) { y_ = y; }
26  inline float getY() const { return y_; }
27 
28  inline void setZ( float z ) { z_ = z; }
29  inline float getZ() const { return z_; }
30 
31  inline void setXWidth( float xWidth ) { xWidth_ = xWidth; }
32  inline float getXWidth() const { return xWidth_; }
33 
34  inline void setYWidth( float yWidth ) { yWidth_ = yWidth; }
35  inline float getYWidth() const { return yWidth_; }
36 
37  inline void setZWidth( float zWidth ) { zWidth_ = zWidth; }
38  inline float getZWidth() const { return zWidth_; }
39 
40  inline void setT( float t ) { t_ = t; }
41  inline float getT() const { return t_; }
42 
43  protected:
44  float x_, xWidth_;
45  float y_, yWidth_;
46  float z_, zWidth_;
47  float t_;
48 };
49 
50 //----------------------------------------------------------------------------------------------------
51 
52 inline bool operator<(const CTPPSTimingRecHit &l, const CTPPSTimingRecHit &r) {
53  // only sort by leading edge time
54  return (l.getT() < r.getT());
55 }
56 
57 #endif
58 
Reconstructed hit in timing detectors.
float getX() const
float getYWidth() const
float getT() const
void setXWidth(float xWidth)
bool operator<(const CTPPSTimingRecHit &l, const CTPPSTimingRecHit &r)
float getZWidth() const
float getY() const
CTPPSTimingRecHit(float x, float xWidth, float y, float yWidth, float z, float zWidth, float t)
float getZ() const
void setZ(float z)
void setZWidth(float zWidth)
float getXWidth() const
void setY(float y)
void setT(float t)
void setYWidth(float yWidth)
void setX(float x)