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
FTLUncalibratedRecHit::column_
uint8_t column_
Definition: FTLUncalibratedRecHit.h:62
FTLUncalibratedRecHit::setTimeError
void setTimeError(float timeErr)
Definition: FTLUncalibratedRecHit.h:47
FTLUncalibratedRecHit::row
int row() const
Definition: FTLUncalibratedRecHit.h:41
FTLUncalibratedRecHit::flags_
unsigned char flags_
Definition: FTLUncalibratedRecHit.h:63
FTLUncalibratedRecHit::Flags
Flags
Definition: FTLUncalibratedRecHit.h:11
FTLUncalibratedRecHit::amplitude_
std::pair< float, float > amplitude_
Definition: FTLUncalibratedRecHit.h:58
FTLUncalibratedRecHit::kGood
Definition: FTLUncalibratedRecHit.h:12
FTLUncalibratedRecHit::setFlagBit
void setFlagBit(Flags flag)
Definition: FTLUncalibratedRecHit.cc:47
FTLUncalibratedRecHit::kOutOfTime
Definition: FTLUncalibratedRecHit.h:15
FTLUncalibratedRecHit::isSaturated
bool isSaturated() const
Definition: FTLUncalibratedRecHit.cc:29
FTLUncalibratedRecHit::timeError_
float timeError_
Definition: FTLUncalibratedRecHit.h:60
FTLUncalibratedRecHit::isTimeValid
bool isTimeValid() const
Definition: FTLUncalibratedRecHit.cc:31
DetId
Definition: DetId.h:17
FTLUncalibratedRecHit::checkFlag
bool checkFlag(Flags flag) const
Definition: FTLUncalibratedRecHit.cc:57
FTLUncalibratedRecHit::~FTLUncalibratedRecHit
~FTLUncalibratedRecHit()
Definition: FTLUncalibratedRecHit.cc:27
FTLUncalibratedRecHit::kSaturated
Definition: FTLUncalibratedRecHit.h:14
FTLUncalibratedRecHit::setAmplitude
void setAmplitude(std::pair< float, float > amplitude)
Definition: FTLUncalibratedRecHit.h:44
FTLUncalibratedRecHit::id_
DetId id_
Definition: FTLUncalibratedRecHit.h:61
FTLUncalibratedRecHit::key_type
DetId key_type
Definition: FTLUncalibratedRecHit.h:9
FTLUncalibratedRecHit::id
DetId id() const
Definition: FTLUncalibratedRecHit.h:40
FTLUncalibratedRecHit::column
int column() const
Definition: FTLUncalibratedRecHit.h:42
FTLUncalibratedRecHit::setTime
void setTime(std::pair< float, float > time)
Definition: FTLUncalibratedRecHit.h:45
FTLUncalibratedRecHit::kPoorReco
Definition: FTLUncalibratedRecHit.h:13
DetId.h
FTLUncalibratedRecHit::setId
void setId(DetId id)
Definition: FTLUncalibratedRecHit.h:48
FTLUncalibratedRecHit::flags
unsigned char flags() const
Definition: FTLUncalibratedRecHit.h:38
FTLUncalibratedRecHit
Definition: FTLUncalibratedRecHit.h:7
FTLUncalibratedRecHit::amplitude
std::pair< float, float > amplitude() const
Definition: FTLUncalibratedRecHit.h:33
FTLUncalibratedRecHit::row_
uint8_t row_
Definition: FTLUncalibratedRecHit.h:62
FTLUncalibratedRecHit::FTLUncalibratedRecHit
FTLUncalibratedRecHit()
Definition: FTLUncalibratedRecHit.cc:5
FTLUncalibratedRecHit::time_
std::pair< float, float > time_
Definition: FTLUncalibratedRecHit.h:59
FTLUncalibratedRecHit::isTimeErrorValid
bool isTimeErrorValid() const
Definition: FTLUncalibratedRecHit.cc:38
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
FTLUncalibratedRecHit::timeError
float timeError() const
Definition: FTLUncalibratedRecHit.h:36
FTLUncalibratedRecHit::time
std::pair< float, float > time() const
Definition: FTLUncalibratedRecHit.h:34