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 
9  public:
10 
11  typedef DetId key_type;
12 
13  enum Flags {
14  kGood=-1, // channel is good (mutually exclusive with other states) setFlagBit(kGood) reset flags_ to zero
15  kPoorReco, // channel has been badly reconstructed (e.g. bad shape, bad chi2 etc.)
16  kSaturated, // saturated channel
17  kOutOfTime // channel out of time
18  };
19 
21  FTLUncalibratedRecHit(const DetId& detId, std::pair <float,float> ampl,
22  std::pair <float,float> time, float timeError, unsigned char flags = 0);
23  FTLUncalibratedRecHit(const DetId& detId, uint8_t row, uint8_t column,
24  std::pair <float,float> ampl, std::pair <float,float> time,
25  float timeError, unsigned char flags = 0);
26 
28  std::pair <float,float> amplitude() const { return amplitude_; }
29  std::pair <float,float> time() const { return time_; }
30 
31  float timeError() const {return timeError_; }
32 
33  unsigned char flags() const { return flags_; };
34 
35  DetId id() const { return id_; }
36  int row() const { return row_; }
37  int column() const { return column_; }
38 
39  void setAmplitude( std::pair <float,float> amplitude ) { amplitude_ = amplitude; }
40  void setTime( std::pair <float,float> time ) { time_ = time; }
41 
42  void setTimeError( float timeErr ) { timeError_ = timeErr; }
43  void setId( DetId id ) { id_ = id; }
44  void setFlagBit(Flags flag);
45  bool checkFlag(Flags flag) const;
46 
47  bool isTimeValid() const;
48  bool isTimeErrorValid() const;
49 
50  bool isSaturated() const;
51 
52  private:
53  std::pair <float,float> amplitude_;
54  std::pair <float,float> time_;
55  float timeError_;
57  uint8_t row_, column_;
58  unsigned char flags_;
59 };
60 
61 #endif
bool checkFlag(Flags flag) const
void setAmplitude(std::pair< float, float > amplitude)
std::pair< float, float > amplitude_
Definition: DetId.h:18
std::pair< float, float > time_
std::pair< float, float > time() const
void setTimeError(float timeErr)
void setTime(std::pair< float, float > time)
std::pair< float, float > amplitude() const
unsigned char flags() const