CMS 3D CMS Logo

HGCUncalibratedRecHit.h
Go to the documentation of this file.
1 #ifndef DATAFORMATS_HGCUNCALIBRATEDRECHIT
2 #define DATAFORMATS_HGCUNCALIBRATEDRECHIT
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 
20  const DetId& detId, float ampl, float ped, float jit, float chi2, uint32_t flags = 0, uint32_t aux = 0);
21 
22  virtual ~HGCUncalibratedRecHit();
23  float amplitude() const { return amplitude_; }
24  float pedestal() const { return pedestal_; }
25  float jitter() const { return jitter_; }
26  float chi2() const { return chi2_; }
27  float outOfTimeEnergy() const { return OOTamplitude_; }
28  float outOfTimeChi2() const { return OOTchi2_; }
29 
30  uint32_t flags() const { return flags_; }
31  float jitterError() const;
32  uint8_t jitterErrorBits() const;
33  DetId id() const { return id_; }
34 
37  void setJitter(float jitter) { jitter_ = jitter; }
38  void setChi2(float chi2) { chi2_ = chi2; }
40  void setOutOfTimeChi2(float chi2) { OOTchi2_ = chi2; }
41 
42  void setJitterError(float jitterErr);
43  void setFlags(uint32_t flags) { flags_ = flags; }
44  void setId(DetId id) { id_ = id; }
45  void setAux(uint32_t aux) { aux_ = aux; }
46  void setFlagBit(Flags flag);
47  bool checkFlag(Flags flag) const;
48 
49  bool isSaturated() const;
50  bool isJitterValid() const;
51  bool isJitterErrorValid() const;
52 
53 private:
54  float amplitude_; //< Reconstructed amplitude
55  float pedestal_; //< Reconstructed pedestal
56  float jitter_; //< Reconstructed time jitter
57  float chi2_; //< Chi2 of the pulse
58  float OOTamplitude_; //< Out-Of-Time reconstructed amplitude
59  float OOTchi2_; //< Out-Of-Time Chi2
60  uint32_t flags_; //< flag to be propagated to RecHit
61  uint32_t aux_; //< aux word; first 8 bits contain time (jitter) error
62  DetId id_; //< Detector ID
63 };
64 
65 #endif
void setFlags(uint32_t flags)
void setJitter(float jitter)
uint8_t jitterErrorBits() const
bool checkFlag(Flags flag) const
void setAux(uint32_t aux)
Definition: DetId.h:17
void setPedestal(float pedestal)
void setJitterError(float jitterErr)
void setOutOfTimeChi2(float chi2)
void setAmplitude(float amplitude)
void setOutOfTimeEnergy(float energy)