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, float ampl, float time, float timeError, unsigned char flags = 0);
22 
24  float amplitude() const { return amplitude_; }
25  float time() const { return time_; }
26 
27  float timeError() const {return timeError_; }
28 
29  DetId id() const { return id_; }
30 
32  void setTime( float time ) { time_ = time; }
33 
34  void setTimeError( float timeErr ) { timeError_ = timeErr; }
35  void setId( DetId id ) { id_ = id; }
36  void setFlagBit(Flags flag);
37  bool checkFlag(Flags flag) const;
38 
39  bool isTimeValid() const;
40  bool isTimeErrorValid() const;
41 
42  bool isSaturated() const;
43 
44  private:
45  float amplitude_; //< Reconstructed amplitude
46  float time_; //< Reconstructed time jitter
47  float timeError_;
48  DetId id_; //< Detector ID
49  unsigned char flags_;
50 };
51 
52 #endif
bool checkFlag(Flags flag) const
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
void setAmplitude(float amplitude)
Definition: DetId.h:18
void setTimeError(float timeErr)