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