CMS 3D CMS Logo

CTPPSDiamondRecHit.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_CTPPSDiamondRecHit
11 #define DataFormats_CTPPSReco_CTPPSDiamondRecHit
12 
15 
18 {
19  public:
22  tot_( 0 ), tPrecision_( 0 ), tsIndex_( 0 ), hptdcErr_( 0 ), mh_( false ) {}
23  CTPPSDiamondRecHit( float x, float xWidth, float y, float yWidth, float z, float zWidth,
24  float t, float tot, float tPrecision, int ootIdx,
25  const HPTDCErrorFlags &hptdcErr, const bool mh ) :
26  CTPPSTimingRecHit( x, xWidth, y, yWidth, z, zWidth, t ),
27  tot_( tot ), tPrecision_( tPrecision ), tsIndex_( ootIdx ),
28  hptdcErr_( hptdcErr ), mh_( mh ) {}
29 
31 
32  inline void setToT( float tot ) { tot_ = tot; }
33  inline float getToT() const { return tot_; }
34 
35  inline void setTPrecision( float tPrecision ) { tPrecision_ = tPrecision; }
36  inline float getTPrecision() const { return tPrecision_; }
37 
38  inline void setOOTIndex( int i ) { tsIndex_ = i; }
39  inline int getOOTIndex() const { return tsIndex_; }
40 
41  inline void setMultipleHits( bool mh ) { mh_ = mh; }
42  inline bool getMultipleHits() const { return mh_; }
43 
44  inline void setHPTDCErrorFlags( const HPTDCErrorFlags &err ) { hptdcErr_ = err; }
45  inline HPTDCErrorFlags getHPTDCErrorFlags() const { return hptdcErr_; }
46 
47  private:
49  float tot_;
51  float tPrecision_;
53  int tsIndex_;
57  bool mh_;
58 };
59 
60 #endif
61 
HPTDCErrorFlags getHPTDCErrorFlags() const
Reconstructed hit in timing detectors.
float tot_
Time over threshold.
Reconstructed hit in diamond detectors.
float tPrecision_
Expected timing precision.
bool mh_
Multiple hits detected.
int getOOTIndex() const
void setToT(float tot)
CTPPSDiamondRecHit(float x, float xWidth, float y, float yWidth, float z, float zWidth, float t, float tot, float tPrecision, int ootIdx, const HPTDCErrorFlags &hptdcErr, const bool mh)
bool getMultipleHits() const
static constexpr int TIMESLICE_WITHOUT_LEADING
HPTDCErrorFlags hptdcErr_
List of error flags encountered by the HPTDC.
float getToT() const
float getTPrecision() const
void setHPTDCErrorFlags(const HPTDCErrorFlags &err)
void setMultipleHits(bool mh)
int tsIndex_
Time slice index.
#define constexpr
void setTPrecision(float tPrecision)