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
HGCUncalibratedRecHit::setFlags
void setFlags(uint32_t flags)
Definition: HGCUncalibratedRecHit.h:43
HGCUncalibratedRecHit::setAux
void setAux(uint32_t aux)
Definition: HGCUncalibratedRecHit.h:45
HGCUncalibratedRecHit::pedestal
float pedestal() const
Definition: HGCUncalibratedRecHit.h:24
HGCUncalibratedRecHit::setPedestal
void setPedestal(float pedestal)
Definition: HGCUncalibratedRecHit.h:36
HGCUncalibratedRecHit::flags_
uint32_t flags_
Definition: HGCUncalibratedRecHit.h:60
HGCUncalibratedRecHit::outOfTimeEnergy
float outOfTimeEnergy() const
Definition: HGCUncalibratedRecHit.h:27
HGCUncalibratedRecHit::setJitterError
void setJitterError(float jitterErr)
Definition: HGCUncalibratedRecHit.cc:46
HGCUncalibratedRecHit::setFlagBit
void setFlagBit(Flags flag)
Definition: HGCUncalibratedRecHit.cc:100
HGCUncalibratedRecHit::setId
void setId(DetId id)
Definition: HGCUncalibratedRecHit.h:44
HGCUncalibratedRecHit::kSaturated
Definition: HGCUncalibratedRecHit.h:14
HGCUncalibratedRecHit::chi2
float chi2() const
Definition: HGCUncalibratedRecHit.h:26
HGCUncalibratedRecHit::kGood
Definition: HGCUncalibratedRecHit.h:12
HGCUncalibratedRecHit::flags
uint32_t flags() const
Definition: HGCUncalibratedRecHit.h:30
HGCUncalibratedRecHit::isJitterValid
bool isJitterValid() const
Definition: HGCUncalibratedRecHit.cc:79
HGCUncalibratedRecHit
Definition: HGCUncalibratedRecHit.h:7
HGCUncalibratedRecHit::HGCUncalibratedRecHit
HGCUncalibratedRecHit()
Definition: HGCUncalibratedRecHit.cc:4
HGCUncalibratedRecHit::setJitter
void setJitter(float jitter)
Definition: HGCUncalibratedRecHit.h:37
HGCUncalibratedRecHit::amplitude_
float amplitude_
Definition: HGCUncalibratedRecHit.h:54
HGCUncalibratedRecHit::checkFlag
bool checkFlag(Flags flag) const
Definition: HGCUncalibratedRecHit.cc:110
DetId
Definition: DetId.h:17
HGCUncalibratedRecHit::OOTamplitude_
float OOTamplitude_
Definition: HGCUncalibratedRecHit.h:58
HGCUncalibratedRecHit::id_
DetId id_
Definition: HGCUncalibratedRecHit.h:62
HGCUncalibratedRecHit::id
DetId id() const
Definition: HGCUncalibratedRecHit.h:33
HGCUncalibratedRecHit::jitter
float jitter() const
Definition: HGCUncalibratedRecHit.h:25
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
HGCUncalibratedRecHit::OOTchi2_
float OOTchi2_
Definition: HGCUncalibratedRecHit.h:59
HGCUncalibratedRecHit::setChi2
void setChi2(float chi2)
Definition: HGCUncalibratedRecHit.h:38
HGCUncalibratedRecHit::chi2_
float chi2_
Definition: HGCUncalibratedRecHit.h:57
HGCUncalibratedRecHit::setOutOfTimeChi2
void setOutOfTimeChi2(float chi2)
Definition: HGCUncalibratedRecHit.h:40
HGCUncalibratedRecHit::jitterErrorBits
uint8_t jitterErrorBits() const
Definition: HGCUncalibratedRecHit.cc:95
HGCUncalibratedRecHit::isJitterErrorValid
bool isJitterErrorValid() const
Definition: HGCUncalibratedRecHit.cc:86
HGCUncalibratedRecHit::isSaturated
bool isSaturated() const
Definition: HGCUncalibratedRecHit.cc:28
printConversionInfo.aux
aux
Definition: printConversionInfo.py:19
HGCUncalibratedRecHit::setAmplitude
void setAmplitude(float amplitude)
Definition: HGCUncalibratedRecHit.h:35
HGCUncalibratedRecHit::setOutOfTimeEnergy
void setOutOfTimeEnergy(float energy)
Definition: HGCUncalibratedRecHit.h:39
HGCUncalibratedRecHit::key_type
DetId key_type
Definition: HGCUncalibratedRecHit.h:9
HGCUncalibratedRecHit::pedestal_
float pedestal_
Definition: HGCUncalibratedRecHit.h:55
HGCUncalibratedRecHit::kPoorReco
Definition: HGCUncalibratedRecHit.h:13
HGCUncalibratedRecHit::Flags
Flags
Definition: HGCUncalibratedRecHit.h:11
DetId.h
HGCUncalibratedRecHit::amplitude
float amplitude() const
Definition: HGCUncalibratedRecHit.h:23
HGCUncalibratedRecHit::aux_
uint32_t aux_
Definition: HGCUncalibratedRecHit.h:61
HGCUncalibratedRecHit::jitter_
float jitter_
Definition: HGCUncalibratedRecHit.h:56
HGCUncalibratedRecHit::kOutOfTime
Definition: HGCUncalibratedRecHit.h:15
HGCUncalibratedRecHit::jitterError
float jitterError() const
Definition: HGCUncalibratedRecHit.cc:30
HGCUncalibratedRecHit::~HGCUncalibratedRecHit
virtual ~HGCUncalibratedRecHit()
Definition: HGCUncalibratedRecHit.cc:26
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:117
HGCUncalibratedRecHit::outOfTimeChi2
float outOfTimeChi2() const
Definition: HGCUncalibratedRecHit.h:28