CMS 3D CMS Logo

FTLUncalibratedRecHit.h
Go to the documentation of this file.
1 #ifndef DATAFORMATS_FTLUNCALIBRATEDRECHIT
2 #define DATAFORMATS_FTLUNCALIBRATEDRECHIT
3 
4 #include <vector>
6 
8 public:
9  typedef DetId key_type;
10 
11  enum Flags {
12  kGood = -1, // channel is good (mutually exclusive with other states) setFlagBit(kGood) reset flags_ to zero
13  kPoorReco, // channel has been badly reconstructed (e.g. bad shape, bad chi2 etc.)
14  kSaturated, // saturated channel
15  kOutOfTime // channel out of time
16  };
17 
20  uint8_t row,
21  uint8_t column,
22  std::pair<float, float> ampl,
23  std::pair<float, float> time,
24  float timeError,
25  float position,
26  float positionError,
27  unsigned char flags = 0);
29  std::pair<float, float> ampl,
30  std::pair<float, float> time,
31  float timeError,
32  float position,
33  float positionError,
34  unsigned char flags = 0);
35 
36  ~FTLUncalibratedRecHit() = default;
37  std::pair<float, float> amplitude() const { return amplitude_; }
38  std::pair<float, float> time() const { return time_; }
39  float position() const { return position_; }
40 
41  float timeError() const { return timeError_; }
42  float positionError() const { return positionError_; }
43 
44  unsigned char flags() const { return flags_; };
45 
46  DetId id() const { return id_; }
47  int row() const { return row_; }
48  int column() const { return column_; }
49 
50  void setAmplitude(std::pair<float, float> amplitude) { amplitude_ = amplitude; }
51  void setTime(std::pair<float, float> time) { time_ = time; }
52 
53  void setTimeError(float timeErr) { timeError_ = timeErr; }
54  void setId(DetId id) { id_ = id; }
55  void setFlagBit(Flags flag);
56  bool checkFlag(Flags flag) const;
57 
59  void setPositionError(float positionErr) { positionError_ = positionErr; }
60 
61  bool isTimeValid() const;
62  bool isTimeErrorValid() const;
63 
64  bool isSaturated() const;
65 
66 private:
67  std::pair<float, float> amplitude_;
68  std::pair<float, float> time_;
69  float timeError_;
70  float position_;
73  uint8_t row_;
74  uint8_t column_;
75  unsigned char flags_;
76 };
77 
78 #endif
std::pair< float, float > amplitude_
void setPosition(float position)
void setPositionError(float positionErr)
~FTLUncalibratedRecHit()=default
bool checkFlag(Flags flag) const
void setAmplitude(std::pair< float, float > amplitude)
float positionError_
distance from the center of the bar to the hit
std::pair< float, float > amplitude() const
Definition: DetId.h:17
void setTimeError(float timeErr)
std::pair< float, float > time_
std::pair< float, float > time() const
void setTime(std::pair< float, float > time)
unsigned char flags() const