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  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);
28  FTLUncalibratedRecHit(const DetId& detId,
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
FTLUncalibratedRecHit::column_
uint8_t column_
Definition: FTLUncalibratedRecHit.h:74
FTLUncalibratedRecHit::setTimeError
void setTimeError(float timeErr)
Definition: FTLUncalibratedRecHit.h:53
FTLUncalibratedRecHit::row
int row() const
Definition: FTLUncalibratedRecHit.h:47
FTLUncalibratedRecHit::flags_
unsigned char flags_
Definition: FTLUncalibratedRecHit.h:75
FTLUncalibratedRecHit::Flags
Flags
Definition: FTLUncalibratedRecHit.h:11
FTLUncalibratedRecHit::amplitude_
std::pair< float, float > amplitude_
Definition: FTLUncalibratedRecHit.h:67
FTLUncalibratedRecHit::kGood
Definition: FTLUncalibratedRecHit.h:12
FTLUncalibratedRecHit::setFlagBit
void setFlagBit(Flags flag)
Definition: FTLUncalibratedRecHit.cc:55
FTLUncalibratedRecHit::kOutOfTime
Definition: FTLUncalibratedRecHit.h:15
FTLUncalibratedRecHit::isSaturated
bool isSaturated() const
Definition: FTLUncalibratedRecHit.cc:37
FTLUncalibratedRecHit::timeError_
float timeError_
Definition: FTLUncalibratedRecHit.h:69
FTLUncalibratedRecHit::isTimeValid
bool isTimeValid() const
Definition: FTLUncalibratedRecHit.cc:39
DetId
Definition: DetId.h:17
FTLUncalibratedRecHit::positionError_
float positionError_
distance from the center of the bar to the hit
Definition: FTLUncalibratedRecHit.h:71
FTLUncalibratedRecHit::checkFlag
bool checkFlag(Flags flag) const
Definition: FTLUncalibratedRecHit.cc:65
FTLUncalibratedRecHit::position_
float position_
Definition: FTLUncalibratedRecHit.h:70
FTLUncalibratedRecHit::position
float position() const
Definition: FTLUncalibratedRecHit.h:39
FTLUncalibratedRecHit::kSaturated
Definition: FTLUncalibratedRecHit.h:14
FTLUncalibratedRecHit::setAmplitude
void setAmplitude(std::pair< float, float > amplitude)
Definition: FTLUncalibratedRecHit.h:50
FTLUncalibratedRecHit::positionError
float positionError() const
Definition: FTLUncalibratedRecHit.h:42
FTLUncalibratedRecHit::id_
DetId id_
Definition: FTLUncalibratedRecHit.h:72
FTLUncalibratedRecHit::key_type
DetId key_type
Definition: FTLUncalibratedRecHit.h:9
FTLUncalibratedRecHit::id
DetId id() const
Definition: FTLUncalibratedRecHit.h:46
FTLUncalibratedRecHit::column
int column() const
Definition: FTLUncalibratedRecHit.h:48
FTLUncalibratedRecHit::setTime
void setTime(std::pair< float, float > time)
Definition: FTLUncalibratedRecHit.h:51
FTLUncalibratedRecHit::setPosition
void setPosition(float position)
Definition: FTLUncalibratedRecHit.h:58
FTLUncalibratedRecHit::kPoorReco
Definition: FTLUncalibratedRecHit.h:13
DetId.h
FTLUncalibratedRecHit::setPositionError
void setPositionError(float positionErr)
Definition: FTLUncalibratedRecHit.h:59
FTLUncalibratedRecHit::setId
void setId(DetId id)
Definition: FTLUncalibratedRecHit.h:54
FTLUncalibratedRecHit::flags
unsigned char flags() const
Definition: FTLUncalibratedRecHit.h:44
FTLUncalibratedRecHit::~FTLUncalibratedRecHit
~FTLUncalibratedRecHit()=default
FTLUncalibratedRecHit
Definition: FTLUncalibratedRecHit.h:7
FTLUncalibratedRecHit::amplitude
std::pair< float, float > amplitude() const
Definition: FTLUncalibratedRecHit.h:37
FTLUncalibratedRecHit::row_
uint8_t row_
Definition: FTLUncalibratedRecHit.h:73
FTLUncalibratedRecHit::FTLUncalibratedRecHit
FTLUncalibratedRecHit()
Definition: FTLUncalibratedRecHit.cc:5
FTLUncalibratedRecHit::time_
std::pair< float, float > time_
Definition: FTLUncalibratedRecHit.h:68
FTLUncalibratedRecHit::isTimeErrorValid
bool isTimeErrorValid() const
Definition: FTLUncalibratedRecHit.cc:46
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:117
FTLUncalibratedRecHit::timeError
float timeError() const
Definition: FTLUncalibratedRecHit.h:41
FTLUncalibratedRecHit::time
std::pair< float, float > time() const
Definition: FTLUncalibratedRecHit.h:38