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 
19  FTLUncalibratedRecHit(const DetId& detId,
20  std::pair<float, float> ampl,
21  std::pair<float, float> time,
22  float timeError,
23  unsigned char flags = 0);
24  FTLUncalibratedRecHit(const DetId& detId,
25  uint8_t row,
26  uint8_t column,
27  std::pair<float, float> ampl,
28  std::pair<float, float> time,
29  float timeError,
30  unsigned char flags = 0);
31 
33  std::pair<float, float> amplitude() const { return amplitude_; }
34  std::pair<float, float> time() const { return time_; }
35 
36  float timeError() const { return timeError_; }
37 
38  unsigned char flags() const { return flags_; };
39 
40  DetId id() const { return id_; }
41  int row() const { return row_; }
42  int column() const { return column_; }
43 
44  void setAmplitude(std::pair<float, float> amplitude) { amplitude_ = amplitude; }
45  void setTime(std::pair<float, float> time) { time_ = time; }
46 
47  void setTimeError(float timeErr) { timeError_ = timeErr; }
48  void setId(DetId id) { id_ = id; }
49  void setFlagBit(Flags flag);
50  bool checkFlag(Flags flag) const;
51 
52  bool isTimeValid() const;
53  bool isTimeErrorValid() const;
54 
55  bool isSaturated() const;
56 
57 private:
58  std::pair<float, float> amplitude_;
59  std::pair<float, float> time_;
60  float timeError_;
62  uint8_t row_, column_;
63  unsigned char flags_;
64 };
65 
66 #endif
std::pair< float, float > time() const
std::pair< float, float > amplitude_
std::pair< float, float > amplitude() const
bool checkFlag(Flags flag) const
void setAmplitude(std::pair< float, float > amplitude)
Definition: DetId.h:17
void setTimeError(float timeErr)
std::pair< float, float > time_
void setTime(std::pair< float, float > time)
unsigned char flags() const