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 public:
21  float xWidth,
22  float y,
23  float yWidth,
24  float z,
25  float zWidth,
26  float t,
27  float tot,
28  float tPrecision,
29  int ootIdx,
30  const HPTDCErrorFlags &hptdcErr,
31  const bool mh)
33  tot_(tot),
35  tsIndex_(ootIdx),
36  hptdcErr_(hptdcErr),
37  mh_(mh) {}
38 
39  static constexpr int TIMESLICE_WITHOUT_LEADING = -10;
40 
41  inline void setToT(float tot) { tot_ = tot; }
42  inline float toT() const { return tot_; }
43 
44  inline void setTPrecision(float tPrecision) { tPrecision_ = tPrecision; }
45  inline float tPrecision() const { return tPrecision_; }
46 
47  inline void setOOTIndex(int i) { tsIndex_ = i; }
48  inline int ootIndex() const { return tsIndex_; }
49 
50  inline void setMultipleHits(bool mh) { mh_ = mh; }
51  inline bool multipleHits() const { return mh_; }
52 
53  inline void setHPTDCErrorFlags(const HPTDCErrorFlags &err) { hptdcErr_ = err; }
54  inline HPTDCErrorFlags hptdcErrorFlags() const { return hptdcErr_; }
55 
56 private:
58  float tot_;
60  float tPrecision_;
62  int tsIndex_;
66  bool mh_;
67 };
68 
69 #endif
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.
HPTDCErrorFlags hptdcErrorFlags() const
void setToT(float tot)
float tPrecision() const
float xWidth() const
float yWidth() const
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)
static constexpr int TIMESLICE_WITHOUT_LEADING
HPTDCErrorFlags hptdcErr_
List of error flags encountered by the HPTDC.
void setHPTDCErrorFlags(const HPTDCErrorFlags &err)
void setMultipleHits(bool mh)
int tsIndex_
Time slice index.
float zWidth() const
void setTPrecision(float tPrecision)
bool multipleHits() const